Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mount(2) — SunOS 2.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

nfsmount(2)

unmount(2)

mount(8)

MOUNT(2)  —  SYSTEM CALLS

NAME

mount − mount file system

SYNOPSIS

mount(special, name, rwflag)
char ∗special, ∗name;
int rwflag;

DESCRIPTION

Mount announces to the system that a removable file system has been mounted on the block-structured special file special; from now on, references to file name will refer to the root file on the newly mounted file system.  Special and name are pointers to null-terminated strings containing the appropriate path names.  Name must exist already, and 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. 

RETURN VALUE

Mount returns 0 if the action occurred, and −1 if special is inaccessible or not an appropriate file, if name does not exist, if special is already mounted, if name is in use, or if there are already too many file systems mounted. 

ERRORS

Mount will fail when one of the following occurs:

[ENODEV] The caller is not the super-user. 

[ENODEV] 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 is not a directory, or another process currently holds a reference to it. 

[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. 

SEE ALSO

nfsmount(2), unmount(2), mount(8)

BUGS

The error codes are in a state of disarray; too many errors appear to the caller as one value. 

Sun Release 2.0  —  Last change: 1 February 1985

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026