man.bsd.lv manual page server

Manual Page Search Parameters

MOUNTCTL(2) System Calls Manual MOUNTCTL(2)

mountctlexecute a mount control operation

library “libc”

#include <sys/mountctl.h>

int
mountctl(const char *path, int op, int fd, void *ctl, int ctllen, void *buf, int buflen);

The () system call executes the mount control operation op on the mount point path. An optional file descriptor fd can be passed, or set to -1 if unneeded. The ctl argument is for passing operation specific data and usually points to some struct (see CONTROL OPERATIONS for further information). The data's size is specified by ctllen. The buf and buflen arguments are used if the operation needs to return data to the caller or set to NULL and 0 if unused.

The following operations are defined in <sys/mountctl.h>:

Set export control of a filesystem. This operation needs a struct export_args passed in ctl. Note that export control for numerous filesystems may still only be settable with mount(2). New software should attempt to use mountctl() before using the old mount(2) method.
Install a journal on a mount point. This operation needs a struct mountctl_install_journal passed in ctl. The journal file must be specified via fd. A mount point may have multiple journals attached to it.
Disassociate a journal from a mount point. This operation needs a struct mountctl_remove_journal passed in ctl.
Restart a journal with a new descriptor. This operation needs a struct mountctl_restart_journal passed in ctl. The journal file must be specified via fd.
Return a journal's status. This operation needs a struct mountctl_status_journal passed in ctl and an array of struct mountctl_journal_ret_status in buf.
It will store a comma separated string buffer in the buf parameter with the name list of the currently set user mount flags. The buf will be sized at most buflen bytes.

Upon successful completion, the number of copied bytes is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

The mountctl() function will fail when one of the following occurs:

[]
Fd is not an active descriptor.
[]
The specified ctllen is not 0-1024, buflen is not 0-16384, or path is NULL.
[]
The caller is not the super-user.

mount(2), mountctl(8)

The mountctl() system call first appeared in DragonFly 1.1.

The mountctl() system call was written by Matthew Dillon and this manual page was written by Sascha Wildner.

July 21, 2009 DragonFly-5.6.1