3 rdproto \- parse and process a proto file listing
13 typedef void Protoenum(char *new, char *old, Dir *d, void *a)
16 typedef void Protowarn(char *msg, void *a)
19 int rdproto(char *proto, char *root, Protoenum *enm,
22 Protowarn *warn, void *a)
25 reads and interprets the named
33 file specifies a file to copy.
34 Blank lines and lines beginning with
37 Indentation (usually tabs) is significant,
38 with each level of indentation corresponding to a level in the file tree.
39 Fields within a line are separated by white space.
40 The first field is the last path element in the destination file tree.
41 The second field specifies the permissions.
42 The third field is the owner of the file,
43 and the fourth is the group owning the file.
44 The fifth field is the name of the file from which to copy;
45 this file is read from the current name space,
46 not the source file tree.
47 All fields except the first are optional.
50 for permissions, owner, or group
53 to fetch the corresponding information
54 from the file rather than override it.
55 (This is the default behavior when the fields
56 are not present; explicitly specifying
58 is useful when one wishes to set, say,
59 the file owner without setting the permissions.)
61 Names beginning with a
63 are expanded as environment variables.
64 If the first file specified in a directory is
66 all of the files in that directory are considered listed.
69 all of the files are copied, and all subdirectories
70 are recursively considered listed.
71 All files are considered relative to
74 For each file named by the
79 pointing at the name of the file (without the root prefix),
81 pointing at the name of the source file (with the root prefix,
85 at the desired directory information for the new file.
94 fields are guaranteed to be valid.
97 is the same argument passed to
99 typically it points at some extra state
100 used by the enumeration function.
102 When files or directories do not exist or
105 it formats a warning message, calls
107 and continues processing;
112 prints the warning message to standard error.
118 was processed, \-1 if it could not be opened.
120 .TF /sys/lib/sysconfig/proto/portproto
122 .B /sys/lib/sysconfig/proto/
123 directory of prototype files.
125 .B /sys/lib/sysconfig/proto/portproto
126 generic prototype file.
128 .B \*9/src/libdisk/proto.c
131 Plan 9's \fImkfs\fR(8)