'\"macro stdmacro
.if n .pH g2.umount @(#)umount	40.15 of 10/10/89
.\" Copyright 1989 AT&T
.nr X
.if \nX=0 .ds x} umount 2 "" "\&"
.if \nX=1 .ds x} umount 2 ""
.if \nX=2 .ds x} umount 2 "" "\&"
.if \nX=3 .ds x} umount "" "" "\&"
.TH \*(x}
.SH NAME
\f4umount\f1 \- unmount a file system
.SH SYNOPSIS
\f4#include <sys/mount.h>\f1
.PP
\f4int umount(const char \(**file);\f1
.SH DESCRIPTION
\f4umount\f1
requests that a previously mounted file system contained on the
block special device or directory identified by
\f2file\f1
be unmounted.
\f2file\f1
is a pointer to a path name.
After unmounting the file system,
the directory upon which the file system was mounted reverts to its ordinary
interpretation.
.PP
\f4umount\f1
may be invoked only by the super-user.
.PP
\f4umount\f1
will fail if one or more of the following are true:
.TP 20
\f4EPERM\f1
The process's effective user ID
is not super-user.
.TP
\f4EINVAL\f1
\f2file\f1
does not exist.
.TP
\f4ELOOP\f1
Too many symbolic links were encountered in translating the path
pointed to by \f2file\f1.
.TP
\f4ENAMETOOLONG\f1
The length of the \f2file\f1 argument exceeds {\f4PATH_MAX\f1}, or the
length of a \f2file\f1 component exceeds {\f4NAME_MAX\f1} while
\f4_POSIX_NO_TRUNC\f1 is in effect.
.TP
\f4ENOTBLK\f1
\f2file\f1
is not a block special device.
.TP
\f4EINVAL\f1
\f2file\f1
is not mounted.
.TP
\f4EBUSY\f1
A file on
\f2file\f1
is busy.
.TP
\f4EFAULT\f1
\f2file\f1
points to an illegal address.
.TP
\f4EREMOTE\f1
\f2file\f1
is remote.
.TP
\f4ENOLINK\f1
\f2file\f1 is on a remote machine, and the link to that 
machine is no longer active.
.TP
\f4EMULTIHOP\f1
Components of the path pointed to by \f2file\f1 require
hopping to multiple remote machines.
.SH "SEE ALSO"
\f4mount\f1(2).
.SH "DIAGNOSTICS"
Upon successful completion a value of 0 is returned.
Otherwise, a value of \-1 is returned and
\f4errno\fP
is set to indicate the error.
.\"	@(#)umount.2	6.2 of 9/6/83
.Ee
