UNMOUNT(2V) — SYSTEM CALLS
NAME
unmount, umount − remove a file system
SYNOPSIS
int unmount(name)
char ∗name;
SYSTEM V SYNOPSIS
int umount(special)
char ∗special;
DESCRIPTION
unmount() announces to the system that the directory name is no longer to refer to the root of a mounted file system. The directory name reverts to its ordinary interpretation.
Only the super-user may call unmount().
SYSTEM V DESCRIPTION
umount() reqests that a previously mounted file system contained on the block special device referred to by special be unmounted. special points to a path name. After the file system is unmounted, the directory on which it was mounted reverts to its ordinary interpretation.
Only the super-user may call umount().
Note: Unlike the path name argument to unmount() which refers to the directory on which the file system is mounted, special refers to the block special device containing the mounted file system itself.
RETURN VALUES
unmount() returns:
0 on success.
−1 on failure and sets errno to indicate the error.
SYSTEM V RETURN VALUES
umount() returns:
0 on success.
−1 on failure and sets errno to indicate the error.
ERRORS
EACCES Search permission is denied for a component of the path prefix.
EBUSY A process is holding a reference to a file located on the file system.
EFAULT name points outside the process’s allocated address space.
EINVAL name is not the root of a mounted file system.
EIO An I/O error occurred while reading from or writing to the file system.
ELOOP Too many symbolic links were encountered in translating the path name.
ENAMETOOLONG The length of the path argument exceeds {PATH_MAX}.
A pathname component is longer than {NAME_MAX} (see sysconf(2V)) while {_POSIX_NO_TRUNC} is in effect (see pathconf(2V)).
ENOENT name does not exist.
ENOTDIR A component of the path prefix of name is not a directory.
EPERM The caller is not the super-user.
SYSTEM V ERRORS
EINVAL The device referred to by special is not mounted.
ENOENT The named file does not exist.
ENOTBLK special does not refer to a block special file.
ENOTDIR A component of the path prefix of special is not a directory.
ENXIO The device referred to by special does not exist.
SEE ALSO
BUGS
The error codes are in a state of disarray; too many errors appear to the caller as one value.
Sun Release 4.1 — Last change: 21 January 1990