vfsmount(2) System Calls Manual vfsmount(2)
NAME
vfsmount - mount a file system
SYNOPSIS
Remarks
This routine is included only for compatibility with past releases. It works only with UFS (HFS), NFS, and CDFS file systems. For maximum
portability and improved functionality, new applications should use the system call (see mount(2)).
DESCRIPTION
The system call attaches a file system to a directory. After a successful return, references to directory dir refer to the root directory
of the newly mounted file system. dir is a pointer to a null-terminated string containing a path name. dir must exist already, and must
be a directory. Its old contents are inaccessible while the file system is mounted.
type indicates the type of the file system. It must be one of the types described below. does not check that the file system is actually
of type type; if type is incorrect, may cause the process to hang. To prevent such problems, (see statfsdev(3C)) should be called before
to check the file system type, which places in the field of the structure that it returns.
The flags argument determines whether the file system can be written to. It also controls whether programs from the mounted file system
are allowed to have set-user-ID execution. Physically write-protected and magnetic tape file systems must be mounted read-only. Failure
to do so results in a return of -1 by and a value of [EIO] in The following values for the flags argument are defined in
Mount done as read-only.
Execution of set-user-ID programs not permitted.
data is a pointer to a structure containing arguments specific to the value contained in type. The following values for type are defined
in
Mount a local CD-ROM file system.
data points to a structure of the following format:
fspec points to the name of the block special file that is to be mounted.
Mount a local HFS file system.
data points to a structure of the following format:
fspec points to the name of the block special file that is to be mounted. This is identical in use and function to
the first argument of (see mount(2)).
flags points to a bit map that sets options. The following values of the bits are defined in
Specify that the writes to disks are to be delayed till the buffer
needs to be reused. This is the default.
Specify that the writes to disks are to be done asynchronously,
where possible, without waiting for completion.
and are mutually exclusive.
Specify that rigorous posting of file system metadata is to be used.
This is the default.
Specify that relaxed posting of file system metadata is to be used.
This may lead to better performance for certain applications; but there is increased potential
for data loss in case of a crash.
and are mutually exclusive.
Notes
The type is no longer supported through this interface.
RETURN VALUE
returns the following values:
Successful completion.
Failure.
No file system is mounted. is set to indicate the error.
ERRORS
If fails, is set to one of the following values.
dir is not a directory, or another process currently holds a reference to it.
No space remains in the mount table.
The superblock for the file system had a bad magic number
or an out-of-range block size.
Not enough memory was available to read the cylinder group information
for the file system.
data or dir points outside the allocated address space of the process.
type is not or
An I/O error occurred while reading from or writing to the file system.
An attempt was made to mount a physically write protected
or magnetic tape file system as read-write.
Too many symbolic links were encountered while translating
the path name of file system referred to by data or dir.
The path name of the file system referred to by
data or dir is longer than bytes, or the length of a component of the path name exceeds bytes while is in effect.
The file system referred to by
data or dir does not exist.
The file system referred to by
data does not exist.
The file system referred to by
data is not a block device. This message can occur only during a local mount.
A component of the path prefix in
dir is not a directory.
A component of the path prefix of the file system referred to by
data or dir is not a directory.
The major device number of the file system referred to by
data is out of range (indicating that no device driver exists for the associated hardware).
The caller does not have
appropriate privileges.
DEPENDENCIES
NFS
If fails, can also be set to one of the following values.
A pointer in the
data structure points outside the process's allocated address space.
A value in a field of
data is out of proper range.
See mountd(1M), getfh(2), and inet(7F) for more information.
WARNINGS
The command (see mount(1M)) is preferred over because supports all mounting options that are available from directly, plus also maintains
the file which lists what file systems are mounted.
Obsolescent Interfaces
is to be obsoleted at a future date.
AUTHOR
was developed by HP and Sun Microsystems, Inc.
SEE ALSO
mount(1M), mount(2), umount(2), privileges(5).
TO BE OBSOLETED vfsmount(2)