Browse Source

Plan 9 from Bell Labs 2007-06-14

David du Colombier 17 years ago
parent
commit
da1687966f
7 changed files with 81 additions and 65 deletions
  1. 6 6
      dist/replica/_plan9.db
  2. 5 5
      dist/replica/plan9.db
  3. 5 0
      dist/replica/plan9.log
  4. 20 10
      sys/man/4/paqfs
  5. 11 15
      sys/man/8/listen
  6. 1 1
      sys/src/cmd/aux/listen.c
  7. 33 28
      sys/src/cmd/paqfs/paqfs.c

+ 6 - 6
dist/replica/_plan9.db

@@ -361,7 +361,7 @@
 386/bin/ns - 775 sys sys 1168402343 65492
 386/bin/p - 775 sys sys 1168402343 65220
 386/bin/page - 775 sys sys 1179372100 234230
-386/bin/paqfs - 775 sys sys 1168402343 107781
+386/bin/paqfs - 775 sys sys 1181764592 108714
 386/bin/passwd - 775 sys sys 1168402344 84333
 386/bin/pbd - 775 sys sys 1085077087 4661
 386/bin/pcc - 775 sys sys 1168402344 68241
@@ -480,7 +480,7 @@
 386/bin/upas/token - 775 sys sys 1178568317 76393
 386/bin/upas/unesc - 775 sys sys 1176520512 60137
 386/bin/upas/unspam - 775 sys sys 1064598367 38
-386/bin/upas/vf - 775 sys sys 1181359437 97389
+386/bin/upas/vf - 775 sys sys 1181704900 97444
 386/bin/usb - 20000000775 sys sys 1019538890 0
 386/bin/usb/usbaudio - 775 sys sys 1179548037 188012
 386/bin/usb/usbd - 775 sys sys 1179548037 130769
@@ -7691,7 +7691,7 @@ sys/man/4/mntgen - 664 sys sys 1043680799 473
 sys/man/4/namespace - 664 sys sys 1161060792 6920
 sys/man/4/nfs - 664 sys sys 1140447003 4475
 sys/man/4/nntpfs - 664 sys sys 1032632346 2771
-sys/man/4/paqfs - 664 sys sys 1181701436 1736
+sys/man/4/paqfs - 664 sys sys 1181749508 1848
 sys/man/4/plumber - 664 sys sys 944959699 2748
 sys/man/4/ramfs - 664 sys sys 1168307208 1642
 sys/man/4/ratfs - 664 sys sys 1157898800 3276
@@ -9748,7 +9748,7 @@ sys/src/cmd/aux/gps/mkfile - 664 sys sys 1108397331 219
 sys/src/cmd/aux/gps/util.c - 664 sys sys 1107448815 2795
 sys/src/cmd/aux/lines.c - 664 sys sys 1015008782 546
 sys/src/cmd/aux/lis - 775 sys sys 944960794 45
-sys/src/cmd/aux/listen.c - 664 sys sys 1173762441 9291
+sys/src/cmd/aux/listen.c - 664 sys sys 1181789265 9292
 sys/src/cmd/aux/listen1.c - 664 sys sys 1143759349 2005
 sys/src/cmd/aux/mkfile - 664 sys sys 1147022848 1021
 sys/src/cmd/aux/mklatinkbd.c - 664 sys sys 953253425 3813
@@ -12865,7 +12865,7 @@ sys/src/cmd/page/view.c - 664 sys sys 1136377361 22893
 sys/src/cmd/paqfs - 20000000775 sys sys 1039727564 0
 sys/src/cmd/paqfs/mkfile - 664 sys sys 1032060366 228
 sys/src/cmd/paqfs/mkpaqfs.c - 664 sys sys 1072729575 8836
-sys/src/cmd/paqfs/paqfs.c - 664 sys sys 1181701442 19936
+sys/src/cmd/paqfs/paqfs.c - 664 sys sys 1181749507 19998
 sys/src/cmd/paqfs/paqfs.h - 664 sys sys 1072729575 1016
 sys/src/cmd/pbd.c - 664 sys sys 944961351 247
 sys/src/cmd/pcc.c - 664 sys sys 1146137351 6016
@@ -15844,4 +15844,4 @@ usr/glenda/lib/profile - 664 glenda glenda 1105128663 890
 usr/glenda/readme.acme - 664 glenda glenda 1019860628 4753
 usr/glenda/readme.rio - 664 glenda glenda 1019860628 6370
 usr/glenda/tmp - 20000000775 glenda glenda 1018802620 0
-386/bin/upas/vf - 775 sys sys 1181704900 97444
+sys/man/8/listen - 664 sys sys 1181790503 3658

+ 5 - 5
dist/replica/plan9.db

@@ -361,7 +361,7 @@
 386/bin/ns - 775 sys sys 1168402343 65492
 386/bin/p - 775 sys sys 1168402343 65220
 386/bin/page - 775 sys sys 1179372100 234230
-386/bin/paqfs - 775 sys sys 1168402343 107781
+386/bin/paqfs - 775 sys sys 1181764592 108714
 386/bin/passwd - 775 sys sys 1168402344 84333
 386/bin/pbd - 775 sys sys 1085077087 4661
 386/bin/pcc - 775 sys sys 1168402344 68241
@@ -7691,7 +7691,7 @@ sys/man/4/mntgen - 664 sys sys 1043680799 473
 sys/man/4/namespace - 664 sys sys 1161060792 6920
 sys/man/4/nfs - 664 sys sys 1140447003 4475
 sys/man/4/nntpfs - 664 sys sys 1032632346 2771
-sys/man/4/paqfs - 664 sys sys 1181701436 1736
+sys/man/4/paqfs - 664 sys sys 1181749508 1848
 sys/man/4/plumber - 664 sys sys 944959699 2748
 sys/man/4/ramfs - 664 sys sys 1168307208 1642
 sys/man/4/ratfs - 664 sys sys 1157898800 3276
@@ -7796,7 +7796,7 @@ sys/man/8/init - 664 sys sys 944959679 1430
 sys/man/8/ipconfig - 664 sys sys 1177100280 7984
 sys/man/8/ipserv - 664 sys sys 1095862383 4375
 sys/man/8/kfscmd - 664 sys sys 1068569797 4515
-sys/man/8/listen - 664 sys sys 1174792129 3826
+sys/man/8/listen - 664 sys sys 1181790503 3658
 sys/man/8/lp - 664 sys sys 954614702 2491
 sys/man/8/mk9660 - 664 sys sys 1104430379 3946
 sys/man/8/mkfs - 664 sys sys 1163208436 3414
@@ -9748,7 +9748,7 @@ sys/src/cmd/aux/gps/mkfile - 664 sys sys 1108397331 219
 sys/src/cmd/aux/gps/util.c - 664 sys sys 1107448815 2795
 sys/src/cmd/aux/lines.c - 664 sys sys 1015008782 546
 sys/src/cmd/aux/lis - 775 sys sys 944960794 45
-sys/src/cmd/aux/listen.c - 664 sys sys 1173762441 9291
+sys/src/cmd/aux/listen.c - 664 sys sys 1181789265 9292
 sys/src/cmd/aux/listen1.c - 664 sys sys 1143759349 2005
 sys/src/cmd/aux/mkfile - 664 sys sys 1147022848 1021
 sys/src/cmd/aux/mklatinkbd.c - 664 sys sys 953253425 3813
@@ -12865,7 +12865,7 @@ sys/src/cmd/page/view.c - 664 sys sys 1136377361 22893
 sys/src/cmd/paqfs - 20000000775 sys sys 1039727564 0
 sys/src/cmd/paqfs/mkfile - 664 sys sys 1032060366 228
 sys/src/cmd/paqfs/mkpaqfs.c - 664 sys sys 1072729575 8836
-sys/src/cmd/paqfs/paqfs.c - 664 sys sys 1181701442 19936
+sys/src/cmd/paqfs/paqfs.c - 664 sys sys 1181749507 19998
 sys/src/cmd/paqfs/paqfs.h - 664 sys sys 1072729575 1016
 sys/src/cmd/pbd.c - 664 sys sys 944961351 247
 sys/src/cmd/pcc.c - 664 sys sys 1146137351 6016

+ 5 - 0
dist/replica/plan9.log

@@ -49245,3 +49245,8 @@
 1181701823 0 c sys/man/4/paqfs - 664 sys sys 1181701436 1736
 1181701823 1 c sys/src/cmd/paqfs/paqfs.c - 664 sys sys 1181701442 19936
 1181705423 0 c 386/bin/upas/vf - 775 sys sys 1181704900 97444
+1181750421 0 c sys/man/4/paqfs - 664 sys sys 1181749508 1848
+1181750421 1 c sys/src/cmd/paqfs/paqfs.c - 664 sys sys 1181749507 19998
+1181764823 0 c 386/bin/paqfs - 775 sys sys 1181764592 108714
+1181790023 0 c sys/src/cmd/aux/listen.c - 664 sys sys 1181789265 9292
+1181791823 0 c sys/man/8/listen - 664 sys sys 1181790503 3658

+ 20 - 10
sys/man/4/paqfs

@@ -43,24 +43,24 @@ are:
 .BI -c " cachesize
 The number of file system blocks to cache in memory. The default is 20 blocks.
 .TP
+.BI -M " mesgsize
+The maximum 9P message size. The default is sufficient for 8K byte read message.
+.TP
 .B -d
 Output various debugging information to
 .IR stderr .
 .TP
+.B -i
+Use file descriptors 0 and 1 as the 9P communication channel rather than create a pipe.
+.TP
 .B -q
 Suppress the output of the archive creation date and fingerprint to
 .IR stderr .
 .TP
-.B -i
-Use file descriptors 0 and 1 as the 9P communication channel rather than create a pipe.
-.TP
 .BI -m " mtpt
 The location to mount the file system. The default is
 .BR /n/paq .
 .TP
-.BI -M " mesgsize
-The maximum 9P message size. The default is sufficient for 8K byte read message.
-.TP
 .B -s
 Post the 9P channel on
 .BR #s/\fIsrvname\fR ,
@@ -69,10 +69,20 @@ default
 rather than
 mounting it on
 .IR mtpt .
-Use
-.BI -S " srvname
-to change the default.
-
+.TP
+.B -S
+The name to post in
+.BR #s .
+The default is
+.BR paqfs .
+.TP
+.B -p
+Both post the 9P channel in
+.B #s
+and
+mount the
+.I paqfile
+in to the filesystem.
 .TP
 .B -v
 Verify the integrity of the

+ 11 - 15
sys/man/8/listen

@@ -1,6 +1,6 @@
 .TH LISTEN 8
 .SH NAME
-listen, listen1, il7, il9, il19, il565, il566, il17007, il17008, il17009, il17013, il17031, tcp7, tcp9, tcp19, tcp21, tcp22, tcp23, tcp25, tcp53, tcp110, tcp113, tcp143, tcp513, tcp515, tcp564, tcp565, tcp566, tcp567, tcp993, tcp1723, tcp17007, tcp17009, tcp17010, tcp17013 \- listen for calls on a network device
+listen, listen1, tcp7, tcp9, tcp19, tcp21, tcp22, tcp23, tcp25, tcp53, tcp110, tcp113, tcp143, tcp513, tcp515, tcp564, tcp565, tcp566, tcp567, tcp993, tcp1723, tcp17007, tcp17009, tcp17010, tcp17013 \- listen for calls on a network device
 .SH SYNOPSIS
 .B aux/listen
 .RB [ -q ]
@@ -26,7 +26,7 @@ listen, listen1, il7, il9, il19, il565, il566, il17007, il17008, il17009, il1701
 listens on a network for inbound calls to local services.
 .I Net
 is the network protocol on which to listen, by default
-.BR /net/il .
+.BR /net/tcp .
 The services available are executable, non-empty files in
 .I srvdir
 or
@@ -65,13 +65,13 @@ an inbound call on the TCP network for port 565 executes service
 .PP
 The following services are available in
 .BR /bin/service .
-.TF il17005\ tcp17005
+.TF \ tcp00000
 .TP
-.B il19 tcp19
+.B tcp19
 .B chargen
 service.
 .TP
-.B il17007 tcp17007
+.B tcp17007
 serve a piece of the name space using the Plan 9 file system protocol,
 with authentication (typically used by
 .IR cpu (1)).
@@ -83,7 +83,7 @@ systems to see Plan 9 files).
 .B il17008
 like 17007, but serves the root of the tree, forgoing the negotiation for which subtree to serve.
 .TP
-.B il17009 tcp17009
+.B tcp17009
 remote execution.
 .TP
 .B "tcp17010"
@@ -91,16 +91,12 @@ server for
 .IR cpu (1)
 command.
 .TP
-.B "il17013 tcp17013"
+.B "tcp17013"
 server for old
 .IR cpu (1)
 command for compatibility with old clients.
 .TP
-.B il17031
-server for
-.IR ramfs (4).
-.TP
-.B il565 tcp565
+.B tcp565
 report the address of the incoming call.
 .TP
 .B tcp21
@@ -125,10 +121,10 @@ terminal connection.
 LP daemon; see
 .IR lp (8).
 .TP
-.B il7 tcp7
+.B tcp7
 echo any bytes received (bit mirror)
 .TP
-.B il9 tcp9
+.B tcp9
 consume any bytes received (bit bucket)
 .TP
 .B tcp53
@@ -154,7 +150,7 @@ PPTP (point-to-point tunnelling protocol) service.
 .PP
 The following services are available in
 .BR /bin/service.auth .
-.TF il565\ tcp565
+.TF \ tcp00000
 .TP
 .B tcp566
 check a SecureNet box.

+ 1 - 1
sys/src/cmd/aux/listen.c

@@ -81,7 +81,7 @@ main(int argc, char *argv[])
 
 	servdir = 0;
 	trustdir = 0;
-	proto = "il";
+	proto = "tcp";
 	quiet = 0;
 	argv0 = argv[0];
 	cpu = getenv("cputype");

+ 33 - 28
sys/src/cmd/paqfs/paqfs.c

@@ -165,40 +165,37 @@ void
 main(int argc, char *argv[])
 {
 	int pfd[2];
-	int fd;
-	int stdio = 0;
-	int verify = 0;
-	char buf[64], *defmnt, *p, *service;
+	int fd, mnt, srv, stdio, verify;
+	char buf[64], *mntpoint, *srvname, *p;
 
 	fmtinstall('V', sha1fmt);
 
-	defmnt = "/n/paq";
-	service = "paqfs";
+	mntpoint = "/n/paq";
+	srvname = "paqfs";
+	mnt = 1;
+	srv = stdio = verify = 0;
+
 	ARGBEGIN{
-	case 'c':
-		p = EARGF(usage());
-		cachesize = atoi(p);
-		break;
+	default:
+		usage();
 	case 'a':
 		noauth = 1;
 		break;
-	case 'v':
-		verify = 1;
+	case 'c':
+		p = EARGF(usage());
+		cachesize = atoi(p);
 		break;
 	case 'd':
 		debug = 1;
 		break;
 	case 'i':
-		defmnt = nil;
+		mnt = 0;
 		stdio = 1;
 		pfd[0] = 0;
 		pfd[1] = 1;
 		break;
-	case 's':
-		defmnt = nil;
-		break;
 	case 'm':
-		defmnt = EARGF(usage());
+		mntpoint = EARGF(usage());
 		break;
 	case 'M':
 		p = EARGF(usage());
@@ -208,15 +205,23 @@ main(int argc, char *argv[])
 		if(mesgsize > 128*1024)
 			mesgsize = 128*1024;
 		break;
-	case 'S':
-		defmnt = 0;
-		service = EARGF(usage());
+	case 'p':
+		srv = 1;
+		mnt = 1;
 		break;
 	case 'q':
 		qflag = 1;
 		break;
-	default:
-		usage();
+	case 's':
+		srv = 1;
+		mnt = 0;
+		break;
+	case 'S':
+		srvname = EARGF(usage());
+		break;
+	case 'v':
+		verify = 1;
+		break;
 	}ARGEND
 
 	if(argc != 1)
@@ -226,14 +231,14 @@ main(int argc, char *argv[])
 	
 	if(!stdio){
 		if(pipe(pfd) < 0)
-			sysfatal("pipe failed");
-		if(defmnt == 0){
-			snprint(buf, sizeof buf, "#s/%s", service);
+			sysfatal("pipe: %r");
+		if(srv){
+			snprint(buf, sizeof buf, "#s/%s", srvname);
 			fd = create(buf, OWRITE, 0666);
 			if(fd < 0)
 				sysfatal("create %s: %r", buf);
 			if(fprint(fd, "%d", pfd[0]) < 0)
-				sysfatal("writing /srv/paqfs");
+				sysfatal("write %s: %r", buf);
 		}
 	}
 
@@ -248,8 +253,8 @@ main(int argc, char *argv[])
 		break;
 	default:
 		close(pfd[1]);	/* don't deadlock if child fails */
-		if(defmnt && mount(pfd[0], -1, defmnt, MREPL|MCREATE, "") < 0)
-			sysfatal("mount failed");
+		if(mnt && mount(pfd[0], -1, mntpoint, MREPL|MCREATE, "") < 0)
+			sysfatal("mount %s: %r", mntpoint);
 	}
 	exits(0);
 }