Browse Source

Plan 9 from Bell Labs 2008-02-07

David du Colombier 13 years ago
parent
commit
d69429a6e0

+ 18 - 21
dist/replica/_plan9.db

@@ -3,14 +3,14 @@
 386/9loaddebug - 775 sys sys 1199773344 452196
 386/9loadlite - 775 sys sys 1199773342 161880
 386/9loadlitedebug - 775 sys sys 1199773345 237979
-386/9pc - 775 sys sys 1199915489 2057282
-386/9pc.gz - 664 sys sys 1199915503 874495
-386/9pccpu - 775 sys sys 1199915538 2140826
-386/9pccpu.gz - 664 sys sys 1199915553 880179
-386/9pcdisk - 775 sys sys 1199915609 2289664
-386/9pcdisk.gz - 664 sys sys 1199915627 974761
-386/9pcf - 775 sys sys 1199915834 2959354
-386/9pcf.gz - 664 sys sys 1199915855 1259122
+386/9pc - 775 sys sys 1202321022 2090361
+386/9pc.gz - 664 sys sys 1202321048 887501
+386/9pccpu - 775 sys sys 1202321091 2218905
+386/9pccpu.gz - 664 sys sys 1202321115 908814
+386/9pcdisk - 775 sys sys 1202321271 2293056
+386/9pcdisk.gz - 664 sys sys 1202321289 976280
+386/9pcf - 775 sys sys 1202321342 2962744
+386/9pcf.gz - 664 sys sys 1202321365 1260801
 386/9pxeload - 775 sys sys 1199773341 338432
 386/bin - 20000000775 sys sys 1018897690 0
 386/bin/8a - 775 sys sys 1168402260 116604
@@ -483,10 +483,10 @@
 386/bin/upas/unspam - 775 sys sys 1064598367 38
 386/bin/upas/vf - 775 sys sys 1181704900 97444
 386/bin/usb - 20000000775 sys sys 1019538890 0
-386/bin/usb/disk - 775 sys sys 1200717250 187004
-386/bin/usb/usbaudio - 775 sys sys 1184731243 188000
-386/bin/usb/usbd - 775 sys sys 1184731243 130757
-386/bin/usb/usbmouse - 775 sys sys 1184731244 109661
+386/bin/usb/disk - 775 sys sys 1202272000 187347
+386/bin/usb/usbaudio - 775 sys sys 1202272003 188183
+386/bin/usb/usbd - 775 sys sys 1202272005 131144
+386/bin/usb/usbmouse - 775 sys sys 1202272007 109417
 386/bin/usb/usbprint - 775 sys sys 1196537245 314
 386/bin/usb/usbprobe - 775 sys sys 1196537245 173
 386/bin/vac - 775 sys sys 1196742539 171330
@@ -5639,7 +5639,7 @@ rc/bin/umem - 775 sys sys 1190076661 547
 rc/bin/uncompress - 775 sys sys 1158798931 30
 rc/bin/ups - 775 sys sys 1091021981 806
 rc/bin/uptime - 775 sys sys 1074730712 234
-rc/bin/usbfat: - 775 sys sys 1199300762 712
+rc/bin/usbfat: - 775 sys sys 1202320226 716
 rc/bin/usbstart - 775 sys sys 1044894155 81
 rc/bin/usps - 775 sys sys 1016826030 450
 rc/bin/vwhois - 775 sys sys 1106409971 445
@@ -7792,7 +7792,7 @@ sys/man/6/map - 664 sys sys 1196638945 1892
 sys/man/6/mhtml - 664 sys sys 1196638945 1714
 sys/man/6/mnihongo - 664 sys sys 1196638945 716
 sys/man/6/mpictures - 664 sys sys 1196638945 2899
-sys/man/6/ms - 664 sys sys 1196638945 6815
+sys/man/6/ms - 664 sys sys 1202324341 6970
 sys/man/6/namespace - 664 sys sys 1196638945 1576
 sys/man/6/ndb - 664 sys sys 1196638945 6735
 sys/man/6/plot - 664 sys sys 1196638945 6739
@@ -8180,7 +8180,7 @@ sys/src/9/pc/uarti8250.c - 664 sys sys 1177676872 13957
 sys/src/9/pc/uartisa.c - 664 sys sys 1127126907 1777
 sys/src/9/pc/uartpci.c - 664 sys sys 1190235592 4685
 sys/src/9/pc/usb.h - 664 sys sys 1202251665 4590
-sys/src/9/pc/usbohci.c - 664 sys sys 1202254075 47560
+sys/src/9/pc/usbohci.c - 664 sys sys 1202323008 47570
 sys/src/9/pc/usbuhci.c - 664 sys sys 1202252076 31839
 sys/src/9/pc/vga.c - 664 sys sys 1131290595 5148
 sys/src/9/pc/vga3dfx.c - 664 sys sys 1133218367 3833
@@ -9106,8 +9106,8 @@ sys/src/ape/lib/v/mkfile - 664 sys sys 1014921992 237
 sys/src/ape/lib/v/nap.c - 664 sys sys 1014921993 90
 sys/src/ape/lib/v/nrand.c - 664 sys sys 1014921993 262
 sys/src/ape/lib/v/plan9 - 20000000775 sys sys 1039727536 0
-sys/src/ape/lib/v/plan9/getpass.c - 664 sys sys 1014921993 653
-sys/src/ape/lib/v/plan9/tty.c - 664 sys sys 1014921993 757
+sys/src/ape/lib/v/plan9/getpass.c - 664 sys sys 1202327292 731
+sys/src/ape/lib/v/plan9/tty.c - 664 sys sys 1202327292 559
 sys/src/ape/lib/v/rand.c - 664 sys sys 1014921993 826
 sys/src/ape/mkfile - 664 sys sys 1014921995 368
 sys/src/boot - 20000000775 sys sys 1039727539 0
@@ -15859,7 +15859,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/usb/disk - 775 sys sys 1202272000 187347
-386/bin/usb/usbaudio - 775 sys sys 1202272003 188183
-386/bin/usb/usbd - 775 sys sys 1202272005 131144
-386/bin/usb/usbmouse - 775 sys sys 1202272007 109417
+386/lib/ape/libv.a - 664 sys sys 1202357672 19334

+ 14 - 14
dist/replica/plan9.db

@@ -3,14 +3,14 @@
 386/9loaddebug - 775 sys sys 1199773344 452196
 386/9loadlite - 775 sys sys 1199773342 161880
 386/9loadlitedebug - 775 sys sys 1199773345 237979
-386/9pc - 775 sys sys 1199915489 2057282
-386/9pc.gz - 664 sys sys 1199915503 874495
-386/9pccpu - 775 sys sys 1199915538 2140826
-386/9pccpu.gz - 664 sys sys 1199915553 880179
-386/9pcdisk - 775 sys sys 1199915609 2289664
-386/9pcdisk.gz - 664 sys sys 1199915627 974761
-386/9pcf - 775 sys sys 1199915834 2959354
-386/9pcf.gz - 664 sys sys 1199915855 1259122
+386/9pc - 775 sys sys 1202321022 2090361
+386/9pc.gz - 664 sys sys 1202321048 887501
+386/9pccpu - 775 sys sys 1202321091 2218905
+386/9pccpu.gz - 664 sys sys 1202321115 908814
+386/9pcdisk - 775 sys sys 1202321271 2293056
+386/9pcdisk.gz - 664 sys sys 1202321289 976280
+386/9pcf - 775 sys sys 1202321342 2962744
+386/9pcf.gz - 664 sys sys 1202321365 1260801
 386/9pxeload - 775 sys sys 1199773341 338432
 386/bin - 20000000775 sys sys 1018897690 0
 386/bin/8a - 775 sys sys 1168402260 116604
@@ -553,7 +553,7 @@
 386/lib/ape/libnet.a - 664 sys sys 1143777857 16950
 386/lib/ape/libregexp.a - 664 sys sys 1143777857 47500
 386/lib/ape/libutf.a - 664 sys sys 1146156980 88500
-386/lib/ape/libv.a - 664 sys sys 1143777858 19668
+386/lib/ape/libv.a - 664 sys sys 1202357672 19334
 386/lib/lib9p.a - 664 sys sys 1184529909 91012
 386/lib/libString.a - 664 sys sys 1168402362 22126
 386/lib/libauth.a - 664 sys sys 1179372118 58864
@@ -5639,7 +5639,7 @@ rc/bin/umem - 775 sys sys 1190076661 547
 rc/bin/uncompress - 775 sys sys 1158798931 30
 rc/bin/ups - 775 sys sys 1091021981 806
 rc/bin/uptime - 775 sys sys 1074730712 234
-rc/bin/usbfat: - 775 sys sys 1199300762 712
+rc/bin/usbfat: - 775 sys sys 1202320226 716
 rc/bin/usbstart - 775 sys sys 1044894155 81
 rc/bin/usps - 775 sys sys 1016826030 450
 rc/bin/vwhois - 775 sys sys 1106409971 445
@@ -7792,7 +7792,7 @@ sys/man/6/map - 664 sys sys 1196638945 1892
 sys/man/6/mhtml - 664 sys sys 1196638945 1714
 sys/man/6/mnihongo - 664 sys sys 1196638945 716
 sys/man/6/mpictures - 664 sys sys 1196638945 2899
-sys/man/6/ms - 664 sys sys 1196638945 6815
+sys/man/6/ms - 664 sys sys 1202324341 6970
 sys/man/6/namespace - 664 sys sys 1196638945 1576
 sys/man/6/ndb - 664 sys sys 1196638945 6735
 sys/man/6/plot - 664 sys sys 1196638945 6739
@@ -8180,7 +8180,7 @@ sys/src/9/pc/uarti8250.c - 664 sys sys 1177676872 13957
 sys/src/9/pc/uartisa.c - 664 sys sys 1127126907 1777
 sys/src/9/pc/uartpci.c - 664 sys sys 1190235592 4685
 sys/src/9/pc/usb.h - 664 sys sys 1202251665 4590
-sys/src/9/pc/usbohci.c - 664 sys sys 1202254075 47560
+sys/src/9/pc/usbohci.c - 664 sys sys 1202323008 47570
 sys/src/9/pc/usbuhci.c - 664 sys sys 1202252076 31839
 sys/src/9/pc/vga.c - 664 sys sys 1131290595 5148
 sys/src/9/pc/vga3dfx.c - 664 sys sys 1133218367 3833
@@ -9106,8 +9106,8 @@ sys/src/ape/lib/v/mkfile - 664 sys sys 1014921992 237
 sys/src/ape/lib/v/nap.c - 664 sys sys 1014921993 90
 sys/src/ape/lib/v/nrand.c - 664 sys sys 1014921993 262
 sys/src/ape/lib/v/plan9 - 20000000775 sys sys 1039727536 0
-sys/src/ape/lib/v/plan9/getpass.c - 664 sys sys 1014921993 653
-sys/src/ape/lib/v/plan9/tty.c - 664 sys sys 1014921993 757
+sys/src/ape/lib/v/plan9/getpass.c - 664 sys sys 1202327292 731
+sys/src/ape/lib/v/plan9/tty.c - 664 sys sys 1202327292 559
 sys/src/ape/lib/v/rand.c - 664 sys sys 1014921993 826
 sys/src/ape/mkfile - 664 sys sys 1014921995 368
 sys/src/boot - 20000000775 sys sys 1039727539 0

+ 14 - 0
dist/replica/plan9.log

@@ -18440,3 +18440,17 @@
 1202272204 1 c 386/bin/usb/usbaudio - 775 sys sys 1202272003 188183
 1202272204 2 c 386/bin/usb/usbd - 775 sys sys 1202272005 131144
 1202272204 3 c 386/bin/usb/usbmouse - 775 sys sys 1202272007 109417
+1202320804 0 c rc/bin/usbfat: - 775 sys sys 1202320226 716
+1202322603 0 c 386/9pc - 775 sys sys 1202321022 2090361
+1202322603 1 c 386/9pc.gz - 664 sys sys 1202321048 887501
+1202322603 2 c 386/9pccpu - 775 sys sys 1202321091 2218905
+1202322603 3 c 386/9pccpu.gz - 664 sys sys 1202321115 908814
+1202322603 4 c 386/9pcdisk - 775 sys sys 1202321271 2293056
+1202322603 5 c 386/9pcdisk.gz - 664 sys sys 1202321289 976280
+1202322603 6 c 386/9pcf - 775 sys sys 1202321342 2962744
+1202322603 7 c 386/9pcf.gz - 664 sys sys 1202321365 1260801
+1202324404 0 c sys/man/6/ms - 664 sys sys 1202324341 6970
+1202324404 1 c sys/src/9/pc/usbohci.c - 664 sys sys 1202323008 47570
+1202328006 0 c sys/src/ape/lib/v/plan9/getpass.c - 664 sys sys 1202327292 731
+1202328006 1 c sys/src/ape/lib/v/plan9/tty.c - 664 sys sys 1202327292 559
+1202358609 0 c 386/lib/ape/libv.a - 664 sys sys 1202357672 19334

+ 2 - 2
rc/bin/usbfat:

@@ -1,10 +1,10 @@
 #!/bin/rc
-# usbfat: [-f] [disk [mtpt]] - mount a USB disk's MS FAT file system
+# usbfat: [-fl] [disk [mtpt]] - mount a USB disk's MS FAT file system
 rfork e
 opts=()
 while (! ~ $#* 0 && ~ $1 -*) {
 	switch ($1) {
-	case -f
+	case -f -l
 		opts=($opts $1)
 	case -*
 		echo usage: $0 '[-f] [disk [mtpt]]' >[1=2]

+ 29 - 18
sys/man/6/ms

@@ -55,12 +55,12 @@ M. E. Lesk,
 Unix Research System Programmer's Manual,
 Tenth Edition, Volume 2.
 .br
-.IR eqn (1), 
-.IR troff (1), 
+.IR eqn (1),
+.IR troff (1),
 .IR tbl (1),
 .IR pic (1)
 .SH REQUESTS
-.ta \w'..ND \fIdate\fR 'u +\w'Initial 'u +\w'Cause 'u
+.ta \w'.\fL.CW \fIx y z\fR 'u +\w'Initial 'u +\w'Cause 'u
 .br
 .di x
 			\ka
@@ -93,20 +93,24 @@ Suppressed in
 extension, ignored except in
 .BR TM .
 .ti0
-\fL\&.B\fP \fIx y\fR	no	no	Print
+\fL\&.B\fP \fIx y z\fR	no	no	Print
 .I x
-in boldface, append
-.IR y ;
+in boldface, append roman
+.IR y
+and preface with
+.IR z ;
 if no argument switch to boldface.
 .ti0
 \fL\&.B1\fP	no	yes	Begin text to be enclosed in a box.
 .ti0
 \fL\&.B2\fP	no	yes	End boxed text.
 .ti0
-\fL\&.BI\fP \fIx y\fR	no	no	Print
+\fL\&.BI\fP \fIx y z\fR	no	no	Print
 .I x
-in bold italic and append
-.IR y ;
+in bold italic, append roman
+.IR y
+and preface with
+.IR z ;
 if no argument switch to bold italic.
 .ti0
 \fL\&.BT\fP	date	no	Bottom title, automatically invoked at
@@ -117,10 +121,12 @@ May be redefined.
 .I x
 in a box.
 .ti0
-\fL\&.CW\fP \fIx y\fR	no	no	Constant width font for
+\fL\&.CW\fP \fIx y z\fR	no	no	Constant width font for
 .IR x ,
-append
-.IR y ;
+append roman
+.IR y
+and preface with
+.IR z ;
 if no argument switch to constant width.
 .ti0
 \fL\&.CT\fP	no	yes	Print `Copies to' and turn off line filling.
@@ -158,7 +164,7 @@ or
 \fL\&.EQ\fP \fIx y\fR	-	yes	Display equation.
 Equation number is
 .IR y .
-Optional 
+Optional
 .I x
 is
 .BR I ", " L ", " C
@@ -176,10 +182,12 @@ The note will be moved to the bottom of the page.
 \fL\&.HO\fP	-	no	`Bell Laboratories, Holmdel,
 New Jersey 07733'.
 .ti0
-\fL\&.I\fP \fIx y\fR	no	no	Italicize
+\fL\&.I\fP \fIx y z\fR	no	no	Italicize
 .IR x ,
-append
-.IR y ;
+append roman
+.IR y
+and preface with
+.IR z ;
 if no argument switch to italic.
 .ti0
 \fL\&.IH\fP	no	no	`Bell Laboratories, Naperville, Illinois 60540'
@@ -223,9 +231,12 @@ special BTL format positions; omit from page footer.
 \fL\&.NH\fP \fIn\fR	-	yes	Same as
 .BR .SH ,
 with automatic section
-numbers  like `1.2.3';
+numbers like `1.2.3';
 .I n
 is subsection level (default 1).
+If
+.I n
+is 0, reset the numbering.
 .ti0
 \fL\&.NL\fP	yes	no	Make letters normal size.
 .ti0
@@ -265,7 +276,7 @@ Must precede other requests.
 from which subsequent indentation is measured.
 .ti0
 \fL\&.SG\fP \fIx\fR	no	yes	Insert signature(s) of author(s),
-ignored except in 
+ignored except in
 .B .TM
 and
 .BR .LT .

+ 1 - 1
sys/src/9/pc/usbohci.c

@@ -1,6 +1,6 @@
 /*
  * USB Open Host Controller Interface (OHCI) driver
- * from Charles Forsyth's devohci.c, 5 Aug 2006.
+ * from devohci.c provided by Charles Forsyth, 5 Aug 2006.
  */
 #include	"u.h"
 #include	"../port/lib.h"

+ 16 - 8
sys/src/ape/lib/v/plan9/getpass.c

@@ -7,8 +7,8 @@
 char *
 getpass(char *prompt)
 {
-	register char *p;
-	register c;
+	int c;
+	char *p;
 	FILE *fi;
 	static char pbuf[9];
 	void (*sig)(int);
@@ -16,16 +16,24 @@ getpass(char *prompt)
 	if ((fi = fopen("/dev/cons", "r")) == NULL)
 		fi = stdin;
 	else
-		setbuf(fi, (char *)NULL);
+		setbuf(fi, NULL);
 	sig = signal(SIGINT, SIG_IGN);
 	tty_echooff(fileno(fi));
-	fprintf(stderr, "%s", prompt); fflush(stderr);
-	for (p=pbuf; (c = getc(fi))!='\n' && c!=EOF;) {
-		if (p < &pbuf[8])
+	fprintf(stderr, "%s", prompt);
+	fflush(stderr);
+
+	for (p = pbuf; (c = getc(fi)) != '\n' && c != EOF; )
+		if (c == ('u' & 037))
+			p = pbuf;
+		else if (c == '\b') {
+			if (p > pbuf)
+				p--;
+		} else if (p < &pbuf[8])
 			*p++ = c;
-	}
 	*p = '\0';
-	fprintf(stderr, "\n"); fflush(stderr);
+
+	fprintf(stderr, "\n");
+	fflush(stderr);
 	tty_echoon(fileno(fi));
 	signal(SIGINT, sig);
 	if (fi != stdin)

+ 16 - 27
sys/src/ape/lib/v/plan9/tty.c

@@ -1,48 +1,37 @@
+/*
+ * turn raw (no echo, etc.) on and off.
+ * ptyfs is gone, so don't even try tcsetattr, etc.
+ */
 #define _POSIX_SOURCE
 #define _RESEARCH_SOURCE
-#include <termios.h>
+
 #include <sys/types.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <libv.h>
 
-static int rconsfd = -1;
+static int ctlfd = -1;
 
 /* fd is ignored */
 
 tty_echooff(int fd)
 {
-	struct termios tio;
-
-	if(tcgetattr(fd, &tio) < 0){
-		/* pcons not running; use /dev/rcons */
-		if(rconsfd >= 0)
-			return 0;
-		rconsfd = open("/dev/rcons", O_RDONLY);
-		if(rconsfd < 0)
-			return -1;
+	if(ctlfd >= 0)
 		return 0;
-	}
-	tio.c_lflag &= ~ECHO;
-	if(tcsetattr(fd, 0, &tio) < 0)
+	ctlfd = open("/dev/consctl", O_WRONLY);
+	if(ctlfd < 0)
 		return -1;
+	write(ctlfd, "rawon", 5);
 	return 0;
 }
 
 tty_echoon(int fd)
 {
-	struct termios tio;
-
-	if(tcgetattr(fd, &tio) < 0){
-		if(rconsfd >= 0){
-			close(rconsfd);
-			rconsfd = -1;
-			return 0;
-		}
-		return -1;
+	if(ctlfd >= 0){
+		write(ctlfd, "rawoff", 6);
+		close(ctlfd);
+		ctlfd = -1;
+		return 0;
 	}
-	tio.c_lflag |= ECHO;
-	if(tcsetattr(fd, 0, &tio) < 0)
-		return -1;
-	return 0;
+	return -1;
 }