xref: /netbsd-src/lib/libperfuse/libperfuse.3 (revision 179b12252ecaf3553d9c2b7458ce62b6a2203d0c)
1.\" $NetBSD: libperfuse.3,v 1.1 2010/08/25 07:16:00 manu 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.ds str-Lb-libperfuse        PUFFS enabled relay to FUSE Library (libperfuse, \-lperfuse)
27.Dd August 12, 2010
28.Dt LIBPERFUSE 2
29.Os
30.Sh NAME
31.Nm perfuse_mount ,
32.Nm perfuse_open
33.Nd Request a
34.Xr puffs 3 mount 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 filesystems 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 fileystem that will appear in
59.Xr df 1 ,
60and
61.Xr mount 8
62listings. Defaults to
63.Pa /dev/fuse
64if NULL.
65.It Ar dir
66The filesystem mount point.
67.It Ar filesystemtype
68The gileystem type, as displayed by
69.Xr df 1 ,
70and
71.Xr mount 8 .
72Defaults to "fuse"
73if NULL.
74.It Ar mountflags
75This contains the same value as in
76.Xr mount 2
77.Ar flags
78argument.
79.It Ar data
80This contains the same value as in
81.Xr mount 2
82.Ar data
83argument.
84.El
85.Pp
86.Fn perfuse_open
87is a drop-in replacement for the
88.Xr open 2
89system call where
90.Pa /dev/fuse
91is used. If
92.Ar path
93is different than
94.Pa /dev/fuse ,
95.Fn perfuse_open
96handles control to the regular
97.Xr open 2 .
98.Sh RETURN VALUES
99.Fn perfuse_mount
100returns a file descriptor to the
101.Pa /dev/fuse
102socket on success, and cause exit on failure.
103.Sh ERRORS
104.Fn perfuse_mount
105will fail when one of the following occurs:
106.Bl -tag -width Er
107.El
108.Sh SEE ALSO
109.Xd df 1 ,
110.Xr mount 2 ,
111.Xr open 2 ,
112.Xr mount 8 ,
113.Xr perfused 8
114.Sh AUTHORS
115The program was written by
116.An Emmanuel Dreyfus
117.Aq manu@NetBSD.org .
118