MOUNT(2) — Silicon Graphics
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 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. 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.
Mount may be invoked only by the super-user.
Mount will fail if one or more of the following are true:
The effective user ID is not super-user. [EPERM]
Any of the named files does not exist. [ENOENT]
A component of a path prefix is not a directory. [ENOTDIR]
Spec is not a block special device. [ENOTBLK]
The device associated with spec does not exist. [ENXIO]
Dir is not a directory. [ENOTDIR]
Spec or dir points outside the process’s allocated address space. [EFAULT]
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]
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.
SEE ALSO
ASSEMBLER
moveq#21,D0| sys mount
movlspec,A0
movldir,D1
movlrwflag,A1
trap#0
Carry bit set on failure and cleared on success.
Version 2.1 — January 02, 1985