Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

umount - unmount file system (extension)

&pagelevel(4)&pagelevel

Syntax

#include <sys/mount.h>

int umount(const char *path); 

Description

umount() can be used to unmount a file system that was mounted earlier with mount() under the directory pointed to by path (mount point). The path argument may point to a block-special file or a directory. After unmounting the file system, the directory in which the file system was mounted reverts to its ordinary interpretation.

Return val.

0

-1

upon successful completion.

if an error occurs. errno is set to indicate the error.

Errors

umount() will fail if:

 

EBUSY

A file in path is being used.

 

EFAULT

path points to an invalid address.

 

EINVAL

path does not exist
or path has not been mounted.

 

ELOOP

Too many symbolic links were encountered when resolving the path pointed to by path.

 

ENAMETOOLONG 



path is longer than {PATH_MAX}, or the length of a path component exceeds {NAME_MAX}.

 

ENOTBLK

path is not a block-special file.

 

EPERM

The effective user ID is not that of a process with appropriate privileges.

 

EREMOTE

path points to a remote pathname.

Notes

umount() may only be called under the effective user ID of a process with appropriate privileges.

umount() is executed only for POSIX files.

See also

mount(), sys/mount.h.