MOUNT(2)
NAME
mount − mount a file system
SYNOPSIS
int mount (spec, dir, rwflag)
char ∗spec, ∗dir;
int rwflag;
HP-UX COMPATIBILITY
Level: HP-UX/RUN ONLY
Origin: System V
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.
Mount will fail if one or more of the following are true:
[EPERM] The effective user ID is not super-user.
[ENOENT] Any of the named files 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.
[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.
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.
BUGS
If mount is called from the program level (i.e. not called from mount(1)), the table of mounted devices contained in /etc/mnttab is not updated.
HARDWARE DEPENDENCIES
Integral PC:
The super-user capabilities are provided to the normal user.
If a file system is mounted via this kernel call on the Integral PC, it can be unmounted only using the umount kernel call. The unmount(1) and mount(1) commands do not operate on a file system mounted via the mount kernel call.
The unmount command is unable to unmount any file system mounted with the mount kernel call. The Integral PC file system utilities cannot properly deal with file systems mounted with the mount kernel call.
SEE ALSO
Hewlett-Packard — last mod. May 11, 2021