This commit is contained in:
aiju 2011-04-15 21:03:43 +02:00
commit 0159ee648e
2 changed files with 13 additions and 2 deletions

View file

@ -6,6 +6,9 @@ cwfs \- cached-worm file server, dump
[ [
.B -csC .B -csC
] [ ] [
.B -n
.I service
] [
.B -a .B -a
.I announce-string .I announce-string
] ... [ ] ... [
@ -54,7 +57,7 @@ and its command pipe in
.BI /srv/ name\f1 .cmd, .BI /srv/ name\f1 .cmd,
where where
.I name .I name
is the service name. is the service name.
.PP .PP
Options are: Options are:
.TP .TP
@ -91,6 +94,11 @@ thereafter.
enter the file server's configuration mode enter the file server's configuration mode
before starting normal operation. before starting normal operation.
.TP .TP
.B -n
overrides the
.I service
name of the file server's configuration.
.TP
.B -s .B -s
Post file descriptor zero in Post file descriptor zero in
.BI /srv/ service .BI /srv/ service

View file

@ -279,7 +279,7 @@ printsizes(void)
void void
usage(void) usage(void)
{ {
fprint(2, "usage: %s [ -csC ] [ -a ann-str ] [ -m dev-map ] [-f config-dev ]\n", argv0); fprint(2, "usage: %s [ -csC ] [-n service] [ -a ann-str ] [ -m dev-map ] [-f config-dev ]\n", argv0);
exits("usage"); exits("usage");
} }
@ -306,6 +306,9 @@ main(int argc, char **argv)
} }
annstrs[nets++] = ann; annstrs[nets++] = ann;
break; break;
case 'n':
strcpy(service, EARGF(usage()));
break;
case 's': case 's':
sfd = dup(0, -1); sfd = dup(0, -1);
rfd = dup(1, -1); rfd = dup(1, -1);