libperfuse.3 revision 1.2
$NetBSD: libperfuse.3,v 1.2 2010/09/01 13:04:11 wiz Exp $

Copyright (c) 2010 Emmanuel Dreyfus. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

.Dd August 12, 2010 .Dt LIBPERFUSE 2 .Os .Sh NAME .Nm perfuse_mount , .Nm perfuse_open .Nd Request a .Xr puffs 3 mount from .Xr perfused 8 .Sh LIBRARY .Lb libperfuse .Sh SYNOPSIS n perfuse.h .Ft int .Fn perfuse_mount "const char *source" "const char *dir" "const char *filesystemtype" "long int mountflags" "void *data" .Ft int .Fn perfuse_open "const char *path" "int flags" .Sh DESCRIPTION .Fn perfuse_mount sends a mount request to .Xr perfused 8 . It is intended as a drop-in replacement for .Xr mount 2 for FUSE file systems daemons and libraries, so that they can work with .Xr perfused 8 .

p The function prototype mimics Linux's .Xr mount 2 , with the following arguments: l -tag -width indent t Ar source The source file system that will appear in .Xr df 1 and .Xr mount 8 listings. Defaults to

a /dev/fuse if .Dv NULL . t Ar dir The file system mount point. t Ar filesystemtype The file system type, as displayed by .Xr df 1 and .Xr mount 8 . Defaults to .Dq fuse if .Dv NULL . t Ar mountflags This contains the same value as a .Xr mount 2 .Ar flags argument. t Ar data This contains the same value as a .Xr mount 2 .Ar data argument. .El

p .Fn perfuse_open is a drop-in replacement for the .Xr open 2 system call where

a /dev/fuse is used. If .Ar path is different than

a /dev/fuse , .Fn perfuse_open handles control to the regular .Xr open 2 . .Sh RETURN VALUES .Fn perfuse_mount returns a file descriptor to the

a /dev/fuse socket on success, and causes exit on failure. .Sh ERRORS
.Fn perfuse_mount
will fail when one of the following occurs:
.Bl -tag -width Er
.El
.Sh SEE ALSO .Xd df 1 , .Xr mount 2 , .Xr open 2 , .Xr mount 8 , .Xr perfused 8 .Sh AUTHORS The program was written by .An Emmanuel Dreyfus .Aq manu@NetBSD.org .