umount()

unmount file systems 

Function


SYNOPSIS

#include <unistd.h>

int umount(int const char *file);


DESCRIPTION

The umount() requests that a previously mounted file system contained on the volume (a bit like a UNIX block special device in this context), or network share, or subst identified by file be unmounted. file is a pointer to a path name. After unmounting the file system, the directory or drive letter upon which the file system was mounted reverts to its ordinary interpretation.


EXAMPLES

The command:

umount("r:/")

unmounts any volume, subst, or network share on r:/ and leaves r:/ as an unused drive letter.

The command:

umount("//?/Volume{2a537b5c-924e-11d7-a242-806e6f6e6963}/");

unmounts //?/Volume{2a537b5c-924e-11d7-a242-806e6f6e6963}/ from every location it is mounted on.


PARAMETERS

file 

is the path of a mounted file system which is to be unmounted.


RETURN VALUES

If successful, umount() returns a value of zero. On failure, it returns -1 and sets errno to one of the following values:

EFAULT 

file is an invalid pointer.

EINVAL 

file contains an invalid character.

EINVAL 

file is not mounted.

ENAMETOOLONG 

The length of the file parameter exceeds PATH_MAX or a path name component is longer than NAME_MAX.


CONFORMANCE

UNIX 98, with exceptions.


PORTING ISSUES

Block special devices do not exist under Windows; however, there are several types of paths which can be specified that serve the same purpose as a mount point in umount().

The mount() function can mount a file system in several different ways depending upon the capabilities of the host system, and also upon the arguments passed to mount(). The umount() function can undo the action of any successful call to the mount() function.

The mount() and umount() functions do not maintain a /etc/mnttab file.


SEE ALSO

Commands:
mount, umount

Functions:
mount()


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Professional Developers 64-Bit Edition
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


PTC MKS Toolkit 10.4 Documentation Build 39.