Print this page
6198 Let's EOL cachefs
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man4/mnttab.4.man.txt
+++ new/usr/src/man/man4/mnttab.4.man.txt
1 1 MNTTAB(4) File Formats MNTTAB(4)
2 2
3 3
4 4
5 5 NAME
6 6 mnttab - mounted file system table
7 7
8 8 DESCRIPTION
9 9 The file /etc/mnttab is really a file system that provides read-only
10 10 access to the table of mounted file systems for the current host.
11 11 /etc/mnttab is read by programs using the routines described in
12 12 getmntent(3C). Mounting a file system adds an entry to this table.
13 13 Unmounting removes an entry from this table. Remounting a file system
14 14 causes the information in the mounted file system table to be updated
15 15 to reflect any changes caused by the remount. The list is maintained by
16 16 the kernel in order of mount time. That is, the first mounted file
17 17 system is first in the list and the most recently mounted file system
18 18 is last. When mounted on a mount point the file system appears as a
19 19 regular file containing the current mnttab information.
20 20
21 21
22 22 Each entry is a line of fields separated by TABs in the form:
23 23
24 24 special mount_point fstype options time
25 25
26 26
27 27
28 28 where:
29 29
30 30 special
31 31 The name of the resource that has been mounted.
32 32
33 33
34 34 mount_point
35 35 The pathname of the directory on which the filesystem is
36 36 mounted.
37 37
38 38
39 39 fstype
40 40 The file system type of the mounted file system.
41 41
42 42
43 43 options
44 44 The mount options. See respective mount file system man
45 45 page in the See Also section below.
46 46
47 47
48 48 time
49 49 The time at which the file system was mounted.
50 50
51 51
52 52
53 53 Examples of entries for the special field include the pathname of a
54 54 block-special device, the name of a remote file system in the form of
55 55 host:pathname, or the name of a swap file, for example, a file made
56 56 with mkfile(1M).
57 57
58 58 IOCTLS
59 59 The following ioctl(2) calls are supported:
60 60
61 61 MNTIOC_NMNTS
62 62 Returns the count of mounted resources in the
63 63 current snapshot in the uint32_t pointed to by
64 64 arg.
65 65
66 66
67 67 MNTIOC_GETDEVLIST
68 68 Returns an array of uint32_t's that is twice as
69 69 long as the length returned by MNTIOC_NMNTS. Each
70 70 pair of numbers is the major and minor device
71 71 number for the file system at the corresponding
72 72 line in the current /etc/mnttab snapshot. arg
73 73 points to the memory buffer to receive the device
74 74 number information.
75 75
76 76
77 77 MNTIOC_SETTAG
78 78 Sets a tag word into the options list for a
79 79 mounted file system. A tag is a notation that will
80 80 appear in the options string of a mounted file
81 81 system but it is not recognized or interpreted by
82 82 the file system code. arg points to a filled in
83 83 mnttagdesc structure, as shown in the following
84 84 example:
85 85
86 86 uint_t mtd_major; /* major number for mounted fs */
87 87 uint_t mtd_minor; /* minor number for mounted fs */
88 88 char *mtd_mntpt; /* mount point of file system */
89 89 char *mtd_tag; /* tag to set/clear */
90 90
91 91 If the tag already exists then it is marked as set
92 92 but not re-added. Tags can be at most
93 93 MAX_MNTOPT_TAG long.
94 94
95 95 Use of this ioctl is restricted to processes with
96 96 the {PRIV_SYS_MOUNT} privilege.
97 97
98 98
99 99 MNTIOC_CLRTAG
100 100 Marks a tag in the options list for a mounted file
101 101 system as not set. arg points to the same
102 102 structure as MNTIOC_SETTAG, which identifies the
103 103 file system and tag to be cleared.
104 104
105 105 Use of this ioctl is restricted to processes with
106 106 the {PRIV_SYS_MOUNT} privilege.
107 107
108 108
109 109 ERRORS
110 110 EFAULT
111 111 The arg pointer in an MNTIOC_ ioctl call pointed to an
112 112 inaccessible memory location or a character pointer in
113 113 a mnttagdesc structure pointed to an inaccessible
114 114 memory location.
115 115
116 116
117 117 EINVAL
118 118 The tag specified in a MNTIOC_SETTAG call already
119 119 exists as a file system option, or the tag specified in
120 120 a MNTIOC_CLRTAG call does not exist.
121 121
122 122
123 123 ENAMETOOLONG
124 124 The tag specified in a MNTIOC_SETTAG call is too long
125 125 or the tag would make the total length of the option
126 126 string for the mounted file system too long.
127 127
128 128
129 129 EPERM
130 130 The calling process does not have {PRIV_SYS_MOUNT}
131 131 privilege and either a MNTIOC_SETTAG or MNTIOC_CLRTAG
132 132 call was made.
133 133
134 134
↓ open down ↓ |
134 lines elided |
↑ open up ↑ |
135 135 FILES
136 136 /etc/mnttab
137 137 Usual mount point for mnttab file system
138 138
139 139
140 140 /usr/include/sys/mntio.h
141 141 Header file that contains IOCTL definitions
142 142
143 143
144 144 SEE ALSO
145 - mkfile(1M), mount_cachefs(1M), mount_hsfs(1M), mount_nfs(1M),
146 - mount_pcfs(1M), mount_ufs(1M), mount(1M), ioctl(2), read(2), poll(2),
147 - stat(2), getmntent(3C)
145 + mkfile(1M), mount_hsfs(1M), mount_nfs(1M), mount_pcfs(1M),
146 + mount_ufs(1M), mount(1M), ioctl(2), read(2), poll(2), stat(2),
147 + getmntent(3C)
148 148
149 149 WARNINGS
150 150 The mnttab file system provides the previously undocumented dev=xxx
151 151 option in the option string for each mounted file system. This is
152 152 provided for legacy applications that might have been using the
153 153 dev=information option.
154 154
155 155
156 156 Using dev=option in applications is strongly discouraged. The device
157 157 number string represents a 32-bit quantity and might not contain
158 158 correct information in 64-bit environments.
159 159
160 160
161 161 Applications requiring device number information for mounted file
162 162 systems should use the getextmntent(3C) interface, which functions
163 163 properly in either 32- or 64-bit environments.
164 164
165 165 NOTES
↓ open down ↓ |
8 lines elided |
↑ open up ↑ |
166 166 The snapshot of the mnttab information is taken any time a read(2) is
167 167 performed at offset 0 (the beginning) of the mnttab file. The file
168 168 modification time returned by stat(2) for the mnttab file is the time
169 169 of the last change to mounted file system information. A poll(2) system
170 170 call requesting a POLLRDBAND event can be used to block and wait for
171 171 the system's mounted file system information to be different from the
172 172 most recent snapshot since the mnttab file was opened.
173 173
174 174
175 175
176 - December 20, 2003 MNTTAB(4)
176 + September 8, 2015 MNTTAB(4)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX