mount(3) — Subroutines
OSF
NAME
mount − Mounts a file system
LIBRARY
System V Compatibility Library (libsys5.a)
SYNOPSIS
#include <sys/mount.h> int mount(
char ∗spec,
char ∗dir,
int rwflag );
PARAMETERS
specPoints to the pathname of the file system to be mounted.
dirPoints to the pathname of the directory on which spec will be mounted.
rwflagSpecifies whether write permission is permitted on the mounted file system.
DESCRIPTION
The mount() function mounts a removable file system contained on the block special file pointed to by the spec parameter onto the directory pointed to by the dir parameter.
The rwflag parameter controls whether write permission is permitted on the new mounted file system. If rwflag is specified as 1, writing is forbidden. Otherwise, writing is permitted according to individual file accessibility.
The mount() function can only be invoked by the superuser.
NOTES
Two mount() functions are supported by OSF/1: the BSD mount() and the System V mount(). The default mount() function is the BSD mount(). To use the version of mount() documented on this reference page, you must link with the libsys5 library before you link with libc.
RETURN VALUE
The mount() function returns 0 (zero) if the file system was successfully mounted. Otherwise, −1 is returned and errno is set to indicate the error.
ERRORS
If the mount() function fails, errno may be set to one of the following values:
[EPERM]The effective user ID of the calling process is not root.
[ENOENT]The spec or dir parameter points to a pathname that does not exist.
[ENOTDIR]A component of the path prefix of either spec or dir is not a directory.
[ENOTBLK]The device identified by spec is not a block-special device.
[ENXIO]The device identified by spec does not exist.
[ENOTDIR]The pathname pointed to by dir is not a directory.
[EBUSY]Either dir has already been mounted onto, dir is a current working directory for some process, or dir is otherwise busy; or spec is already mounted; or the system mount table is full.
RELATED INFORMATION
Commands: mount(8)