Browse Source

Plan 9 from Bell Labs 2007-12-02

David du Colombier 12 years ago
parent
commit
18b80ef3bf

+ 12 - 0
386/bin/usb/usbprint

@@ -0,0 +1,12 @@
+#!/bin/rc
+# usbprint - bind usb printer endpoint to /dev/lp
+rfork e
+for (id in /dev/usb[0-9]*/[0-9]*)
+	if (grep -s 'Enabled 0x020107' $id/status >[2]/dev/null){
+		echo -n 'ep 2 bulk w 64 32' >$id/ctl
+		aux/stub /dev/lp
+		bind $id/ep2data /dev/lp
+		exit ''
+	}
+echo $0: no usb printer found >[1=2]
+exit 'no printer'

+ 0 - 13
386/bin/usb/usbprinter

@@ -1,13 +0,0 @@
-#!/bin/rc
-
-if (! test -e /dev/usb)
-	bind -b '#U' /dev
-
-for(i in /dev/usb?/[0-9]*){
-	if (grep -s 'Enabled 0x020107' $i/status){
-		echo -n 'ep 2 bulk w 64 32' >$i/ctl
-		bind $i/ep2data /n/lp
-		exit ''
-	}
-}
-exit 'no printer'

+ 8 - 0
386/bin/usb/usbprobe

@@ -0,0 +1,8 @@
+#!/bin/rc
+# list all usb devices
+rfork e
+for (id in /dev/usb[0-9]*/[0-9]*/status)
+	if (test -e $id) {
+		echo $id | sed 's;/status$;:	;' | tr -d '\12'
+		grep '^[A-Z]' $id
+	}

+ 6 - 5
dist/replica/_plan9.db

@@ -487,7 +487,8 @@
 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/usbprinter - 775 sys sys 1089408719 222
+386/bin/usb/usbprint - 775 sys sys 1196537245 314
+386/bin/usb/usbprobe - 775 sys sys 1196537245 173
 386/bin/vac - 775 sys sys 1189146367 170972
 386/bin/vacfs - 775 sys sys 1189146374 175780
 386/bin/venti - 20000000775 sys sys 947360466 0
@@ -6214,7 +6215,7 @@ sys/lib/dist/cmd/touchfs.c - 664 sys sys 1018469727 1120
 sys/lib/dist/cmd/unbflz.c - 664 sys sys 1018469727 1688
 sys/lib/dist/logcompress.awk - 664 sys sys 1068558028 298
 sys/lib/dist/logtime.awk - 664 sys sys 1019526213 38
-sys/lib/dist/mkfile - 664 sys sys 1188441860 5380
+sys/lib/dist/mkfile - 664 sys sys 1196547774 5490
 sys/lib/dist/pc - 20000000775 sys sys 1147022870 0
 sys/lib/dist/pc/cd0.proto - 664 sys sys 1114358485 7
 sys/lib/dist/pc/empty - 20000000775 sys sys 1020895854 0
@@ -7395,7 +7396,7 @@ sys/man/1/eqn - 664 sys sys 1134592617 5655
 sys/man/1/expect - 664 sys sys 1165622338 3018
 sys/man/1/faces - 664 sys sys 1113743326 2395
 sys/man/1/factor - 664 sys sys 1135084026 1015
-sys/man/1/fedex - 664 sys sys 1196368212 399
+sys/man/1/fedex - 664 sys sys 1196533426 528
 sys/man/1/file - 664 sys sys 1157143697 1481
 sys/man/1/filter - 664 sys sys 1159419912 6143
 sys/man/1/fmt - 664 sys sys 1070032221 1557
@@ -14557,7 +14558,7 @@ sys/src/games/mp3dec/l2tables.h - 664 sys sys 956186252 8305
 sys/src/games/mp3dec/layer1.c - 664 sys sys 956186252 3764
 sys/src/games/mp3dec/layer2.c - 664 sys sys 956186252 8602
 sys/src/games/mp3dec/layer3.c - 664 sys sys 956186252 50154
-sys/src/games/mp3dec/mkfile - 664 sys sys 956257007 824
+sys/src/games/mp3dec/mkfile - 664 sys sys 1196544425 839
 sys/src/games/mp3dec/mpg123.c - 664 sys sys 956186253 33082
 sys/src/games/mp3dec/mpg123.h - 664 sys sys 956256699 9852
 sys/src/games/mp3dec/readers.c - 664 sys sys 956186253 9684
@@ -14594,7 +14595,7 @@ sys/src/games/mp3enc/machine.h - 664 sys sys 986804078 3561
 sys/src/games/mp3enc/main.c - 664 sys sys 1187996179 7153
 sys/src/games/mp3enc/main.h - 664 sys sys 986804326 1552
 sys/src/games/mp3enc/memory.h - 664 sys sys 986804049 40
-sys/src/games/mp3enc/mkfile - 664 sys sys 1188011539 1108
+sys/src/games/mp3enc/mkfile - 664 sys sys 1196544606 1086
 sys/src/games/mp3enc/mpglib_interface.c - 664 sys sys 986804078 4606
 sys/src/games/mp3enc/newmdct.c - 664 sys sys 986804078 32298
 sys/src/games/mp3enc/newmdct.h - 664 sys sys 986804078 1017

+ 6 - 5
dist/replica/plan9.db

@@ -487,7 +487,8 @@
 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/usbprinter - 775 sys sys 1089408719 222
+386/bin/usb/usbprint - 775 sys sys 1196537245 314
+386/bin/usb/usbprobe - 775 sys sys 1196537245 173
 386/bin/vac - 775 sys sys 1189146367 170972
 386/bin/vacfs - 775 sys sys 1189146374 175780
 386/bin/venti - 20000000775 sys sys 947360466 0
@@ -6214,7 +6215,7 @@ sys/lib/dist/cmd/touchfs.c - 664 sys sys 1018469727 1120
 sys/lib/dist/cmd/unbflz.c - 664 sys sys 1018469727 1688
 sys/lib/dist/logcompress.awk - 664 sys sys 1068558028 298
 sys/lib/dist/logtime.awk - 664 sys sys 1019526213 38
-sys/lib/dist/mkfile - 664 sys sys 1188441860 5380
+sys/lib/dist/mkfile - 664 sys sys 1196547774 5490
 sys/lib/dist/pc - 20000000775 sys sys 1147022870 0
 sys/lib/dist/pc/cd0.proto - 664 sys sys 1114358485 7
 sys/lib/dist/pc/empty - 20000000775 sys sys 1020895854 0
@@ -7395,7 +7396,7 @@ sys/man/1/eqn - 664 sys sys 1134592617 5655
 sys/man/1/expect - 664 sys sys 1165622338 3018
 sys/man/1/faces - 664 sys sys 1113743326 2395
 sys/man/1/factor - 664 sys sys 1135084026 1015
-sys/man/1/fedex - 664 sys sys 1196368212 399
+sys/man/1/fedex - 664 sys sys 1196533426 528
 sys/man/1/file - 664 sys sys 1157143697 1481
 sys/man/1/filter - 664 sys sys 1159419912 6143
 sys/man/1/fmt - 664 sys sys 1070032221 1557
@@ -14557,7 +14558,7 @@ sys/src/games/mp3dec/l2tables.h - 664 sys sys 956186252 8305
 sys/src/games/mp3dec/layer1.c - 664 sys sys 956186252 3764
 sys/src/games/mp3dec/layer2.c - 664 sys sys 956186252 8602
 sys/src/games/mp3dec/layer3.c - 664 sys sys 956186252 50154
-sys/src/games/mp3dec/mkfile - 664 sys sys 956257007 824
+sys/src/games/mp3dec/mkfile - 664 sys sys 1196544425 839
 sys/src/games/mp3dec/mpg123.c - 664 sys sys 956186253 33082
 sys/src/games/mp3dec/mpg123.h - 664 sys sys 956256699 9852
 sys/src/games/mp3dec/readers.c - 664 sys sys 956186253 9684
@@ -14594,7 +14595,7 @@ sys/src/games/mp3enc/machine.h - 664 sys sys 986804078 3561
 sys/src/games/mp3enc/main.c - 664 sys sys 1187996179 7153
 sys/src/games/mp3enc/main.h - 664 sys sys 986804326 1552
 sys/src/games/mp3enc/memory.h - 664 sys sys 986804049 40
-sys/src/games/mp3enc/mkfile - 664 sys sys 1188011539 1108
+sys/src/games/mp3enc/mkfile - 664 sys sys 1196544606 1086
 sys/src/games/mp3enc/mpglib_interface.c - 664 sys sys 986804078 4606
 sys/src/games/mp3enc/newmdct.c - 664 sys sys 986804078 32298
 sys/src/games/mp3enc/newmdct.h - 664 sys sys 986804078 1017

+ 10 - 0
dist/replica/plan9.log

@@ -17526,3 +17526,13 @@
 1196460005 2 c sys/src/cmd/cpp/eval.c - 664 sys sys 1196458908 9898
 1196460005 3 c sys/src/cmd/cpp/include.c - 664 sys sys 1196458932 2857
 1196460005 4 c sys/src/cmd/cpp/macro.c - 664 sys sys 1196458858 11352
+1196533804 0 a 386/bin/usb/usbprint - 775 sys sys 1196532784 314
+1196533804 1 a 386/bin/usb/usbprobe - 775 sys sys 1196532898 173
+1196533804 2 c sys/man/1/fedex - 664 sys sys 1196533426 528
+1196533804 3 d 386/bin/usb/usbprinter - 775 sys sys 1089408719 0
+1196537404 0 c 386/bin/usb/usbprint - 775 sys sys 1196537245 314
+1196537404 1 c 386/bin/usb/usbprobe - 775 sys sys 1196537245 173
+1196544604 0 c sys/src/games/mp3dec/mkfile - 664 sys sys 1196544425 839
+1196544604 1 c sys/src/games/mp3enc/mkfile - 664 sys sys 1196544606 1086
+1196546405 0 c sys/lib/dist/mkfile - 664 sys sys 1196546534 5498
+1196548204 0 c sys/lib/dist/mkfile - 664 sys sys 1196547774 5490

+ 8 - 2
sys/lib/dist/mkfile

@@ -42,10 +42,13 @@ scan:V:
 	replica/scan $dist/sources.replica <scan.lock
 
 compresslog:V:
+	{
 	awk -f logcompress.awk $d/dist/replica/plan9.log |
 		awk -f logtime.awk -v 't='^`{date -n} >/tmp/plan9.log
-	rm $d/dist/replica/plan9.log
-	cp /tmp/plan9.log $d/dist/replica/plan9.log
+	rm $d/dist/replica/plan9.new.log
+	cp /tmp/plan9.log $d/dist/replica/plan9.new.log &&
+		mv $d/dist/replica/plan9.new.log $d/dist/replica/plan9.log
+	} <scan.lock
 
 #restart:V:
 #	rm -f $d/dist/replica/plan9.db
@@ -124,6 +127,9 @@ reencode:V:
 	disk/mk9660 -9cj -v 'Plan 9 Extras' -s /n/sources \
 		-p ./contrib.proto $target
 
+rebuild:V:
+	rebuild
+
 rebuild-mail:V:
 	rebuild
 	datemail 'nightly build errors' 9trouble <buildit.out

+ 10 - 4
sys/man/1/fedex

@@ -1,20 +1,26 @@
 .TH FEDEX 1
 .SH NAME
-fedex, ups \- track shipments
+fedex, ups, usps \- track shipments
 .SH SYNOPSIS
 .B fedex 
 .I tracking-number
 .br
 .B ups 
 .I tracking-number
+.br
+.B usps
+.I tracking-number
 .SH DESCRIPTION
 .I Fedex
-writes available shipment details for the given 12-digit
+writes available shipment details for the given Federal Express 12-digit
 .I tracking-number
 on the standard output.
 .I Ups
-is similar, but takes 18-digit
-.IR tracking-number s.
+is similar, but takes a United Parcel Service 18-digit
+.IR tracking-number .
+.I Usps
+takes a US Post Office
+.IR tracking-number .
 .SH SOURCE
 .B /rc/bin
 .SH BUGS

+ 2 - 0
sys/src/games/mp3dec/mkfile

@@ -57,6 +57,8 @@ $O.out:	$OFILES
 
 %.$O:	$HFILES
 
+all:V: $O.out
+
 clean:V:
 	rm -f *.[$OS] [$OS].out
 

+ 1 - 1
sys/src/games/mp3enc/mkfile

@@ -32,7 +32,7 @@ OFILES=\
 
 BIN=/$objtype/bin/games
 # need a way to ignore this on non-386en
-LIB=/$objtype/lib/lib387.a
+LIB=
 </sys/src/cmd/mkone
 
 CC=pcc