shithub: riscv

Download patch

ref: 0159ee648e182cb6617596bf4f3ff45bf632610b
parent: 2c6802e80f2bc7be660981b183fe89ecd72061ce
parent: f47862d967179880780d63417ecbb150320cc1df
author: aiju <devnull@localhost>
date: Fri Apr 15 17:03:43 EDT 2011

merge

--- a/sys/man/4/cwfs
+++ b/sys/man/4/cwfs
@@ -6,6 +6,9 @@
 [
 .B -csC
 ] [
+.B -n
+.I service
+] [
 .B -a
 .I announce-string
 ] ... [
@@ -54,7 +57,7 @@
 .BI /srv/ name\f1 .cmd,
 where
 .I name
-is the service name. 
+is the service name.
 .PP
 Options are:
 .TP
@@ -90,6 +93,11 @@
 .B -c
 enter the file server's configuration mode
 before starting normal operation.
+.TP
+.B -n
+overrides the 
+.I service
+name of the file server's configuration.
 .TP
 .B -s
 Post file descriptor zero in
--- a/sys/src/cmd/cwfs/main.c
+++ b/sys/src/cmd/cwfs/main.c
@@ -279,7 +279,7 @@
 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");
 }
 
@@ -305,6 +305,9 @@
 			exits("too many nets");
 		}
 		annstrs[nets++] = ann;
+		break;
+	case 'n':
+		strcpy(service, EARGF(usage()));
 		break;
 	case 's':
 		sfd = dup(0, -1);