Removes a virtual file system from the file tree.
int umount (Device) char *Device;
#include <sys/vmount.h>
int uvmount (VirtualFileSystemID, Flag) int VirtualFileSystemID; int Flag;
The umount and uvmount subroutines remove a virtual file system (VFS) from the file tree.
The umount subroutine unmounts only file systems mounted from a block device (a special file identified by its path to the block device).
In addition to local devices, the uvmount subroutine unmounts local or remote directories, identified by the VirtualFileSystemID parameter.
Only a calling process with root user authority or in the system group and having write access to the mount point can unmount a device, file and directory mount.
Upon successful completion a value of 0 is returned. Otherwise, a value of -1 is returned, and the errno global variable is set to indicate the error.
The uvmount subroutine fails if one of the following is true:
EPERM | The calling process does not have write permission to the root of the VFS, the mounted object is a device or remote, and the calling process does not have root user authority. |
EINVAL | No VFS with the specified VirtualFileSystemID parameter exists. |
EBUSY | A device that is still in use is being unmounted. |
The umount subroutine fails if one of the following is true:
EPERM | The calling process does not have root user authority. |
ENOENT | The Device parameter does not exist. |
ENOBLK | The Device parameter is not a block device. |
EINVAL | The Device parameter is not mounted. |
EINVAL | The Device parameter is not local. |
EBUSY | A process is holding a reference to a file located on the file system. |
The umount subroutine can be unsuccessful for other reasons. For a list of additional errors, see Appendix A, "Base Operating System Error Codes for Services That Require Path-Name Resolution."
These subroutines are part of Base Operating System (BOS) Runtime.
The mount subroutine.
The mount command, umount command.
Mounting Overview in AIX Version 4.3 System Management Guide: Operating System and Devices.
Files, Directories, and File Systems for Programmers in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.
Understanding Mount Helpers in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs explains and examines the execution syntax of mount helpers.