Commit | Line | Data |
---|---|---|
2eb286a2 C |
1 | .TH MOUNT 2 "27 July 1983" |
2 | .UC 4 | |
3 | .SH NAME | |
4 | mount, umount \- mount or remove file system | |
5 | .SH SYNOPSIS | |
6 | .nf | |
7 | .ft B | |
8 | mount(special, name, rwflag) | |
9 | char *special, *name; | |
10 | int rwflag; | |
11 | .PP | |
12 | .ft B | |
13 | umount(special) | |
14 | char *special; | |
15 | .fi | |
16 | .SH DESCRIPTION | |
17 | .I Mount | |
18 | announces to the system that a removable file system has | |
19 | been mounted on | |
20 | the block-structured special file | |
21 | .I special; | |
22 | from now on, references to file | |
23 | .I name | |
24 | will refer to | |
25 | the root file on the newly mounted file system. | |
26 | .I Special | |
27 | and | |
28 | .I name | |
29 | are pointers to null-terminated strings | |
30 | containing the appropriate path names. | |
31 | .PP | |
32 | .I Name | |
33 | must exist already. | |
34 | .I Name | |
35 | must be a directory. | |
36 | Its old contents | |
37 | are inaccessible while the file system | |
38 | is mounted. | |
39 | .PP | |
40 | The | |
41 | .I rwflag | |
42 | argument determines whether | |
43 | the file system can be written on; if it is 0 writing | |
44 | is allowed, if non-zero no writing is done. | |
45 | Physically write-protected and magnetic | |
46 | tape file systems must be mounted read-only or | |
47 | errors will occur when access times are updated, | |
48 | whether or not any | |
49 | explicit write is attempted. | |
50 | .PP | |
51 | .I Umount | |
52 | announces to the system that the | |
53 | .I special | |
54 | file is no longer to contain a removable file system. | |
55 | The associated file reverts to its ordinary interpretation. | |
56 | .SH "RETURN VALUE | |
57 | .I Mount | |
58 | returns 0 if the action occurred, \-1 if | |
59 | .I special | |
60 | is inaccessible or not an appropriate file, if | |
61 | .I name | |
62 | does not exist, if | |
63 | .I special | |
64 | is already mounted, if | |
65 | .I name | |
66 | is in use, or if | |
67 | there are already too many | |
68 | file systems mounted. | |
69 | .PP | |
70 | .I Umount | |
71 | returns 0 if the action occurred; \-1 if | |
72 | if the special file is inaccessible or | |
73 | does not have a mounted file system, | |
74 | or if there are active files in the mounted | |
75 | file system. | |
76 | .SH ERRORS | |
77 | .I Mount | |
78 | will fail when one of the following occurs: | |
79 | .TP 15 | |
80 | [NODEV] | |
81 | The caller is not the super-user. | |
82 | .TP 15 | |
83 | [NODEV] | |
84 | .I Special | |
85 | does not exist. | |
86 | .TP 15 | |
87 | [ENOTBLK] | |
88 | .I Special | |
89 | is not a block device. | |
90 | .TP 15 | |
91 | [ENXIO] | |
92 | The major device number of | |
93 | .I special | |
94 | is out of range (this indicates no device driver exists | |
95 | for the associated hardware). | |
96 | .TP 15 | |
97 | [EPERM] | |
98 | The pathname contains a character with the high-order bit set. | |
99 | .TP 15 | |
100 | [ENOTDIR] | |
101 | A component of the path prefix in | |
102 | .I name | |
103 | is not a directory. | |
104 | .TP 15 | |
105 | [EROFS] | |
106 | .I Name | |
107 | resides on a read-only file system. | |
108 | .TP 15 | |
109 | [EBUSY] | |
110 | .I Name | |
111 | is not a directory, or another process currently | |
112 | holds a reference to it. | |
113 | .TP 15 | |
114 | [EBUSY] | |
115 | No space remains in the mount table. | |
116 | .TP 15 | |
117 | [EBUSY] | |
118 | The super block for the file system had a bad magic | |
119 | number or an out of range block size. | |
120 | .TP 15 | |
121 | [EBUSY] | |
122 | Not enough memory was available to read the cylinder | |
123 | group information for the file system. | |
124 | .TP 15 | |
125 | [EBUSY] | |
126 | An i/o error occurred while reading the super block or | |
127 | cylinder group information. | |
128 | .PP | |
129 | .I Umount | |
130 | may fail with one of the following errors: | |
131 | .TP 15 | |
132 | [NODEV] | |
133 | The caller is not the super-user. | |
134 | .TP 15 | |
135 | [NODEV] | |
136 | .I Special | |
137 | does not exist. | |
138 | .TP 15 | |
139 | [ENOTBLK] | |
140 | .I Special | |
141 | is not a block device. | |
142 | .TP 15 | |
143 | [ENXIO] | |
144 | The major device number of | |
145 | .I special | |
146 | is out of range (this indicates no device driver exists | |
147 | for the associated hardware). | |
148 | .TP 15 | |
149 | [EINVAL] | |
150 | The requested device is not in the mount table. | |
151 | .TP 15 | |
152 | [EBUSY] | |
153 | A process is holding a reference to a file located | |
154 | on the file system. | |
155 | .SH "SEE ALSO" | |
156 | mount(8), umount(8) | |
157 | .SH BUGS | |
158 | The error codes are in a state of disarray; too many errors | |
159 | appear to the caller as one value. |