Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

mount(1M)

syncer(1M)

mount(2)

vfsmount(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 translating the 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 information).

DEPENDENCIES

HP Clustered Environment:
When umount() is called from a client node and path refers to a directory on which is mounted a UFS file system (as opposed to an NFS file system; see vfsmount(2)), an EINVAL error is returned.  This behavior is subject to change in future releases, and its use in applications is not recommended. 

SEE ALSO

mount(1M), syncer(1M), mount(2), vfsmount(2). 

STANDARDS CONFORMANCE

umount(): SVID2, XPG2

Hewlett-Packard Company  —  HP-UX Release 9.0: August 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026