MOUNT(2)

NAME
mount, umount - mount and unmount filesystems.

SYNOPSIS
#include <sys/mount.h>

int mount(const char *specialfile, const char * dir , const char * filesystemtype, unsigned long rwflag , const void * data);

int umount(const char *specialfile);

DESCRIPTION
mount attaches the filesystem specified by specialfile (which is often a device name) to the directory specified by dir. umount removes the attachment of the filesystem specified by specialfile. Only the super-user may mount and unmount filesystems.

RETURN VALUE
On success, zero is returned. On error, -1 is returned, and errno is set appropriately.

ERRORS
The errors are far too numerous to be completely list here. Further, each filesystem type may have its own special errors and its own special behavior. See the kernel source code for details.

EPERM
    The user is not the super-user.

ENODEV
    Specialfile is not valid.

ENOTBLK
    Specialfile is not a block device (if a device was required).

EACCES
    Permission to read the inode is not available.

ENXIO
    The major number of specialfile is out of range.

EINVAL
    A parameter was invalid.

CONFORMING TO
These function are completely Linux-specific.

SEE ALSO
mount(8), umount(8)