.Os BSD 4
.Sh NAME
.Nm mount ,
+.Nm fmount,
.Nm unmount
.Nd mount or dismount a filesystem
.Sh SYNOPSIS
.Ft int
.Fn mount "const char *type" "const char *dir" "int flags" "void *data"
.Ft int
+.Fn fmount "const char *type" "int fd" "int flags" "void *data"
+.Ft int
.Fn unmount "const char *dir" "int flags"
.Sh DESCRIPTION
The
Union with underlying filesystem instead of obscuring it.
.It Dv MNT_SYNCHRONOUS
All I/O to the filesystem should be done synchronously.
+.It Dv MNT_CPROTECT
+Enable data protection on the filesystem if the filesystem is configured for it.
.El
.Pp
The flag
manual page for each filesystem.
.Pp
The
-.Fn umount
+.Fn fmount
+function call is equivalent to the
+.Fn mount
+function call, except in the use of the second argument.
+It takes an open file descriptor representing mount point
+instead of the string literal containing full path to the mount
+point in the filesystem hierarchy.
+.Pp
+The
+.Fn unmount
function call disassociates the filesystem from the specified
mount point
.Fa dir .
.Sh RETURN VALUES
The
.Fn mount
-returns the value 0 if the mount was successful, otherwise -1 is returned
+and
+.Fn fmount
+return the value 0 if the mount was successful, otherwise -1 is returned
and the variable
.Va errno
is set to indicate the error.
.Pp
-.Nm Umount
-returns the value 0 if the umount succeeded; otherwise -1 is returned
+.Nm unmount
+returns the value 0 if the unmount succeeded; otherwise -1 is returned
and the variable
.Va errno
is set to indicate the error.
.Sh ERRORS
-.Fn Mount
+.Fn mount
+and
+.Fn fmount
will fail when one of the following occurs:
.Bl -tag -width [ENAMETOOLONG]
.It Bq Er EPERM
points outside the process's allocated address space.
.El
.Pp
-.Nm Umount
+.Nm unmount
may fail with one of the following errors:
.Bl -tag -width [ENAMETOOLONG]
.It Bq Er EPERM
.El
.Sh SEE ALSO
.Xr mount 8 ,
-.Xr umount 8
+.Xr unmount 8 ,
+.Xr open 2
.Sh BUGS
Some of the error codes need translation to more obvious messages.
.Sh HISTORY
-.Fn Mount
+.Fn mount
and
-.Fn umount
+.Fn unmount
function calls appeared in
.At v6 .
+.Fn fmount
+function call first appeared in macOS version 10.13.