Browse Source

Plan 9 from Bell Labs 2008-04-05

David du Colombier 13 years ago
parent
commit
ce49daeac1
9 changed files with 99 additions and 52 deletions
  1. 24 22
      dist/replica/_plan9.db
  2. 24 23
      dist/replica/plan9.db
  3. 25 0
      dist/replica/plan9.log
  4. 2 1
      rc/bin/cpurc
  5. 9 0
      rc/bin/dontkill
  6. 2 0
      rc/bin/termrc
  7. 2 2
      rc/bin/usbfat:
  8. 5 1
      rc/bin/usbstart
  9. 6 3
      sys/src/cmd/cpu.c

+ 24 - 22
dist/replica/_plan9.db

@@ -500,28 +500,28 @@
 386/bin/vac - 775 sys sys 1196742539 171330
 386/bin/vacfs - 775 sys sys 1196742542 176138
 386/bin/venti - 20000000775 sys sys 947360466 0
-386/bin/venti/buildindex - 775 sys sys 1207166101 259174
-386/bin/venti/checkarenas - 775 sys sys 1207166106 261053
-386/bin/venti/checkindex - 775 sys sys 1207166111 256483
-386/bin/venti/clumpstats - 775 sys sys 1207166115 245419
+386/bin/venti/buildindex - 775 sys sys 1207280789 259272
+386/bin/venti/checkarenas - 775 sys sys 1207280794 261151
+386/bin/venti/checkindex - 775 sys sys 1207280799 256581
+386/bin/venti/clumpstats - 775 sys sys 1207280803 245517
 386/bin/venti/conf - 775 sys sys 1189362423 1505
 386/bin/venti/copy - 775 sys sys 1196742562 141428
-386/bin/venti/findscore - 775 sys sys 1207166120 247455
-386/bin/venti/fixarenas - 775 sys sys 1196742570 212775
-386/bin/venti/fmtarenas - 775 sys sys 1207166125 247688
-386/bin/venti/fmtbloom - 775 sys sys 1196742577 168476
-386/bin/venti/fmtindex - 775 sys sys 1207166129 245686
-386/bin/venti/fmtisect - 775 sys sys 1207166135 246038
-386/bin/venti/mirrorarenas - 775 sys sys 1207166139 255146
-386/bin/venti/printarena - 775 sys sys 1207166145 257727
-386/bin/venti/rdarena - 775 sys sys 1207166150 247159
+386/bin/venti/findscore - 775 sys sys 1207280807 247553
+386/bin/venti/fixarenas - 775 sys sys 1207280811 212859
+386/bin/venti/fmtarenas - 775 sys sys 1207280815 247786
+386/bin/venti/fmtbloom - 775 sys sys 1207280819 168560
+386/bin/venti/fmtindex - 775 sys sys 1207280823 245784
+386/bin/venti/fmtisect - 775 sys sys 1207280828 246136
+386/bin/venti/mirrorarenas - 775 sys sys 1207280832 255244
+386/bin/venti/printarena - 775 sys sys 1207280836 257825
+386/bin/venti/rdarena - 775 sys sys 1207280841 247257
 386/bin/venti/read - 775 sys sys 1190716746 154800
 386/bin/venti/ro - 775 sys sys 1191273722 161694
 386/bin/venti/sync - 775 sys sys 1190716753 153672
-386/bin/venti/syncindex - 775 sys sys 1207166156 267073
-386/bin/venti/venti - 775 sys sys 1207166167 705792
-386/bin/venti/verifyarena - 775 sys sys 1191273738 166940
-386/bin/venti/wrarena - 775 sys sys 1207166173 284042
+386/bin/venti/syncindex - 775 sys sys 1207280845 267171
+386/bin/venti/venti - 775 sys sys 1207280858 705890
+386/bin/venti/verifyarena - 775 sys sys 1207280861 167024
+386/bin/venti/wrarena - 775 sys sys 1207280866 284140
 386/bin/venti/write - 775 sys sys 1190716792 155215
 386/bin/vncs - 775 sys sys 1206478986 473163
 386/bin/vncv - 775 sys sys 1206478996 520588
@@ -5511,7 +5511,7 @@ rc/bin/b: - 775 sys sys 1015089510 204
 rc/bin/broke - 775 sys sys 1143389260 142
 rc/bin/bundle - 775 sys sys 945617206 173
 rc/bin/c: - 775 sys sys 1015089511 86
-rc/bin/cpurc - 775 sys sys 1187226871 1901
+rc/bin/cpurc - 775 sys sys 1207348151 1975
 rc/bin/cpurc.local - 775 sys sys 1176827268 367
 rc/bin/delkey - 775 sys sys 1109429137 643
 rc/bin/dial - 20000000775 sys sys 1059180057 0
@@ -5522,6 +5522,7 @@ rc/bin/dmaon - 775 sys sys 1205288448 220
 rc/bin/doc2ps - 775 sys sys 1205813503 338
 rc/bin/doc2txt - 775 sys sys 1025197880 563
 rc/bin/doctype - 775 sys sys 1162921755 1727
+rc/bin/dontkill - 775 sys sys 1207346989 293
 rc/bin/dosmnt - 775 sys sys 1109288224 303
 rc/bin/dpost - 775 sys sys 1192741346 220
 rc/bin/eject - 775 sys sys 945617207 123
@@ -5636,7 +5637,7 @@ rc/bin/start - 775 sys sys 945617209 120
 rc/bin/stock - 775 sys sys 1143126371 292
 rc/bin/stop - 775 sys sys 945617209 110
 rc/bin/tel - 775 sys sys 1161209756 128
-rc/bin/termrc - 775 sys sys 1179769653 2479
+rc/bin/termrc - 775 sys sys 1207348859 2548
 rc/bin/termrc.local - 775 sys sys 1176500067 425
 rc/bin/thesaurus - 775 sys sys 1205183987 422
 rc/bin/tlsclienttunnel - 775 sys sys 1024375633 153
@@ -5647,8 +5648,8 @@ 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 1202933070 827
-rc/bin/usbstart - 775 sys sys 1044894155 81
+rc/bin/usbfat: - 775 sys sys 1207327063 829
+rc/bin/usbstart - 775 sys sys 1207327187 149
 rc/bin/usps - 775 sys sys 1016826030 450
 rc/bin/vwhois - 775 sys sys 1106409971 445
 rc/bin/wdoc2txt - 775 sys sys 1017431153 277
@@ -10092,7 +10093,7 @@ sys/src/cmd/cpp/mkfile - 664 sys sys 944960879 178
 sys/src/cmd/cpp/nlist.c - 664 sys sys 1188413849 4745
 sys/src/cmd/cpp/test.c - 664 sys sys 944960879 47
 sys/src/cmd/cpp/tokens.c - 664 sys sys 944960879 6755
-sys/src/cmd/cpu.c - 664 sys sys 1194215126 20932
+sys/src/cmd/cpu.c - 664 sys sys 1207333028 20941
 sys/src/cmd/crop.c - 664 sys sys 1134557476 4137
 sys/src/cmd/cwfs - 20000000775 sys sys 1174799196 0
 sys/src/cmd/cwfs/32bit.h - 664 sys sys 1171162581 594
@@ -15882,3 +15883,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/cpu - 775 sys sys 1207366109 139143

+ 24 - 23
dist/replica/plan9.db

@@ -192,7 +192,7 @@
 386/bin/con - 775 sys sys 1203482824 78416
 386/bin/cp - 775 sys sys 1168402297 63454
 386/bin/cpp - 775 sys sys 1196742451 149149
-386/bin/cpu - 775 sys sys 1196742454 139159
+386/bin/cpu - 775 sys sys 1207366109 139143
 386/bin/crop - 775 sys sys 1168402298 116374
 386/bin/cwfs - 775 sys sys 1203713012 365874
 386/bin/date - 775 sys sys 1178568265 41845
@@ -500,28 +500,28 @@
 386/bin/vac - 775 sys sys 1196742539 171330
 386/bin/vacfs - 775 sys sys 1196742542 176138
 386/bin/venti - 20000000775 sys sys 947360466 0
-386/bin/venti/buildindex - 775 sys sys 1207166101 259174
-386/bin/venti/checkarenas - 775 sys sys 1207166106 261053
-386/bin/venti/checkindex - 775 sys sys 1207166111 256483
-386/bin/venti/clumpstats - 775 sys sys 1207166115 245419
+386/bin/venti/buildindex - 775 sys sys 1207280789 259272
+386/bin/venti/checkarenas - 775 sys sys 1207280794 261151
+386/bin/venti/checkindex - 775 sys sys 1207280799 256581
+386/bin/venti/clumpstats - 775 sys sys 1207280803 245517
 386/bin/venti/conf - 775 sys sys 1189362423 1505
 386/bin/venti/copy - 775 sys sys 1196742562 141428
-386/bin/venti/findscore - 775 sys sys 1207166120 247455
-386/bin/venti/fixarenas - 775 sys sys 1196742570 212775
-386/bin/venti/fmtarenas - 775 sys sys 1207166125 247688
-386/bin/venti/fmtbloom - 775 sys sys 1196742577 168476
-386/bin/venti/fmtindex - 775 sys sys 1207166129 245686
-386/bin/venti/fmtisect - 775 sys sys 1207166135 246038
-386/bin/venti/mirrorarenas - 775 sys sys 1207166139 255146
-386/bin/venti/printarena - 775 sys sys 1207166145 257727
-386/bin/venti/rdarena - 775 sys sys 1207166150 247159
+386/bin/venti/findscore - 775 sys sys 1207280807 247553
+386/bin/venti/fixarenas - 775 sys sys 1207280811 212859
+386/bin/venti/fmtarenas - 775 sys sys 1207280815 247786
+386/bin/venti/fmtbloom - 775 sys sys 1207280819 168560
+386/bin/venti/fmtindex - 775 sys sys 1207280823 245784
+386/bin/venti/fmtisect - 775 sys sys 1207280828 246136
+386/bin/venti/mirrorarenas - 775 sys sys 1207280832 255244
+386/bin/venti/printarena - 775 sys sys 1207280836 257825
+386/bin/venti/rdarena - 775 sys sys 1207280841 247257
 386/bin/venti/read - 775 sys sys 1190716746 154800
 386/bin/venti/ro - 775 sys sys 1191273722 161694
 386/bin/venti/sync - 775 sys sys 1190716753 153672
-386/bin/venti/syncindex - 775 sys sys 1207166156 267073
-386/bin/venti/venti - 775 sys sys 1207166167 705792
-386/bin/venti/verifyarena - 775 sys sys 1191273738 166940
-386/bin/venti/wrarena - 775 sys sys 1207166173 284042
+386/bin/venti/syncindex - 775 sys sys 1207280845 267171
+386/bin/venti/venti - 775 sys sys 1207280858 705890
+386/bin/venti/verifyarena - 775 sys sys 1207280861 167024
+386/bin/venti/wrarena - 775 sys sys 1207280866 284140
 386/bin/venti/write - 775 sys sys 1190716792 155215
 386/bin/vncs - 775 sys sys 1206478986 473163
 386/bin/vncv - 775 sys sys 1206478996 520588
@@ -5511,7 +5511,7 @@ rc/bin/b: - 775 sys sys 1015089510 204
 rc/bin/broke - 775 sys sys 1143389260 142
 rc/bin/bundle - 775 sys sys 945617206 173
 rc/bin/c: - 775 sys sys 1015089511 86
-rc/bin/cpurc - 775 sys sys 1187226871 1901
+rc/bin/cpurc - 775 sys sys 1207348151 1975
 rc/bin/cpurc.local - 775 sys sys 1176827268 367
 rc/bin/delkey - 775 sys sys 1109429137 643
 rc/bin/dial - 20000000775 sys sys 1059180057 0
@@ -5522,6 +5522,7 @@ rc/bin/dmaon - 775 sys sys 1205288448 220
 rc/bin/doc2ps - 775 sys sys 1205813503 338
 rc/bin/doc2txt - 775 sys sys 1025197880 563
 rc/bin/doctype - 775 sys sys 1162921755 1727
+rc/bin/dontkill - 775 sys sys 1207346989 293
 rc/bin/dosmnt - 775 sys sys 1109288224 303
 rc/bin/dpost - 775 sys sys 1192741346 220
 rc/bin/eject - 775 sys sys 945617207 123
@@ -5636,7 +5637,7 @@ rc/bin/start - 775 sys sys 945617209 120
 rc/bin/stock - 775 sys sys 1143126371 292
 rc/bin/stop - 775 sys sys 945617209 110
 rc/bin/tel - 775 sys sys 1161209756 128
-rc/bin/termrc - 775 sys sys 1179769653 2479
+rc/bin/termrc - 775 sys sys 1207348859 2548
 rc/bin/termrc.local - 775 sys sys 1176500067 425
 rc/bin/thesaurus - 775 sys sys 1205183987 422
 rc/bin/tlsclienttunnel - 775 sys sys 1024375633 153
@@ -5647,8 +5648,8 @@ 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 1202933070 827
-rc/bin/usbstart - 775 sys sys 1044894155 81
+rc/bin/usbfat: - 775 sys sys 1207327063 829
+rc/bin/usbstart - 775 sys sys 1207327187 149
 rc/bin/usps - 775 sys sys 1016826030 450
 rc/bin/vwhois - 775 sys sys 1106409971 445
 rc/bin/wdoc2txt - 775 sys sys 1017431153 277
@@ -10092,7 +10093,7 @@ sys/src/cmd/cpp/mkfile - 664 sys sys 944960879 178
 sys/src/cmd/cpp/nlist.c - 664 sys sys 1188413849 4745
 sys/src/cmd/cpp/test.c - 664 sys sys 944960879 47
 sys/src/cmd/cpp/tokens.c - 664 sys sys 944960879 6755
-sys/src/cmd/cpu.c - 664 sys sys 1194215126 20932
+sys/src/cmd/cpu.c - 664 sys sys 1207333028 20941
 sys/src/cmd/crop.c - 664 sys sys 1134557476 4137
 sys/src/cmd/cwfs - 20000000775 sys sys 1174799196 0
 sys/src/cmd/cwfs/32bit.h - 664 sys sys 1171162581 594

+ 25 - 0
dist/replica/plan9.log

@@ -18940,3 +18940,28 @@
 1207252804 0 c sys/src/cmd/venti/srv/arena.c - 664 sys sys 1207253133 20156
 1207252804 1 c sys/src/cmd/venti/srv/conv.c - 664 sys sys 1207253152 15161
 1207254604 0 c sys/src/cmd/venti/srv/reseal.c - 664 sys sys 1207253699 6520
+1207281605 0 c 386/bin/venti/buildindex - 775 sys sys 1207280789 259272
+1207281605 1 c 386/bin/venti/checkarenas - 775 sys sys 1207280794 261151
+1207281605 2 c 386/bin/venti/checkindex - 775 sys sys 1207280799 256581
+1207281605 3 c 386/bin/venti/clumpstats - 775 sys sys 1207280803 245517
+1207281605 4 c 386/bin/venti/findscore - 775 sys sys 1207280807 247553
+1207281605 5 c 386/bin/venti/fixarenas - 775 sys sys 1207280811 212859
+1207281605 6 c 386/bin/venti/fmtarenas - 775 sys sys 1207280815 247786
+1207281605 7 c 386/bin/venti/fmtbloom - 775 sys sys 1207280819 168560
+1207281605 8 c 386/bin/venti/fmtindex - 775 sys sys 1207280823 245784
+1207281605 9 c 386/bin/venti/fmtisect - 775 sys sys 1207280828 246136
+1207281605 10 c 386/bin/venti/mirrorarenas - 775 sys sys 1207280832 255244
+1207281605 11 c 386/bin/venti/printarena - 775 sys sys 1207280836 257825
+1207281605 12 c 386/bin/venti/rdarena - 775 sys sys 1207280841 247257
+1207281605 13 c 386/bin/venti/syncindex - 775 sys sys 1207280845 267171
+1207281605 14 c 386/bin/venti/venti - 775 sys sys 1207280858 705890
+1207281605 15 c 386/bin/venti/verifyarena - 775 sys sys 1207280861 167024
+1207281605 16 c 386/bin/venti/wrarena - 775 sys sys 1207280866 284140
+1207328404 0 c rc/bin/usbstart - 775 sys sys 1207327187 149
+1207328404 1 c rc/bin/usbfat: - 775 sys sys 1207327063 829
+1207333805 0 c sys/src/cmd/cpu.c - 664 sys sys 1207333028 20941
+1207348204 0 c rc/bin/cpurc - 775 sys sys 1207348151 1975
+1207348204 1 c rc/bin/termrc - 775 sys sys 1207348178 2557
+1207348204 2 a rc/bin/dontkill - 775 sys sys 1207346989 293
+1207350004 0 c rc/bin/termrc - 775 sys sys 1207348859 2548
+1207366204 0 c 386/bin/cpu - 775 sys sys 1207366109 139143

+ 2 - 1
rc/bin/cpurc

@@ -69,6 +69,7 @@ if(! ps|grep -s timesync) {
 if(test -e /cfg/$sysname/cpustart)
 	. /cfg/$sysname/cpustart
 
-# echo `{date} $sysname >>/sys/log/boot
+dontkill '^(ipconfig|factotum|mntgen|venti|fossil|cs|dns|listen|reboot)$'
 
+# echo `{date} $sysname >>/sys/log/boot
 exit ''

+ 9 - 0
rc/bin/dontkill

@@ -0,0 +1,9 @@
+#!/bin/rc
+# dontkill regexp - mark invoker's processes with names matching regexp
+#	as not killable when the kernel runs out of memory
+if (! ~ $#* 1) {
+	echo $0 regexp >[1=2]
+	exit usage
+}
+# see /sys/src/9/port/proc.c:/^killbig
+exec chmod -w /proc/^`{psu | awk '$NF ~ /'$1'/ {print $2}'}^/ctl

+ 2 - 0
rc/bin/termrc

@@ -100,3 +100,5 @@ if(test -f /dev/mousectl){
 usbstart
 if (test -f /dev/apm)
 	aux/apm
+
+dontkill '^(ipconfig|factotum|mntgen|fossil|cs|dns|listen|reboot)$'

+ 2 - 2
rc/bin/usbfat:

@@ -28,9 +28,9 @@ case *
 	exit usage
 }
 
-if (! test -e $disk)
-	usb/disk $opts || exit 'no disk'
 if (! test -f /srv/usbfat.$user) {
+	if (! test -e $disk)
+		usb/disk $opts || exit 'no disk'
 	blk = `{disk/fdisk -p $disk | awk '/^part dos / {print $3}'}
 	if (~ $#blk 0 || ! ~ $blk [0-9]*) {
 		echo $0: warning: no fdisk dos partition found... >[1=2]

+ 5 - 1
rc/bin/usbstart

@@ -1,7 +1,11 @@
 #!/bin/rc
 
-if (test -r '#U'/usb0) {
+if(test -r '#U'/usb0) {
+	if(! test -r /dev/usb0)
+		bind -a '#U' /dev
 	usb/usbd
 	usb/usbmouse -a 2
+	usb/kb -k
 	usb/usbaudio
+	# usb/print
 }

+ 6 - 3
sys/src/cmd/cpu.c

@@ -71,7 +71,9 @@ int setam(char*);
 void
 usage(void)
 {
-	fprint(2, "usage: cpu [-h system] [-u user] [-a authmethod] [-e 'crypt hash'] [-k keypattern] [-P patternfile] [-c cmd args ...]\n");
+	fprint(2, "usage: cpu [-h system] [-u user] [-a authmethod] "
+		"[-e 'crypt hash'] [-k keypattern] [-P patternfile] "
+		"[-c cmd arg ...]\n");
 	exits("usage");
 }
 
@@ -215,9 +217,10 @@ fatal(int syserr, char *fmt, ...)
 	va_end(arg);
 	if(syserr)
 		fmtprint(&f, ": %r");
-	fmtprint(&f, "\n");
 	str = fmtstrflush(&f);
-	write(2, str, strlen(str));
+
+	fprint(2, "%s\n", str);
+	syslog(0, "cpu", str);
 	exits(str);
 }