1 .\" $NetBSD: puffs_path.3,v 1.4 2009/02/20 14:26:56 pooka Exp $
3 .\" Copyright (c) 2007 Antti Kantee. All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
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.
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
31 .Nd puffs pathbuilding routines
38 .Fa "struct puffs_usermount *pu" "const struct puffs_pathobj *po_dir"
39 .Fa "const struct puffs_pathobj *po_comp" "size_t offset"
40 .Fa "struct puffs_pathobj *po_new"
43 .Fo pu_pathtransform_fn
44 .Fa "struct puffs_usermount *pu" "const struct puffs_pathobj *po_base"
45 .Fa "const struct puffs_cn *pcn" "struct puffs_pathobj *po_new"
49 .Fa "struct puffs_usermount *pu" "struct puffs_pathobj *po1"
50 .Fa "struct puffs_pathobj *po2" "size_t checklen" "int checkprefix"
53 .Fn pu_pathfree_fn "struct puffs_usermount *pu" "struct puffs_pathobj *po"
56 .Fa "struct puffs_usermount *pu" "struct puffs_pathobj *po_dir"
57 .Fa "struct puffs_cn *pcn"
59 .Ft struct puffs_pathobj *
60 .Fn puffs_getrootpathobj "struct puffs_usermount *pu"
62 The puffs library has the ability to provide full pathnames for backends
64 Normal file systems should be constructed without the file system
65 node tied to a file name and should not used routines described herein.
66 An example of a file system where the backend requires filenames is
69 The features described here are enabled by passing
70 .Dv PUFFS_FLAG_BUILDPATH
73 This facility requires to use puffs nodes to store the contents of the
75 Either the address of the operation cookie must directly be that of the
78 must be used to set a mapping function from the cookie to the puffs
79 node associated with the cookie.
80 Finally, the root node for the file system must be set using
82 and the root path object retrieved using
83 .Fn puffs_getrootpathobj
86 There are two different places a filename can be retrieved from.
87 It is available for each puffs node after the node has been registered
88 with the framework, i.e.
90 the routine creating the node returns.
91 In other words, there is a window between the node is created and
92 when the pathname is available and multithreaded file systems must
93 take this into account.
94 The second place where a pathname is available is from the componentname
96 in operations which are passed one.
97 These can be retrieved using the convenience macros
101 for node and componentname, respectively.
102 The type of object they return is
105 By default the framework manages "regular" filenames, which consist
106 of directory names separated by "/" and a final component.
107 If the file system wishes to use pathnames of this format, all it
108 has to do it enable the feature.
109 Everything else, including bookkeeping for node and directory renames,
110 is done by the library.
111 The callback routines described next provide the ability to build
112 non-standard pathnames.
115 callback is set using the
119 This manual page is still unfinished.
120 Please take a number and wait in line.
125 .\".Xr mount_sysctlfs 8