DragonFly On-Line Manual Pages
MOUNTCTL(2) DragonFly System Calls Manual MOUNTCTL(2)
mountctl -- execute a mount control operation
Standard C Library (libc, -lc)
mountctl(const char *path, int op, int fd, void *ctl, int ctllen,
void *buf, int buflen);
The mountctl() 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 fur-
ther 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 jour-
nals 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 parame-
ter 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; oth-
erwise 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:
[EBADF] Fd is not an active descriptor.
[EINVAL] The specified ctllen is not 0-1024, buflen is not
0-16384, or path is NULL.
[EPERM] The caller is not the super-user.
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.
DragonFly 3.7 July 21, 2009 DragonFly 3.7