From 78e51a8c6678b6e3dff3d619aa786669f531f4bc Mon Sep 17 00:00:00 2001 From: rsc Date: Fri, 14 Jan 2005 03:45:44 +0000 Subject: checkpoint --- man/man3/proto.html | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 140 insertions(+) create mode 100644 man/man3/proto.html (limited to 'man/man3/proto.html') diff --git a/man/man3/proto.html b/man/man3/proto.html new file mode 100644 index 00000000..59e4fccd --- /dev/null +++ b/man/man3/proto.html @@ -0,0 +1,140 @@ + +proto(3) - Plan 9 from User Space + + + + +
+
+
PROTO(3)PROTO(3) +
+
+

NAME
+ +
+ + rdproto – parse and process a proto file listing
+ +
+

SYNOPSIS
+ +
+ + #include <u.h>
+ #include <libc.h>
+ #include <disk.h>
+ +
+
+ typedef void Protoenum(char *new, char *old, Dir *d, void *a)
+ +
+
+ typedef void Protowarn(char *msg, void *a)
+ +
+
+ int rdproto(char *proto, char *root, Protoenum *enm,
+ +
+ + +
+ + Protowarn *warn, void *a)
+ +
+ +
+
+
+

DESCRIPTION
+ +
+ + Rdproto reads and interprets the named proto file relative to + the root directory root. +
+ + Each line of the proto file specifies a file to copy. Blank lines + and lines beginning with # are ignored. Indentation (usually tabs) + is significant, with each level of indentation corresponding to + a level in the file tree. Fields within a line are separated by + white space. The first field is the last path element in the destination + file tree. The second field specifies the permissions. The third + field is the owner of the file, and the fourth is the group owning + the file. The fifth field is the name of the file from which to + copy; this file is read from the current name space, not the source + file tree. All fields except the first are optional. Specifying + for + permissions, owner, or group causes rdproto to fetch the corresponding + information from the file rather than override it. (This is the + default behavior when the fields are not present; explicitly specifying + is useful when one wishes to set, say, the file owner without + setting the permissions.) +
+ + Names beginning with a $ are expanded as environment variables. + If the first file specified in a directory is *, all of the files + in that directory are considered listed. If the first file is + +, all of the files are copied, and all subdirectories are recursively + considered listed. All files are considered relative to root. + +
+ + For each file named by the proto, enm is called with new pointing + at the name of the file (without the root prefix), old pointing + at the name of the source file (with the root prefix, when applicable), + and Dir at the desired directory information for the new file. + Only the name, uid, gid, mode, mtime, and length fields + are guaranteed to be valid. The argument a is the same argument + passed to rdproto; typically it points at some extra state used + by the enumeration function. +
+ + When files or directories do not exist or cannot be read by rdproto, + it formats a warning message, calls warn, and continues processing; + if warn is nil, rdproto prints the warning message to standard + error. +
+ + Rdproto returns zero if proto was processed, –1 if it could not + be opened.
+ +
+

FILES
+ +
+ + /sys/lib/sysconfig/proto/           directory of prototype files.
+ /sys/lib/sysconfig/proto/portproto   generic prototype file.
+ +
+

SOURCE
+ +
+ + /usr/local/plan9/src/libdisk/proto.c
+
+
+

SEE ALSO
+ +
+ + mk9660(8), Plan 9’s mkfs(8)
+ +
+ +

+
+
+ + +
+
+
+Space Glenda +
+
+ + -- cgit v1.2.3