NAME [Toc] [Back]
umount - unmount a file system
SYNOPSIS [Toc] [Back]
int umount(const char *name);
DESCRIPTION [Toc] [Back]
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
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
NETWORKING FEATURES [Toc] [Back]
path must indicate a directory name when unmounting an NFS file
RETURN VALUE [Toc] [Back]
If successful, umount() returns a value of 0. Otherwise, it returns a
value of -1 and sets errno to indicate the error.
ERRORS [Toc] [Back]
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
[ENXIO] The device associated with name does not exist.
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003
[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
[EACCES] A component of the path prefix of name denies search
[ELOOP] Too many symbolic links were encountered in translating
the path name.
WARNINGS [Toc] [Back]
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 information).
SEE ALSO [Toc] [Back]
mount(1M), syncer(1M), mount(2), vfsmount(2).
STANDARDS CONFORMANCE [Toc] [Back]
umount(): SVID2, SVID3, XPG2
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003 [ Back ]