MOUNT(2)
NAME
mount − mount a file system
SYNOPSIS
int mount (spec, dir, rwflag)
char ∗spec, ∗dir;
int rwflag;
DESCRIPTION
Mount requests that a removable file system contained on the block special device file identified by spec be mounted on the directory identified by dir. Spec and dir are pointers to path names.
Upon successful completion, references to the file dir will refer to the root directory on the mounted file system.
The low-order bit of rwflag is used to control write permission on the mounted file system; if 1, writing is forbidden, otherwise writing is permitted according to individual file accessibility.
Mount may be invoked only by the super-user.
RETURN VALUE
Upon successful completion a value of 0 is returned. Otherwise, a value of −1 is returned and errno is set to indicate the error.
ERRORS
Mount will fail if one or more of the following are true:
[EPERM] The effective user ID is not super-user.
[ENOENT] The named file does not exist (for example, path is null or a component of path does not exist).
[ENOTDIR] A component of a path prefix is not a directory.
[ENOTBLK] Spec is not a block special device.
[ENXIO] The device associated with spec does not exist.
[ENOTDIR] Dir is not a directory.
[EFAULT] Spec or dir points outside the allocated address space of the process. The reliable detection of this error will be implementation dependent.
[EBUSY] Dir is currently mounted on, is someone’s current working directory, or is otherwise busy.
[EBUSY] The device associated with spec is currently mounted.
[EBUSY] There are no more mount table entries.
[ENOENT] Spec or dir is null.
[EACCES] A component of the path prefix denies search permission.
[ENAMETOOLONG]
The length of a specified path name exceeds PATH_MAX bytes, or the length of a component of the path name exceeds NAME_MAX bytes while _POSIX_NO_TRUNC is in effect.
[ELOOP] Too many symbolic links were encountered in translating either path name.
WARNINGS
If mount is called from the program level (i.e. not called from mount(1M)), the table of mounted devices contained in /etc/mnttab is not updated.
DEPENDENCIES
HP Clustered Environment
When mount is called from a diskless node (cluster client), spec is interpreted as a device attached to the cluster server. This behavior is subject to change in future releases, and use in applications is not recommended.
SEE ALSO
STANDARDS CONFORMANCE
mount: SVID2, XPG2
Hewlett-Packard Company — HP-UX Release 7.0: Sept 1989