umount(2) CLIX umount(2)
NAME
umount - Unmounts a file system
LIBRARY
Standard C Library (libc.a)
SYNOPSIS
int umount(
char *file );
PARAMETERS
file Specifies a block special file or mount point directory of the file
system to be unmounted.
DESCRIPTION
The umount() function requests that a previously mounted file system
contained on the block special device or directory identified by file be
unmounted. After unmounting the file system, the directory upon which the
file system was mounted reverts to its ordinary interpretation.
Subordinate cache directories are removed by the system when they are
unmounted; the cache root directory is not removed automatically by the
system.
The umount() function may be invoked only by the superuser.
EXAMPLES
To unmount a mounted file system:
if (umount("/usr")
perror("umount failed");
NOTE
If the umount request is a jukebox request, the file /tmp/.mntque will be
parsed for mounts in progress. If the umount request is currently being
mounted and found in this file, umount will sleep until the mount request
is serviced.
RETURN VALUES
Upon successful completion a value of 0 is returned. Otherwise, a value
of -1 is returned and errno is set to indicate the error.
ERRORS
2/94 - Intergraph Corporation 1
umount(2) CLIX umount(2)
The umount() function fails if one or more of the following are true:
[EPERM]
The process's effective user ID is not superuser.
[EINVAL]
The pathname to which file points does not exist.
[ENOTBLK]
The value of file is not a block special device.
[EINVAL]
The pathname to which file points is not mounted.
[EBUSY]
A file on file is busy.
[EFAULT]
The value of file points to an illegal address.
[EREMOTE]
The pathname specified by file is remote.
[ENOLINK]
The pathname specified by file is on a remote machine, and the link
to that machine is no longer active.
[EMULTIHOP]
Components of the path pointed to by file require hopping to
multiple remote machines.
RELATED INFORMATION
Functions: mount(2)
2 Intergraph Corporation - 2/94