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 February 10, 2009 27.Dt P2K 3 28.Os 29.Sh NAME 30.Nm p2k 31.Nd puffs to kernel vfs translation library 32.Sh LIBRARY 33p2k 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 42The 43.Nm 44library translates the puffs protocol to the kernel vfs protocol and 45back again. 46It can therefore be used to mount and run kernel file system code as 47a userspace daemon. 48.Pp 49Calling the library interface function mounts the file system and, 50if succesful, starts handling requests. 51The parameters are handled by 52.Fn ukfs_mount 53(see 54.Xr ukfs 3 ) , 55with the exception that 56.Fa mountpath 57and 58.Fa puffs_flags 59are handled by 60.Xr puffs 3 . 61.Pp 62The following environment variables affect the behaviour of puffs. 63They are useful mostly for debugging purposes. 64The flags are environment variables because typically the command line 65arguments to 66.Nm 67utilities are parsed using versions not aware of possible puffs flags: 68for example, the 69.Xr rump_cd9660 8 70arguments are really parsed by 71.Xr mount_cd9660 8 . 72.Bl -tag -width "XXXP2K_NODETACH" 73.It Dv P2K_DEBUG 74Do not detach from tty and print information about each puffs operation. 75.It Dv P2K_NODETACH 76Do not detach from tty. 77.El 78.Sh SEE ALSO 79.Xr puffs 3 , 80.Xr rump 3 , 81.Xr ukfs 3 , 82.Xr rump_cd9660 8 , 83.Xr rump_efs 8 , 84.Xr rump_ext2fs 8 , 85.Xr rump_ffs 8 , 86.Xr rump_hfs 8 , 87.Xr rump_lfs 8 , 88.Xr rump_msdos 8 , 89.Xr rump_nfs 8 , 90.Xr rump_ntfs 8 , 91.Xr rump_syspuffs 8 , 92.Xr rump_tmpfs 8 , 93.Xr rump_udf 8 94