All rights reserved. The Berkeley software License Agreement
specifies the terms and conditions for redistribution.
@(#)mount.2 6.1 (Berkeley) 05/09/85
mount(special, name, rwflag) char *special, *name; int rwflag;umount(special) char *special;
Name must exist already. Name must be a directory. Its old contents are inaccessible while the file system is mounted.
The rwflag argument determines whether the file system can be written on; if it is 0 writing is allowed, if non-zero no writing is done. Physically write-protected and magnetic tape file systems must be mounted read-only or errors will occur when access times are updated, whether or not any explicit write is attempted.
Umount announces to the system that the special file is no longer to contain a removable file system. The associated file reverts to its ordinary interpretation.
Umount returns 0 if the action occurred; -1 if if the special file is inaccessible or does not have a mounted file system, or if there are active files in the mounted file system.
15 [NODEV] The caller is not the super-user.
15 [NODEV] Special does not exist.
15 [ENOTBLK] Special is not a block device.
15 [ENXIO] The major device number of special is out of range (this indicates no device driver exists for the associated hardware).
15 [EPERM] The pathname contains a character with the high-order bit set.
15 [ENOTDIR] A component of the path prefix in name is not a directory.
15 [EROFS] Name resides on a read-only file system.
15 [EBUSY] Name is not a directory, or another process currently holds a reference to it.
15 [EBUSY] No space remains in the mount table.
15 [EBUSY] The super block for the file system had a bad magic number or an out of range block size.
15 [EBUSY] Not enough memory was available to read the cylinder group information for the file system.
15 [EBUSY] An i/o error occurred while reading the super block or cylinder group information.
Umount may fail with one of the following errors:
15 [NODEV] The caller is not the super-user.
15 [NODEV] Special does not exist.
15 [ENOTBLK] Special is not a block device.
15 [ENXIO] The major device number of special is out of range (this indicates no device driver exists for the associated hardware).
15 [EINVAL] The requested device is not in the mount table.
15 [EBUSY] A process is holding a reference to a file located on the file system.