snj doesn't like my accent, so use proper English month names.
[netbsd-mini2440.git] / lib / libp2k / p2k.3
blob6df15864f9be4e56bb6c10a15152d72fbd013eb5
1 .\"     $NetBSD: p2k.3,v 1.3 2009/02/10 14:40:30 pooka Exp $
2 .\"
3 .\" Copyright (c) 2008 Antti Kantee.  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 AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .Dd May 3, 2009
27 .Dt P2K 3
28 .Os
29 .Sh NAME
30 .Nm p2k
31 .Nd puffs to kernel vfs translation library
32 .Sh LIBRARY
33 p2k Library (libp2k, \-lp2k)
34 .Sh SYNOPSIS
35 .In rump/p2k.h
36 .Ft int
37 .Fo p2k_run_fs
38 .Fa "const char *vfsname" "const char *devpath" "const char *mountpath"
39 .Fa "int mntflags" "void *arg" "size_t alen" "uint32_t puffs_flags"
40 .Fc
41 .Sh DESCRIPTION
42 The
43 .Nm
44 library translates the puffs protocol to the kernel vfs protocol and
45 back again.
46 It can therefore be used to mount and run kernel file system code as
47 a userspace daemon.
48 .Pp
49 Calling the library interface function mounts the file system and,
50 if succesful, starts handling requests.
51 The parameters are handled by
52 .Fn ukfs_mount
53 (see
54 .Xr ukfs 3 ) ,
55 with the exception that
56 .Fa mountpath
57 and
58 .Fa puffs_flags
59 are handled by
60 .Xr puffs 3 .
61 .Pp
62 The following environment variables affect the behaviour of puffs.
63 They are useful mostly for debugging purposes.
64 The flags are environment variables because typically the command line
65 arguments to
66 .Nm
67 utilities are parsed using versions not aware of possible puffs flags:
68 for example, the
69 .Xr rump_cd9660 8
70 arguments are really parsed by
71 .Xr mount_cd9660 8 .
72 .Bl -tag -width "XP2K_NOCACHE_PAGE"
73 .It Dv P2K_DEBUG
74 Do not detach from tty and print information about each puffs operation.
75 .It Dv P2K_NODETACH
76 Do not detach from tty.
77 .It Dv P2K_NOCACHE_PAGE
78 Do not use the puffs page cache.
79 .It Dv P2K_NOCACHE_NAME
80 Do not use the puffs name cache.
81 .It Dv P2K_NOCACHE
82 Do not use the puffs page or name cache.
83 .El
84 .Sh SEE ALSO
85 .Xr puffs 3 ,
86 .Xr rump 3 ,
87 .Xr ukfs 3 ,
88 .Xr rump_cd9660 8 ,
89 .Xr rump_efs 8 ,
90 .Xr rump_ext2fs 8 ,
91 .Xr rump_ffs 8 ,
92 .Xr rump_hfs 8 ,
93 .Xr rump_lfs 8 ,
94 .Xr rump_msdos 8 ,
95 .Xr rump_nfs 8 ,
96 .Xr rump_ntfs 8 ,
97 .Xr rump_syspuffs 8 ,
98 .Xr rump_tmpfs 8 ,
99 .Xr rump_udf 8