FUSE_MOUNT(3)

NAME
fuse_mount, fuse_unmount - mount or dismount a FUSE file system

SYNOPSIS
libfuse
#include <fuse.h>
struct fuse_chan *
fuse_mount(const char *dir, struct fuse_args *args);
void
fuse_unmount(const char *dir, struct fuse_chan *ch);

DESCRIPTION
The fuse_mount() function calls the mount(2) system call to graft the FUSE file system on to the file system tree at the point dir. args are FUSE specific mount options as documented by mount(2).

The following mount options can be specified by preceding them with -o, either individually or together separated by a comma.

allow_other
    Allow other users to access the file system. By default, FUSE prevents other users from accessing the file system or to statfs(2) the file system. This security measure is particularly important for network file system that may expose private files. It also guards against system processes being blocked indefinitely if the file system stops responding.

default_permissions
    Request that the kernel enforce file access permissions. Alternatively, FUSE file systems can choose to implement access checks internally. On OpenBSD, this option is always set.

kernel_cache
    Enables buffering of files in the kernel. Not recommended for file systems that can be updated external to FUSE, such as network file systems. Not implemented.

max_read=%u
    Specify the maximum size of read operations. Note that the kernel limits this to FUSEBUFMAXSIZE. This option should not be specified on the command line. The correct (or optimum) value depends on the filesystem implementation and should thus be specified by the filesystem internally.

ro  Mount the file system read-only. Can also be specified by itself with -r.

fuse_unmount() closes the FUSE device and attempts to unmount the file system mounted at dir by calling the unmount(2) system call. To avoid a deadlock, the kernel will not send the FBT_DESTROY message to the file system. There is no way to determine whether this call was successful.

Only the super user can mount and unmount FUSE file systems.

RETURN VALUES
fuse_main() returns NULL if the file system cannot be mounted.

ERRORS
fuse_mount() fails when one of the following occurs: dir does not exist or is not a directory. The fuse device cannot be opened for reading and writing. There was an error parsing the options specified by args. The file system could not be mounted.

SEE ALSO
mount(2), fuse_main(3), fuse_setup(3), fuse(4)

STANDARDS
The fuse_mount() and fuse_unmount() functions conforms to FUSE 2.6.

HISTORY
The fuse_mount() and fuse_unmount() functions first appeared in OpenBSD 5.4.

AUTHORS
Sylvestre Gallon <ccna.syl@gmail.com> Helg Bredow <helg@openbsd.org>