HP-UX Reference (11i v1 00/12) - 2 System Calls (vol 5)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man2/!!!intro.2
________________________________________________________________
___ ___
u
umount(2) umount(2)
NAME
umount - unmount a file system
SYNOPSIS
#include <sys/mount.h>
int umount(const char *name);
DESCRIPTION
umount() requests that a previously mounted file system contained on the block special device identified
by name be unmounted. name 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.
umount() can also request that a file system mounted previously on the directory identified by name be
unmounted. After unmounting the file system, name reverts to its ordinary interpretation.
umount() can be invoked only by the user with the appropriate privilege.
NETWORKING FEATURES
NFS
path must indicate a directory name when unmounting an
NFS file system.
RETURN VALUE
If successful,
umount() returns a value of 0. Otherwise, it returns a value of −1 and sets
errno to
indicate the error.
ERRORS
umount() fails if one or more of the following are true:
[EPERM] The effective user ID of the process is not that of a user with appropriate privileges.
[ENOENT] name does not exist.
[ENOTBLK] name is not a block special device.
[EINVAL] name is not mounted.
[EBUSY] A file on name is busy.
[EFAULT] name points outside the allocated address space of the process. Reliable detection of this
error is implementation dependent.
[ENXIO] The device associated with name does not exist.
[ENOTDIR] A component of name is not a directory.
[ENOENT] name is null.
[ENAMETOOLONG]
name exceeds PATH_MAX bytes, or a component of name exceeds NAME_MAX bytes while
_POSIX_NO_TRUNC is in effect.
[EACCES] A component of the path prefix of name denies search permission.
[ELOOP] Too many symbolic links were encountered in translatingthe path name.
WARNINGS
If umount() is called from the program level (that is, not from the mount(1M) level), the table of
mounted devices contained in
/etc/mnttab is not updated automatically. Updating of
/etc/mnttab
is performed by the mount and syncer commands (see mount(1M) and syncer(1M) for more informa-
tion).
SEE ALSO
mount(1M), syncer(1M), mount(2), vfsmount(2).
STANDARDS CONFORMANCE
umount(): SVID2, SVID3, XPG2
Section 2−−434 − 1 − HP-UX Release 11i: December 2000
___
___