MOUNT(2) DOMAIN/IX SYS5 MOUNT(2)
NAME
mount, umount - mount or remove file system
USAGE
mount(special, name, rwflag)
char *special, *name;
int rwflag;
umount(special)
char *special;
DESCRIPTION
The mount call announces to the system that a removable file
system has been mounted on the block-structured special file
special; and that from now on, references to file name will
refer to the root file on the newly-mounted file system.
The parameters special and name are pointers to null-
terminated strings containing the appropriate pathnames.
The name must not already exist; it is created by the mount
call and exists only for the duration of the file system
mount.
The rwflag argument controls write access to the special
file system. If rwflag is 0, writing is allowed. If it is
non-zero, writing is prohibited. Physically write-protected
file systems must be mounted read-only or errors will occur
when access times are updated, whether or not any explicit
write is attempted.
The umount call announces to the system that the special
file no longer contains a removable file system. The asso-
ciated file is removed.
RETURN VALUE
The mount call returns 0 or -1.
0 Specified operation was successful.
-1 The special file is inaccessible, already mounted, or
not an appropriate file; name does not exist or is in
use; or there are already too many file systems
mounted.
The umount call returns 0 or -1.
0 Specified operation was successful.
-1 The special file is inaccessible or does not have a
Printed 12/4/86 MOUNT-1
MOUNT(2) DOMAIN/IX SYS5 MOUNT(2)
mounted file system, or there are active files in the
mounted file system.
ERRORS
Under the following conditions, mount fails:
[NODEV] Special does not exist.
[ENOTBLK] Special is not a block device.
[ENXIO] The major device number of special is out of range
(this indicates no device driver exists for the
associated hardware).
[EPERM] The pathname contains a character with the high-
order bit set.
[ENOTDIR] A component of the path prefix in name is not a
directory.
[EROFS] Name resides on a read-only file system.
[EBUSY] Name already exists.
[EBUSY] No space remains in the mount table.
[EBUSY] The super-block for the file system had a bad
magic number or an out-of-range block size.
[EBUSY] Not enough memory was available to read the
cylinder group information for the file system.
[EBUSY] An I/O error occurred while reading the super
block or cylinder group information.
Under the following conditions, umount fails:
[NODEV] Special does not exist.
[ENOTBLK] Special is not a block device.
[ENXIO] The major device number of special is out of range
(no device driver exists for the associated
hardware).
[EINVAL] The requested device is not in the mount table.
[EBUSY] A process is holding a reference to a file located
on the file system.
MOUNT-2 Printed 12/4/86
MOUNT(2) DOMAIN/IX SYS5 MOUNT(2)
Note that the error codes are not always informative. Many
types of errors (e.g., no space in the mount table, not
enough memory, etc.) return the same value (e.g., EBUSY) to
the caller.
RELATED INFORMATION
mkdisk(1M), mount(1M)
Printed 12/4/86 MOUNT-3