1MOUNT(2) System Calls Manual MOUNT(2)
2
3
4
6 mount, umount - mount or remove file system
7
9 mount(special, name, rwflag)
10 char *special, *name;
11
12 umount(special)
13 char *special;
14
16 Mount announces to the system that a removable file system has been
17 mounted on the block-structured special file special; from now on, ref‐
18 erences to file name will refer to the root file on the newly mounted
19 file system. Special and name are pointers to null-terminated strings
20 containing the appropriate path names.
21
22 Name must exist already. Name must be a directory (unless the root of
23 the mounted file system is not a directory). Its old contents are
24 inaccessible while the file system is mounted.
25
26 The rwflag argument determines whether the file system can be written
27 on; if it is 0 writing is allowed, if non-zero no writing is done.
28 Physically write-protected and magnetic tape file systems must be
29 mounted read-only or errors will occur when access times are updated,
30 whether or not any explicit write is attempted.
31
32 Umount announces to the system that the special file is no longer to
33 contain a removable file system. The associated file reverts to its
34 ordinary interpretation.
35
37 mount(1)
38
40 Mount returns 0 if the action occurred; -1 if special is inaccessible
41 or not an appropriate file; if name does not exist; if special is
42 already mounted; if name is in use; or if there are already too many
43 file systems mounted.
44
45 Umount returns 0 if the action occurred; -1 if if the special file is
46 inaccessible or does not have a mounted file system, or if there are
47 active files in the mounted file system.
48
50 (mount = 21.)
51 sys mount; special; name; rwflag
52
53 (umount = 22.)
54 sys umount; special
55
56
57
58 MOUNT(2)