NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | USAGE | SEE ALSO
#include <sys/mount.h>int umount(const char *file);
The umount() function requests that a previously mounted file system contained on the block special device or directory identified by file be unmounted. The file argument 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.
Upon successful completion, 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error.
The umount() function will fail if:
A file on file is busy.
The file pointed to by file points to an illegal address.
The file pointed to by file is not mounted.
The file pointed to by file does not exist.
Too many symbolic links were encountered in translating the path pointed to by file.
The length of the file argument exceeds PATH_MAX, or the length of a file component exceeds NAME_MAX while _POSIX_NO_TRUNC is in effect.
The file pointed to by file is on a remote machine, and the link to that machine is no longer active.
The file pointed to by file is not a block special device.
The process's effective user ID is not super-user.
The file pointed to by file is remote.
The umount() function may be invoked only by the super-user.
NAME | SYNOPSIS | DESCRIPTION | RETURN VALUES | ERRORS | USAGE | SEE ALSO