summaryrefslogtreecommitdiff
path: root/static/openbsd/man3/fuse_setup.3
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:54:44 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-25 19:54:44 -0400
commita9157ce950dfe2fc30795d43b9d79b9d1bffc48b (patch)
tree9df484304b560466d145e662c1c254ff0e9ae0ba /static/openbsd/man3/fuse_setup.3
parent160aa82b2d39c46ad33723d7d909cb4972efbb03 (diff)
docs: Added All OpenBSD Manuals
Diffstat (limited to 'static/openbsd/man3/fuse_setup.3')
-rw-r--r--static/openbsd/man3/fuse_setup.397
1 files changed, 97 insertions, 0 deletions
diff --git a/static/openbsd/man3/fuse_setup.3 b/static/openbsd/man3/fuse_setup.3
new file mode 100644
index 00000000..6ba8b547
--- /dev/null
+++ b/static/openbsd/man3/fuse_setup.3
@@ -0,0 +1,97 @@
+.\" $OpenBSD: fuse_setup.3,v 1.5 2025/09/23 09:28:28 schwarze Exp $
+.\"
+.\" Copyright (c) 2018 Helg Bredow <helg.bredow@openbsd.org>
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate: September 23 2025 $
+.Dt FUSE_SETUP 3
+.Os
+.Sh NAME
+.Nm fuse_setup
+.Nd FUSE helper function
+.Sh SYNOPSIS
+.Lb libfuse
+.In fuse.h
+.Ft struct fuse *
+.Fn fuse_setup "int argc" "char **argv" \
+ "const struct fuse_operations *ops" "size_t size" "char **mp" \
+ "int *mt" "void *data"
+.Sh DESCRIPTION
+.Fn fuse_setup
+is a helper function that mounts a FUSE file system, creates a new FUSE
+session and installs signal handlers that will try to unmount the file
+system on
+.Dv SIGINT ,
+.Dv SIGTERM ,
+or
+.Dv SIGHUP .
+.Pp
+.Fn fuse_setup
+parses the arguments specified by
+.Fa argv ,
+and if neither the
+.Fl f ,
+.Fl d ,
+or
+.Fl odebug
+options were specified, detaches from the controlling terminal
+and runs in the background.
+On success,
+.Fa mt
+is set to 1 if the file system operations will be invoked in
+parallel (multi-threaded) or to 0 if file system operations are serialized.
+File systems that do not support multi-threaded operation must include the
+.Fl s
+argument in
+.Fa argv .
+.Ox
+does not currently support multi-threaded operation.
+.Pp
+The file system will be mounted on
+.Fa mp ,
+which is the directory specified by the first
+argument that does not match one of the options recognised by
+.Xr fuse_parse_cmdline 3 .
+.Pp
+.Fa fuse_operations
+is a struct of size
+.Fa size
+that contains pointers to FUSE file system operations.
+See
+.Xr fuse_new 3 .
+.Sh RETURN VALUES
+.Fn fuse_setup
+returns
+.Dv NULL
+on failure.
+.Sh SEE ALSO
+.Xr fuse_main 3 ,
+.Xr fuse_mount 3 ,
+.Xr fuse_new 3 ,
+.Xr fuse_parse_cmdline 3 ,
+.Xr fuse_set_signal_handlers 3 ,
+.Xr fuse_teardown 3 ,
+.Xr fuse 4
+.Sh STANDARDS
+The
+.Fn fuse_setup
+function conforms to FUSE 2.6.
+.Sh HISTORY
+The
+.Fn fuse_setup
+function first appeared in
+.Ox 5.4 .
+.Sh AUTHORS
+.An Sylvestre Gallon Aq Mt ccna.syl@gmail.com
+.An Helg Bredow Aq Mt helg@openbsd.org