MOUNT(2)

NAME
mount, umount - mount and unmount filesystems.

SYNOPSIS
#include <unistd.h>

int mount (const char *devname, const char *dirname, const char *filesystemtype, unsigned long rw_flag, const void *data);

int umount (const char *devname);

DESCRIPTION
mount() mounts the filesystem on the block device named *devname onto the directory dirname

umount() unmounts the specified block device.

0 is returned on success, a negative value on error.

ERRORS
-EBUSY is returned under the following conditions:

1.  There is activity in the directory you are trying to mount on

2.  You are attempting to mount on /.

3.  There is file system activity during umount, which could be as simple as a process having a directory under the mount point as wd.

-ENOENT is returned if the block device or directory does not exist.

-ENOTBLK is returned if you attempt to unmount a non-block device.

-EPERM is returned under the following conditions:

1.  You attempt to mount a non-block device.

2.  You attempt to mount on a non-directory.

3.  The filesystem is already mounted.

SEE ALSO
mount(1), umount(1), mtab(5), fstab(5)