ref: 4188bd49fb2f26b34beae05e162a20be567f8019
parent: 197550f634b54088c39c337ce55f6b01097659b8
author: kvik <[email protected]>
date: Tue Apr 23 14:34:15 EDT 2019
write manual page
--- a/mkfile
+++ b/mkfile
@@ -3,5 +3,8 @@
TARG=unionfs
OFILES=$TARG.$O
BIN=$home/bin/$objtype
+MAN=/sys/man/4
</sys/src/cmd/mkone
+
+install:V: $TARG.man
--- /dev/null
+++ b/unionfs.man
@@ -1,0 +1,95 @@
+.TH UNIONFS 4
+.SH NAME
+unionfs \- union file server
+.SH SYNOPSIS
+.B unionfs
+[
+.B -D
+]
+[
+.B -abC
+]
+.B -m
+.I mtpt
+|
+.B -s
+.I srvname
+[
+[
+.B -c
+]
+.I path ....
+]
+.SH DESCRIPTION
+.PP
+.I Unionfs
+serves a file tree that represents a deep
+merge of the file trees given by one or
+more of the
+.I path
+arguments.
+.PP
+Unlike the namespace operators described in
+.IR bind (2),
+which merge directory contents
+only on a single - mountpoint - level,
+.I unionfs
+does a deep merge. This means that
+if more than one file tree contains a
+directory of the same name at any
+point in the union tree, traversing that
+point will return the combined content
+of the overlapping directories - instead
+of only the first one in the union list.
+.PP
+An ordered list of
+.I path
+arguments must be given. This list
+influences the tree walking and other file
+operations in a similar fashion as the
+system-provided union lists.
+If the
+.I -c
+flag is prefixed to the path, that tree
+will be marked as the target for file
+creation; otherwise the first path in the
+list will be used.
+.PP
+Either of the
+.I -m
+or
+.I -s
+options is required; the former specifies
+a mount point at which to mount the
+file server and the latter causes the
+server file descriptor to be posted to the
+.IR srv (3)
+device.
+.PP
+The options
+.I -a, -b
+and
+.I -C
+control the mounting of the file server at
+.I mtpt
+as described in
+.IR bind (1).
+.PP
+The
+.I -D
+option causes
+.IR 9p (2)
+trace to be output to the standard error
+during runtime.
+.SS Examples
+.EX
+unionfs -m /bin /rc/bin /arm/bin -c $home/bin/^(rc arm)
+.EE
+.SH SEE ALSO
+.IR bind (1),
+.IR bind (2)
+.SH SOURCE
+.B https://bitbucket.org/k-vik/unionfs
+.SH BUGS
+.PP
+You're.