Browse Source

Plan 9 from Bell Labs 2003-11-17

David du Colombier 20 years ago
parent
commit
e13165d0e4
5 changed files with 17 additions and 7 deletions
  1. 8 2
      sys/man/4/exportfs
  2. 2 2
      sys/src/cmd/cpu.c
  3. 1 1
      sys/src/cmd/exportfs/exportfs.c
  4. 2 2
      sys/src/cmd/fmt.c
  5. 4 0
      sys/src/cmd/srvfs.c

+ 8 - 2
sys/man/4/exportfs

@@ -21,7 +21,7 @@ exportfs, srvfs \- network file server plumbing
 .B -A announce
 ]
 [
-.B -p
+.B -P
 .I patternfile
 ]
 .PP
@@ -37,6 +37,10 @@ exportfs, srvfs \- network file server plumbing
 .B -p
 .I perm
 ]
+[
+.B -P
+.I patternfile
+]
 .I name
 .I path
 .SH DESCRIPTION
@@ -110,7 +114,7 @@ to log all 9P traffic to
 .BR /tmp/exportdb ).
 .PP
 The
-.BI  -p patternfile
+.BI  -P patternfile
 option restricts the set of exported files.
 .I Patternfile
 contains one regular expression per line,
@@ -176,6 +180,8 @@ mounting
 .BR /srv ).
 If the
 .B -d
+or
+.B -P
 option is given,
 .I srvfs
 passes it to

+ 2 - 2
sys/src/cmd/cpu.c

@@ -134,7 +134,7 @@ main(int argc, char **argv)
 	case 'k':
 		keyspec = EARGF(usage());
 		break;
-	case 'p':
+	case 'P':
 		patternfile = EARGF(usage());
 		break;
 	default:
@@ -187,7 +187,7 @@ main(int argc, char **argv)
 	if(dbg)
 		av[ac++] = "-d";
 	if(patternfile != nil){
-		av[ac++] = "-p";
+		av[ac++] = "-P";
 		av[ac++] = patternfile;
 	}
 	av[ac] = 0;

+ 1 - 1
sys/src/cmd/exportfs/exportfs.c

@@ -137,7 +137,7 @@ main(int argc, char **argv)
 		srv = "/";
 		break;
 
-	case 'p':
+	case 'P':
 		patternfile = EARGF(usage());
 		break;
 

+ 2 - 2
sys/src/cmd/fmt.c

@@ -194,13 +194,13 @@ printwords(Word **w, int nw)
 		/* emit words until overflow; always emit at least one word */
 		for(;;){
 			Bprint(&bout, "%s", w[i]->text);
-			col += strlen(w[i]->text);
+			col += utflen(w[i]->text);
 			if(++i == nw)
 				break;	/* out of words */
 			if(w[i]->indent != w[i-1]->indent)
 				break;	/* indent change */
 			nsp = nspaceafter(w[i-1]->text);
-			if(col+nsp+strlen(w[i]->text) > extraindent+length)
+			if(col+nsp+utflen(w[i]->text) > extraindent+length)
 				break;	/* fold line */
 			for(j=0; j<nsp; j++)
 				Bputc(&bout, ' ');	/* emit space; another word will follow */

+ 4 - 0
sys/src/cmd/srvfs.c

@@ -31,6 +31,10 @@ main(int argc, char **argv)
 	case 'p':
 		perm = strtol(ARGF(), 0, 8);
 		break;
+	case 'P':
+		*argp++ = "-P";
+		*argp++ = ARGF();
+		break;
 	}ARGEND
 	*argp = 0;
 	if(argc != 2)