xref: /netbsd-src/lib/libperfuse/libperfuse.3 (revision b1c86f5f087524e68db12794ee9c3e3da1ab17a0)
1.\" $NetBSD: libperfuse.3,v 1.2 2010/09/01 13:04:11 wiz Exp $
2.\"
3.\" Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
15.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
16.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
18.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24.\" POSSIBILITY OF SUCH DAMAGE.
25.\"
26.Dd August 12, 2010
27.Dt LIBPERFUSE 2
28.Os
29.Sh NAME
30.Nm perfuse_mount ,
31.Nm perfuse_open
32.Nd Request a
33.Xr puffs 3
34mount from
35.Xr perfused 8
36.Sh LIBRARY
37.Lb libperfuse
38.Sh SYNOPSIS
39.In perfuse.h
40.Ft int
41.Fn perfuse_mount "const char *source" "const char *dir" "const char *filesystemtype" "long int mountflags" "void *data"
42.Ft int
43.Fn perfuse_open "const char *path" "int flags"
44.Sh DESCRIPTION
45.Fn perfuse_mount
46sends a mount request to
47.Xr perfused 8 .
48It is intended as a drop-in replacement for
49.Xr mount 2
50for FUSE file systems daemons and libraries, so that they can work with
51.Xr perfused 8 .
52.Pp
53The function prototype mimics Linux's
54.Xr mount 2 ,
55with the following arguments:
56.Bl -tag -width indent
57.It Ar source
58The source file system that will appear in
59.Xr df 1
60and
61.Xr mount 8
62listings.
63Defaults to
64.Pa /dev/fuse
65if
66.Dv NULL .
67.It Ar dir
68The file system mount point.
69.It Ar filesystemtype
70The file system type, as displayed by
71.Xr df 1
72and
73.Xr mount 8 .
74Defaults to
75.Dq fuse
76if
77.Dv NULL .
78.It Ar mountflags
79This contains the same value as a
80.Xr mount 2
81.Ar flags
82argument.
83.It Ar data
84This contains the same value as a
85.Xr mount 2
86.Ar data
87argument.
88.El
89.Pp
90.Fn perfuse_open
91is a drop-in replacement for the
92.Xr open 2
93system call where
94.Pa /dev/fuse
95is used.
96If
97.Ar path
98is different than
99.Pa /dev/fuse ,
100.Fn perfuse_open
101handles control to the regular
102.Xr open 2 .
103.Sh RETURN VALUES
104.Fn perfuse_mount
105returns a file descriptor to the
106.Pa /dev/fuse
107socket on success, and causes exit on failure.
108.\".Sh ERRORS
109.\".Fn perfuse_mount
110.\"will fail when one of the following occurs:
111.\".Bl -tag -width Er
112.\".El
113.Sh SEE ALSO
114.Xd df 1 ,
115.Xr mount 2 ,
116.Xr open 2 ,
117.Xr mount 8 ,
118.Xr perfused 8
119.Sh AUTHORS
120The program was written by
121.An Emmanuel Dreyfus
122.Aq manu@NetBSD.org .
123