Browse Source

Plan 9 from Bell Labs 2007-01-09

David du Colombier 14 years ago
parent
commit
fe974559b6
59 changed files with 706 additions and 402 deletions
  1. 1 0
      386/include/u.h
  2. 1 1
      acme/mail/mkbox
  3. 57 56
      dist/replica/_plan9.db
  4. 56 56
      dist/replica/plan9.db
  5. 57 0
      dist/replica/plan9.log
  6. 1 1
      rc/bin/man
  7. 5 0
      sys/include/libc.h
  8. 85 51
      sys/lib/dist/mkfile
  9. 1 1
      sys/lib/dist/pc/mkfile
  10. 5 1
      sys/lib/lp/daemon/hp
  11. 5 2
      sys/lib/lp/daemon/tcppost
  12. 2 0
      sys/lib/mimetype
  13. 13 9
      sys/man/4/dossrv
  14. 11 1
      sys/man/4/ramfs
  15. 2 0
      sys/src/9/boot/aux.c
  16. 1 1
      sys/src/9/ip/ipifc.c
  17. 1 1
      sys/src/9/ip/iproute.c
  18. 2 0
      sys/src/9/pc/dat.h
  19. 8 1
      sys/src/9/pc/devarch.c
  20. 16 23
      sys/src/9/pc/devusb.c
  21. 2 2
      sys/src/9/pc/ether8169.c
  22. 27 6
      sys/src/9/pc/etherga620.c
  23. 7 4
      sys/src/9/pc/etherigbe.c
  24. 3 3
      sys/src/9/pc/ethermii.c
  25. 1 0
      sys/src/9/pc/fns.h
  26. 2 1
      sys/src/9/pc/main.c
  27. 11 0
      sys/src/9/pc/mmu.c
  28. 56 35
      sys/src/9/pc/trap.c
  29. 8 7
      sys/src/9/pc/usbuhci.c
  30. 3 1
      sys/src/9/port/devcap.c
  31. 1 1
      sys/src/9/port/devcons.c
  32. 4 3
      sys/src/9/port/devproc.c
  33. 3 3
      sys/src/boot/pc/bootp.c
  34. 5 2
      sys/src/cmd/9660srv/iobuf.c
  35. 15 9
      sys/src/cmd/9660srv/main.c
  36. 1 1
      sys/src/cmd/auth/cron.c
  37. 1 1
      sys/src/cmd/auth/secureidcheck.c
  38. 37 1
      sys/src/cmd/aux/conswdir.c
  39. 1 1
      sys/src/cmd/aux/gps/dat.h
  40. 1 1
      sys/src/cmd/cc/com.c
  41. 1 0
      sys/src/cmd/cc/dpchk.c
  42. 17 9
      sys/src/cmd/fossil/9auth.c
  43. 1 1
      sys/src/cmd/fossil/9fsys.c
  44. 1 1
      sys/src/cmd/pr.c
  45. 7 2
      sys/src/cmd/ramfs.c
  46. 1 1
      sys/src/cmd/scuzz/scsireq.c
  47. 14 14
      sys/src/cmd/scuzz/scsireq.h
  48. 22 11
      sys/src/cmd/usb/lib/device.c
  49. 78 48
      sys/src/cmd/usb/lib/dump.c
  50. 3 2
      sys/src/cmd/usb/usbd/hub.c
  51. 14 5
      sys/src/cmd/usb/usbd/setup.c
  52. 11 5
      sys/src/cmd/usb/usbd/usbd.c
  53. 0 2
      sys/src/cmd/vac/file.c
  54. 2 1
      sys/src/cmd/venti/lumpqueue.c
  55. 4 0
      sys/src/libauth/newns.c
  56. 4 0
      sys/src/libauthsrv/readnvram.c
  57. 3 3
      sys/src/libc/386/cycles.s
  58. 1 6
      sys/src/libc/port/pool.c
  59. 3 4
      sys/src/libc/port/profile.c

+ 1 - 0
386/include/u.h

@@ -7,6 +7,7 @@ typedef   signed char	schar;
 typedef	long long	vlong;
 typedef	unsigned long long uvlong;
 typedef unsigned long	uintptr;
+typedef unsigned long	usize;
 typedef	ushort		Rune;
 typedef union FPdbleword FPdbleword;
 typedef long		jmp_buf[2];

+ 1 - 1
acme/mail/mkbox

@@ -1,7 +1,7 @@
 #!/bin/rc
 
 for(i){
-	if(! test -f $i){
+	if(! test -e $i){
 		if(cp /dev/null $i){
 			chmod 600 $i
 			chmod +al $i

+ 57 - 56
dist/replica/_plan9.db

@@ -526,7 +526,7 @@
 386/include/ape/math.h - 664 sys sys 1087406385 2123
 386/include/ape/stdarg.h - 664 sys sys 944946040 276
 386/include/ape/ureg.h - 664 sys sys 944946041 812
-386/include/u.h - 664 sys sys 1115924095 1481
+386/include/u.h - 664 sys sys 1168306831 1510
 386/include/ureg.h - 664 sys sys 944946012 523
 386/init - 775 sys sys 1148500704 101512
 386/ld.com - 775 sys sys 1161230065 73464
@@ -696,7 +696,7 @@ acme/bin/unind - 775 sys sys 1015011256 27
 acme/bin/wnew - 775 sys sys 1046184422 84
 acme/mail - 20000000775 sys sys 1114697834 0
 acme/mail/guide - 444 sys sys 1015011264 92
-acme/mail/mkbox - 775 sys sys 1018029993 133
+acme/mail/mkbox - 775 sys sys 1168306880 133
 acme/mail/readme - 664 sys sys 1084385076 2795
 acme/mail/src - 20000000775 sys sys 1058463659 0
 acme/mail/src/dat.h - 664 sys sys 1033936953 3857
@@ -5463,7 +5463,7 @@ rc/bin/leak - 775 sys sys 1139744263 1052
 rc/bin/lookman - 775 sys sys 1017679344 686
 rc/bin/lp - 775 sys sys 1162105982 5201
 rc/bin/mail - 775 sys sys 1045504003 138
-rc/bin/man - 775 sys sys 1155361978 2516
+rc/bin/man - 775 sys sys 1168305408 2538
 rc/bin/map - 775 sys sys 945617207 1576
 rc/bin/mapdemo - 775 sys sys 945617207 4075
 rc/bin/membername - 775 sys sys 945617207 89
@@ -6024,7 +6024,7 @@ sys/include/html.h - 664 sys sys 1128662123 15232
 sys/include/httpd.h - 664 sys sys 1091904418 5771
 sys/include/ip.h - 664 sys sys 1103554773 2989
 sys/include/keyboard.h - 664 sys sys 1131637696 865
-sys/include/libc.h - 664 sys sys 1143129918 19699
+sys/include/libc.h - 664 sys sys 1168306860 19851
 sys/include/libsec.h - 664 sys sys 1124709121 9345
 sys/include/mach.h - 664 sys sys 1143814376 8641
 sys/include/memdraw.h - 664 sys sys 1091904419 5645
@@ -6137,7 +6137,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 1132452664 4522
+sys/lib/dist/mkfile - 664 sys sys 1168307719 5076
 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
@@ -6200,7 +6200,7 @@ sys/lib/dist/pc/inst/stopppp - 775 sys sys 1018469719 250
 sys/lib/dist/pc/inst/textonly - 775 sys sys 1112361039 182
 sys/lib/dist/pc/inst/watchfd - 775 sys sys 1127670125 362
 sys/lib/dist/pc/inst/xxx - 775 sys sys 1018469719 160
-sys/lib/dist/pc/mkfile - 664 sys sys 1142958580 2193
+sys/lib/dist/pc/mkfile - 664 sys sys 1168307754 2210
 sys/lib/dist/pc/multi - 20000000775 sys sys 1147022870 0
 sys/lib/dist/pc/plan9.ini - 664 sys sys 1142177575 236
 sys/lib/dist/pc/plan9.ini.blank - 664 sys sys 1018469720 512
@@ -6535,7 +6535,7 @@ sys/lib/lp/daemon/appletalk - 775 sys sys 954037458 255
 sys/lib/lp/daemon/dkcat - 775 sys sys 954037458 210
 sys/lib/lp/daemon/dumb - 775 sys sys 954037458 164
 sys/lib/lp/daemon/generic - 775 sys sys 1015012112 3962
-sys/lib/lp/daemon/hp - 775 sys sys 954037458 364
+sys/lib/lp/daemon/hp - 775 sys sys 1168305613 383
 sys/lib/lp/daemon/justsend - 775 sys sys 971810200 221
 sys/lib/lp/daemon/lpd-tek - 775 sys sys 1015012112 378
 sys/lib/lp/daemon/lpddaemon - 775 sys sys 954037458 407
@@ -6544,7 +6544,7 @@ sys/lib/lp/daemon/lps - 775 sys sys 954037458 259
 sys/lib/lp/daemon/pcclone - 775 sys sys 954037458 293
 sys/lib/lp/daemon/post - 775 sys sys 954037458 234
 sys/lib/lp/daemon/post.warn - 775 sys sys 954037458 1033
-sys/lib/lp/daemon/tcppost - 775 sys sys 954037458 348
+sys/lib/lp/daemon/tcppost - 775 sys sys 1168305628 288
 sys/lib/lp/daemon/tektronix - 775 sys sys 954037458 364
 sys/lib/lp/daemon/xante - 775 sys sys 954037458 364
 sys/lib/lp/daemon/xerox - 775 sys sys 954037458 326
@@ -6631,7 +6631,7 @@ sys/lib/man/preface4 - 664 sys sys 1020082276 1758
 sys/lib/man/secindex - 775 sys sys 956337727 322
 sys/lib/man/title - 664 sys sys 1019915894 746
 sys/lib/man/trademarks - 664 sys sys 958527089 1838
-sys/lib/mimetype - 664 sys sys 1120564829 6236
+sys/lib/mimetype - 664 sys sys 1168305580 6313
 sys/lib/newuser - 775 sys sys 1112362340 1226
 sys/lib/plumb - 20000000775 sys sys 1039727360 0
 sys/lib/plumb/basic - 664 sys sys 1155363394 2879
@@ -7611,7 +7611,7 @@ sys/man/4/archfs - 664 sys sys 960000712 533
 sys/man/4/cdfs - 664 sys sys 1026846913 3638
 sys/man/4/cfs - 664 sys sys 1015024813 1758
 sys/man/4/consolefs - 664 sys sys 1144424854 4245
-sys/man/4/dossrv - 664 sys sys 1015024813 4176
+sys/man/4/dossrv - 664 sys sys 1168307403 4334
 sys/man/4/execnet - 664 sys sys 1019866708 1069
 sys/man/4/exportfs - 664 sys sys 1145881912 4655
 sys/man/4/ext2srv - 664 sys sys 1055692986 2409
@@ -7631,7 +7631,7 @@ 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 1017723482 1541
 sys/man/4/plumber - 664 sys sys 944959699 2748
-sys/man/4/ramfs - 664 sys sys 1127393035 1447
+sys/man/4/ramfs - 664 sys sys 1168307208 1642
 sys/man/4/ratfs - 664 sys sys 1157898800 3276
 sys/man/4/rdbfs - 664 sys sys 944959699 1123
 sys/man/4/rio - 664 sys sys 1023206844 8660
@@ -7873,7 +7873,7 @@ sys/src/9/bitsy/uartsa1110.c - 664 sys sys 1142741102 8537
 sys/src/9/bitsy/wavelan.c - 664 sys sys 1116097770 27267
 sys/src/9/bitsy/wavelan.h - 664 sys sys 1037029076 27
 sys/src/9/boot - 20000000775 sys sys 1161222920 0
-sys/src/9/boot/aux.c - 664 sys sys 1063857702 2579
+sys/src/9/boot/aux.c - 664 sys sys 1168305725 2586
 sys/src/9/boot/boot.c - 664 sys sys 1146746630 6013
 sys/src/9/boot/boot.h - 664 sys sys 1063857659 1785
 sys/src/9/boot/bootauth.c - 664 sys sys 1131289783 1160
@@ -7908,9 +7908,9 @@ sys/src/9/ip/inferno.c - 664 sys sys 1022588098 517
 sys/src/9/ip/ip.c - 664 sys sys 1101906449 15285
 sys/src/9/ip/ip.h - 664 sys sys 1162907930 15760
 sys/src/9/ip/ipaux.c - 664 sys sys 1079538100 12862
-sys/src/9/ip/ipifc.c - 664 sys sys 1146151712 34215
+sys/src/9/ip/ipifc.c - 664 sys sys 1168305861 34233
 sys/src/9/ip/ipmux.c - 664 sys sys 1047260566 15362
-sys/src/9/ip/iproute.c - 664 sys sys 1049423192 14763
+sys/src/9/ip/iproute.c - 664 sys sys 1168305878 14778
 sys/src/9/ip/ipv6.c - 664 sys sys 1047951328 14433
 sys/src/9/ip/ipv6.h - 664 sys sys 1087406259 4321
 sys/src/9/ip/loopbackmedium.c - 664 sys sys 1055701769 1671
@@ -7960,8 +7960,8 @@ sys/src/9/pc/apmjump.s - 664 sys sys 1032058947 1527
 sys/src/9/pc/archmp.c - 664 sys sys 1131290214 2357
 sys/src/9/pc/audio.h - 664 sys sys 1015014513 343
 sys/src/9/pc/cga.c - 664 sys sys 1015014513 1843
-sys/src/9/pc/dat.h - 664 sys sys 1147098951 6654
-sys/src/9/pc/devarch.c - 664 sys sys 1143129812 19249
+sys/src/9/pc/dat.h - 664 sys sys 1168305049 6693
+sys/src/9/pc/devarch.c - 664 sys sys 1168305121 19340
 sys/src/9/pc/devether.c - 664 sys sys 1131290265 10315
 sys/src/9/pc/devfloppy.c - 664 sys sys 1142958305 20139
 sys/src/9/pc/devi82365.c - 664 sys sys 1146318335 20504
@@ -7972,7 +7972,7 @@ sys/src/9/pc/devlpt.c - 664 sys sys 1015014514 4420
 sys/src/9/pc/devpccard.c - 664 sys sys 1162222267 39301
 sys/src/9/pc/devrtc.c - 664 sys sys 1015014515 7167
 sys/src/9/pc/devtv.c - 664 sys sys 1131290299 45676
-sys/src/9/pc/devusb.c - 664 sys sys 1165555433 18791
+sys/src/9/pc/devusb.c - 664 sys sys 1168305372 18752
 sys/src/9/pc/devvga.c - 664 sys sys 1131290315 9332
 sys/src/9/pc/dma.c - 664 sys sys 1142966373 5332
 sys/src/9/pc/ether2000.c - 664 sys sys 1089299187 4819
@@ -7981,7 +7981,7 @@ sys/src/9/pc/ether589.c - 664 sys sys 1015014516 4644
 sys/src/9/pc/ether79c970.c - 664 sys sys 1160070602 14088
 sys/src/9/pc/ether8003.c - 664 sys sys 1015014516 6665
 sys/src/9/pc/ether8139.c - 664 sys sys 1160066369 18561
-sys/src/9/pc/ether8169.c - 664 sys sys 1162138241 25392
+sys/src/9/pc/ether8169.c - 664 sys sys 1168305932 25430
 sys/src/9/pc/ether82543gc.c - 664 sys sys 1131290377 32294
 sys/src/9/pc/ether82557.c - 664 sys sys 1153082663 30197
 sys/src/9/pc/ether83815.c - 664 sys sys 1140271743 26125
@@ -7990,11 +7990,11 @@ sys/src/9/pc/ether8390.h - 664 sys sys 1015014517 1511
 sys/src/9/pc/etherdp83820.c - 664 sys sys 1160069116 29352
 sys/src/9/pc/etherec2t.c - 664 sys sys 1135784135 4092
 sys/src/9/pc/etherelnk3.c - 664 sys sys 1158012427 48807
-sys/src/9/pc/etherga620.c - 664 sys sys 1134390125 28760
+sys/src/9/pc/etherga620.c - 664 sys sys 1168306078 29326
 sys/src/9/pc/etherga620fw.h - 664 sys sys 1026847642 222295
 sys/src/9/pc/etherif.h - 664 sys sys 1088178711 961
-sys/src/9/pc/etherigbe.c - 664 sys sys 1155995749 44820
-sys/src/9/pc/ethermii.c - 664 sys sys 1084331434 4612
+sys/src/9/pc/etherigbe.c - 664 sys sys 1168306113 44967
+sys/src/9/pc/ethermii.c - 664 sys sys 1168306129 4651
 sys/src/9/pc/ethermii.h - 664 sys sys 1086873891 3258
 sys/src/9/pc/etherrhine.c - 664 sys sys 1081706478 13799
 sys/src/9/pc/ethersink.c - 664 sys sys 1048644103 1076
@@ -8003,7 +8003,7 @@ sys/src/9/pc/ethervgbe.c - 664 sys sys 1160066496 26838
 sys/src/9/pc/ethervt6102.c - 664 sys sys 1131907459 22286
 sys/src/9/pc/etherwavelan.c - 664 sys sys 1131290380 3747
 sys/src/9/pc/floppy.h - 664 sys sys 1055700609 3835
-sys/src/9/pc/fns.h - 664 sys sys 1155995571 4564
+sys/src/9/pc/fns.h - 664 sys sys 1168303981 4587
 sys/src/9/pc/hcwAMC.h - 664 sys sys 1026860163 166004
 sys/src/9/pc/i8253.c - 664 sys sys 1139681387 6236
 sys/src/9/pc/i8259.c - 664 sys sys 1131290399 4586
@@ -8012,11 +8012,11 @@ sys/src/9/pc/initcode.s - 664 sys sys 1015014519 282
 sys/src/9/pc/io.h - 664 sys sys 1165555523 9406
 sys/src/9/pc/kbd.c - 664 sys sys 1132574883 12365
 sys/src/9/pc/l.s - 664 sys sys 1143129925 28552
-sys/src/9/pc/main.c - 664 sys sys 1162952105 15321
+sys/src/9/pc/main.c - 664 sys sys 1168306227 15337
 sys/src/9/pc/mem.h - 664 sys sys 1137622431 5203
 sys/src/9/pc/memory.c - 664 sys sys 1153172671 18773
 sys/src/9/pc/mkfile - 664 sys sys 1158794206 4004
-sys/src/9/pc/mmu.c - 664 sys sys 1164721711 24114
+sys/src/9/pc/mmu.c - 664 sys sys 1168306246 24320
 sys/src/9/pc/mouse.c - 664 sys sys 1098479254 7057
 sys/src/9/pc/mp.c - 664 sys sys 1162388126 17349
 sys/src/9/pc/mp.h - 664 sys sys 1153193597 6795
@@ -8048,13 +8048,13 @@ sys/src/9/pc/sdata.c - 664 sys sys 1167774860 52718
 sys/src/9/pc/sdmv50xx.c - 664 sys sys 1167774867 25865
 sys/src/9/pc/sdmylex.c - 664 sys sys 1167774835 27902
 sys/src/9/pc/sdscsi.c - 664 sys sys 1158889425 7241
-sys/src/9/pc/trap.c - 664 sys sys 1135487942 21257
+sys/src/9/pc/trap.c - 664 sys sys 1168306369 21848
 sys/src/9/pc/uartaxp.c - 664 sys sys 1166247784 18879
 sys/src/9/pc/uarti8250.c - 664 sys sys 1102820421 13958
 sys/src/9/pc/uartisa.c - 664 sys sys 1127126907 1777
 sys/src/9/pc/uartpci.c - 664 sys sys 1162859151 3617
 sys/src/9/pc/usb.h - 664 sys sys 1165555430 4257
-sys/src/9/pc/usbuhci.c - 664 sys sys 1165555497 31000
+sys/src/9/pc/usbuhci.c - 664 sys sys 1168306432 31047
 sys/src/9/pc/vga.c - 664 sys sys 1131290595 5148
 sys/src/9/pc/vga3dfx.c - 664 sys sys 1133218367 3833
 sys/src/9/pc/vgaark2000pv.c - 664 sys sys 1131290600 3422
@@ -8094,8 +8094,8 @@ sys/src/9/port/debugalloc.c - 664 sys sys 1014931171 10402
 sys/src/9/port/dev.c - 664 sys sys 1146151714 8177
 sys/src/9/port/devaudio.c - 664 sys sys 1142086793 21147
 sys/src/9/port/devbridge.c - 664 sys sys 1055688301 24308
-sys/src/9/port/devcap.c - 664 sys sys 1048644215 4113
-sys/src/9/port/devcons.c - 664 sys sys 1155995722 23114
+sys/src/9/port/devcap.c - 664 sys sys 1168304142 4128
+sys/src/9/port/devcons.c - 664 sys sys 1168304164 23127
 sys/src/9/port/devdraw.c - 664 sys sys 1147023550 44447
 sys/src/9/port/devdup.c - 664 sys sys 1014931172 2332
 sys/src/9/port/devenv.c - 664 sys sys 1048644225 6992
@@ -8108,7 +8108,7 @@ sys/src/9/port/devmntstats.c - 664 sys sys 1014931173 4039
 sys/src/9/port/devmouse.c - 664 sys sys 1130848303 13517
 sys/src/9/port/devpipe.c - 664 sys sys 1077055016 5825
 sys/src/9/port/devpnp.c - 664 sys sys 1088560907 13624
-sys/src/9/port/devproc.c - 664 sys sys 1142086847 28500
+sys/src/9/port/devproc.c - 664 sys sys 1168304324 28543
 sys/src/9/port/devroot.c - 664 sys sys 1146151714 4242
 sys/src/9/port/devsd.c - 664 sys sys 1167774805 31099
 sys/src/9/port/devsdp.c - 664 sys sys 1057323393 44800
@@ -9025,7 +9025,7 @@ sys/src/boot/pc/apm.c - 664 sys sys 1015007947 289
 sys/src/boot/pc/bcom.c - 664 sys sys 1032215919 6421
 sys/src/boot/pc/boot.c - 664 sys sys 1130887226 8421
 sys/src/boot/pc/bootld.c - 664 sys sys 1015007948 1801
-sys/src/boot/pc/bootp.c - 664 sys sys 1161230046 12447
+sys/src/boot/pc/bootp.c - 664 sys sys 1168307225 12478
 sys/src/boot/pc/cga.c - 664 sys sys 1015007948 1362
 sys/src/boot/pc/cis.c - 664 sys sys 1144961189 9232
 sys/src/boot/pc/clock.c - 664 sys sys 1103641772 6425
@@ -9280,9 +9280,9 @@ sys/src/cmd/9660srv/9660srv.c - 664 sys sys 1132451689 17151
 sys/src/cmd/9660srv/dat.h - 664 sys sys 1091904429 2097
 sys/src/cmd/9660srv/data.c - 664 sys sys 944960735 373
 sys/src/cmd/9660srv/fns.h - 664 sys sys 1019425186 428
-sys/src/cmd/9660srv/iobuf.c - 664 sys sys 1128255068 3126
+sys/src/cmd/9660srv/iobuf.c - 664 sys sys 1168307362 3152
 sys/src/cmd/9660srv/iso9660.h - 664 sys sys 1014924873 2607
-sys/src/cmd/9660srv/main.c - 664 sys sys 1134305455 9664
+sys/src/cmd/9660srv/main.c - 664 sys sys 1168307369 9808
 sys/src/cmd/9660srv/mkfile - 664 sys sys 1048644372 238
 sys/src/cmd/9660srv/xfile.c - 664 sys sys 1113742177 2736
 sys/src/cmd/9nfs - 20000000775 sys sys 1071498519 0
@@ -9477,7 +9477,7 @@ sys/src/cmd/auth/changeuser.c - 664 sys sys 1155994851 2949
 sys/src/cmd/auth/convbio.c - 664 sys sys 1015008432 2212
 sys/src/cmd/auth/convkeys.c - 664 sys sys 1155994849 2387
 sys/src/cmd/auth/convkeys2.c - 664 sys sys 1155994849 2444
-sys/src/cmd/auth/cron.c - 664 sys sys 1152222646 12266
+sys/src/cmd/auth/cron.c - 664 sys sys 1168307786 12266
 sys/src/cmd/auth/debug.c - 664 sys sys 1143694911 7325
 sys/src/cmd/auth/disable - 775 sys sys 1015008431 146
 sys/src/cmd/auth/enable - 775 sys sys 1015008430 134
@@ -9553,7 +9553,7 @@ sys/src/cmd/auth/secstore/secstore.h - 664 sys sys 1106575526 859
 sys/src/cmd/auth/secstore/secstored.c - 664 sys sys 1140272944 8087
 sys/src/cmd/auth/secstore/secuser.c - 664 sys sys 1143465899 5136
 sys/src/cmd/auth/secstore/util.c - 664 sys sys 1143694883 1741
-sys/src/cmd/auth/secureidcheck.c - 664 sys sys 1147099026 9788
+sys/src/cmd/auth/secureidcheck.c - 664 sys sys 1168307802 9787
 sys/src/cmd/auth/status - 775 sys sys 1015008430 738
 sys/src/cmd/auth/uniq.c - 664 sys sys 1140272945 1440
 sys/src/cmd/auth/userpasswd.c - 664 sys sys 1015008432 591
@@ -9643,7 +9643,7 @@ sys/src/cmd/aux/astarld.c - 664 sys sys 1015008684 4638
 sys/src/cmd/aux/cddb.c - 664 sys sys 1159664477 4676
 sys/src/cmd/aux/clog.c - 664 sys sys 1014925109 1000
 sys/src/cmd/aux/consolefs.c - 664 sys sys 1150201588 21201
-sys/src/cmd/aux/conswdir.c - 664 sys sys 1045504955 2077
+sys/src/cmd/aux/conswdir.c - 664 sys sys 1168307860 2583
 sys/src/cmd/aux/data2s.c - 664 sys sys 1032059295 796
 sys/src/cmd/aux/depend.c - 664 sys sys 1134305455 25880
 sys/src/cmd/aux/disksim.c - 664 sys sys 1143670638 11172
@@ -9667,7 +9667,7 @@ sys/src/cmd/aux/flashfs/testld.c - 664 sys sys 1015009082 1043
 sys/src/cmd/aux/flashfs/utils.c - 664 sys sys 1135487936 1094
 sys/src/cmd/aux/getflags.c - 664 sys sys 1139744276 1360
 sys/src/cmd/aux/gps - 20000000775 sys sys 1107448949 0
-sys/src/cmd/aux/gps/dat.h - 664 sys sys 1107448949 287
+sys/src/cmd/aux/gps/dat.h - 664 sys sys 1168307881 287
 sys/src/cmd/aux/gps/gpsevermore.c - 664 sys sys 1107448815 4501
 sys/src/cmd/aux/gps/gpsfs.c - 664 sys sys 1110882109 17951
 sys/src/cmd/aux/gps/mkfile - 664 sys sys 1108397331 219
@@ -9851,12 +9851,12 @@ sys/src/cmd/cc/bits.c - 664 sys sys 944960873 850
 sys/src/cmd/cc/c99 - 664 sys sys 1144690029 1302
 sys/src/cmd/cc/cc.h - 664 sys sys 1143759338 12233
 sys/src/cmd/cc/cc.y - 664 sys sys 1143220759 16160
-sys/src/cmd/cc/com.c - 664 sys sys 1134321739 22202
+sys/src/cmd/cc/com.c - 664 sys sys 1168307995 22218
 sys/src/cmd/cc/com64.c - 664 sys sys 1143240308 10001
 sys/src/cmd/cc/compat - 664 sys sys 1014925177 684
 sys/src/cmd/cc/compat.c - 664 sys sys 1132451523 454
 sys/src/cmd/cc/dcl.c - 664 sys sys 1143759352 27003
-sys/src/cmd/cc/dpchk.c - 664 sys sys 1107365037 7152
+sys/src/cmd/cc/dpchk.c - 664 sys sys 1168307976 7175
 sys/src/cmd/cc/funct.c - 664 sys sys 984718510 6167
 sys/src/cmd/cc/lex.c - 664 sys sys 1162952421 24538
 sys/src/cmd/cc/lexbody - 664 sys sys 1131293457 9188
@@ -10168,11 +10168,11 @@ sys/src/cmd/fmt.c - 664 sys sys 1137603598 4078
 sys/src/cmd/fortune.c - 664 sys sys 1072729222 1779
 sys/src/cmd/fossil - 20000000775 sys sys 1087005595 0
 sys/src/cmd/fossil/9.h - 664 sys sys 1138465941 4438
-sys/src/cmd/fossil/9auth.c - 664 sys sys 1138465942 3863
+sys/src/cmd/fossil/9auth.c - 664 sys sys 1168308062 3960
 sys/src/cmd/fossil/9dir.c - 664 sys sys 1085333382 2219
 sys/src/cmd/fossil/9excl.c - 664 sys sys 1042005502 1887
 sys/src/cmd/fossil/9fid.c - 664 sys sys 1045600016 5521
-sys/src/cmd/fossil/9fsys.c - 664 sys sys 1139667252 33422
+sys/src/cmd/fossil/9fsys.c - 664 sys sys 1168308072 33424
 sys/src/cmd/fossil/9lstn.c - 664 sys sys 1147355153 3038
 sys/src/cmd/fossil/9p.c - 664 sys sys 1140010159 22931
 sys/src/cmd/fossil/9ping.c - 664 sys sys 1042005503 1563
@@ -13028,7 +13028,7 @@ sys/src/cmd/postscript/trofftable/trofftable.mk - 664 sys sys 944961073 1852
 sys/src/cmd/postscript/trofftable/trofftable.ps - 664 sys sys 944961073 3678
 sys/src/cmd/postscript/trofftable/trofftable.rc - 664 sys sys 984789206 2637
 sys/src/cmd/postscript/trofftable/trofftable.sh - 664 sys sys 984789206 2613
-sys/src/cmd/pr.c - 664 sys sys 1050689592 11172
+sys/src/cmd/pr.c - 664 sys sys 1168307016 11172
 sys/src/cmd/primes.c - 664 sys sys 1135081181 2123
 sys/src/cmd/prof.c - 664 sys sys 1124305301 5547
 sys/src/cmd/proof - 20000000775 sys sys 1039727677 0
@@ -13092,7 +13092,7 @@ sys/src/cmd/ql/optab.c - 664 sys sys 1089299167 13392
 sys/src/cmd/ql/pass.c - 664 sys sys 1132450403 11861
 sys/src/cmd/ql/sched.c - 664 sys sys 1089299166 12776
 sys/src/cmd/ql/span.c - 664 sys sys 1143759342 19898
-sys/src/cmd/ramfs.c - 664 sys sys 1132415785 15915
+sys/src/cmd/ramfs.c - 664 sys sys 1168307038 16020
 sys/src/cmd/ratfs - 20000000775 sys sys 1039727600 0
 sys/src/cmd/ratfs/ctlfiles.c - 664 sys sys 1016943964 6694
 sys/src/cmd/ratfs/main.c - 664 sys sys 1016943964 6516
@@ -13225,8 +13225,8 @@ sys/src/cmd/scuzz/cdaudio.c - 664 sys sys 944961085 2821
 sys/src/cmd/scuzz/cdr.c - 664 sys sys 944961084 3849
 sys/src/cmd/scuzz/changer.c - 664 sys sys 944961084 1137
 sys/src/cmd/scuzz/mkfile - 664 sys sys 1032060571 231
-sys/src/cmd/scuzz/scsireq.c - 664 sys sys 1158891779 13609
-sys/src/cmd/scuzz/scsireq.h - 664 sys sys 1158891693 5977
+sys/src/cmd/scuzz/scsireq.c - 664 sys sys 1168308290 13609
+sys/src/cmd/scuzz/scsireq.h - 664 sys sys 1168308261 6011
 sys/src/cmd/scuzz/scuzz.c - 664 sys sys 1158891727 38135
 sys/src/cmd/scuzz/sense.c - 664 sys sys 969510790 3901
 sys/src/cmd/sed.c - 664 sys sys 1100962924 27001
@@ -14108,8 +14108,8 @@ sys/src/cmd/usb/audio/usbaudio.h - 664 sys sys 1140695062 1889
 sys/src/cmd/usb/audio/usbaudioctl.c - 664 sys sys 1140695062 18245
 sys/src/cmd/usb/audio/usbaudioctl.h - 664 sys sys 1140695062 618
 sys/src/cmd/usb/lib - 20000000775 sys sys 1091204979 0
-sys/src/cmd/usb/lib/device.c - 664 sys sys 1144905083 3073
-sys/src/cmd/usb/lib/dump.c - 664 sys sys 1163722010 12983
+sys/src/cmd/usb/lib/device.c - 664 sys sys 1168308464 3284
+sys/src/cmd/usb/lib/dump.c - 664 sys sys 1168308417 13122
 sys/src/cmd/usb/lib/fmt.c - 664 sys sys 1091204978 291
 sys/src/cmd/usb/lib/mkfile - 664 sys sys 1091204979 204
 sys/src/cmd/usb/lib/setup.c - 664 sys sys 1165044747 1936
@@ -14124,10 +14124,10 @@ sys/src/cmd/usb/mkfile - 664 sys sys 1091327562 354
 sys/src/cmd/usb/usbd - 20000000775 sys sys 1091204979 0
 sys/src/cmd/usb/usbd/dat.h - 664 sys sys 1091204979 675
 sys/src/cmd/usb/usbd/fns.h - 664 sys sys 1091204979 495
-sys/src/cmd/usb/usbd/hub.c - 664 sys sys 1138975310 4292
+sys/src/cmd/usb/usbd/hub.c - 664 sys sys 1168308558 4294
 sys/src/cmd/usb/usbd/mkfile - 664 sys sys 1091204979 304
-sys/src/cmd/usb/usbd/setup.c - 664 sys sys 1138975309 1210
-sys/src/cmd/usb/usbd/usbd.c - 664 sys sys 1143759341 5169
+sys/src/cmd/usb/usbd/setup.c - 664 sys sys 1168308573 1351
+sys/src/cmd/usb/usbd/usbd.c - 664 sys sys 1168308592 5204
 sys/src/cmd/va - 20000000775 sys sys 1039727598 0
 sys/src/cmd/va/a.h - 664 sys sys 1089299166 2915
 sys/src/cmd/va/a.y - 664 sys sys 944961340 7211
@@ -14139,7 +14139,7 @@ sys/src/cmd/vac/cache.c - 664 sys sys 1071245791 15806
 sys/src/cmd/vac/dat.h - 664 sys sys 1162951177 4029
 sys/src/cmd/vac/error.c - 664 sys sys 1036006057 633
 sys/src/cmd/vac/error.h - 664 sys sys 1036024048 327
-sys/src/cmd/vac/file.c - 664 sys sys 1162951640 19943
+sys/src/cmd/vac/file.c - 664 sys sys 1168307519 19922
 sys/src/cmd/vac/fns.h - 664 sys sys 1036006061 1746
 sys/src/cmd/vac/fs.c - 664 sys sys 1162327826 2902
 sys/src/cmd/vac/mkfile - 664 sys sys 1036024045 434
@@ -14200,7 +14200,7 @@ sys/src/cmd/venti/ifile.c - 664 sys sys 1055707440 2288
 sys/src/cmd/venti/index.c - 664 sys sys 1045503654 15232
 sys/src/cmd/venti/lump.c - 664 sys sys 1055707441 3844
 sys/src/cmd/venti/lumpcache.c - 664 sys sys 1019678879 7585
-sys/src/cmd/venti/lumpqueue.c - 664 sys sys 1055707442 2263
+sys/src/cmd/venti/lumpqueue.c - 664 sys sys 1168307536 2278
 sys/src/cmd/venti/mkfile - 664 sys sys 1139839228 1795
 sys/src/cmd/venti/mkroot.c - 664 sys sys 1045503630 1172
 sys/src/cmd/venti/mkxml - 775 sys sys 1019678879 1078
@@ -14623,7 +14623,7 @@ sys/src/libauth/authlocal.h - 664 sys sys 1014929317 87
 sys/src/libauth/httpauth.c - 664 sys sys 1017166331 1059
 sys/src/libauth/login.c - 664 sys sys 1014929318 264
 sys/src/libauth/mkfile - 664 sys sys 1063854014 455
-sys/src/libauth/newns.c - 664 sys sys 1128540492 7226
+sys/src/libauth/newns.c - 664 sys sys 1168307422 7344
 sys/src/libauth/noworld.c - 664 sys sys 1014929318 779
 sys/src/libauthsrv - 20000000775 sys sys 1055718668 0
 sys/src/libauthsrv/_asgetticket.c - 664 sys sys 1015091652 280
@@ -14641,7 +14641,7 @@ sys/src/libauthsrv/mkfile - 664 sys sys 1035389776 409
 sys/src/libauthsrv/nvcsum.c - 664 sys sys 1015091654 192
 sys/src/libauthsrv/opasstokey.c - 664 sys sys 1015091654 448
 sys/src/libauthsrv/passtokey.c - 664 sys sys 1143695654 488
-sys/src/libauthsrv/readnvram.c - 664 sys sys 1158593647 8945
+sys/src/libauthsrv/readnvram.c - 664 sys sys 1168307443 9048
 sys/src/libbin - 20000000775 sys sys 1045502972 0
 sys/src/libbin/bin.c - 664 sys sys 1135487932 1829
 sys/src/libbin/mkfile - 664 sys sys 1035389776 197
@@ -14678,7 +14678,7 @@ sys/src/libc/386/387/sin.s - 664 sys sys 944961709 95
 sys/src/libc/386/387/sqrt.s - 664 sys sys 944961709 128
 sys/src/libc/386/387/tan.s - 664 sys sys 944961709 91
 sys/src/libc/386/argv0.s - 664 sys sys 1067718932 88
-sys/src/libc/386/cycles.s - 664 sys sys 1067718932 213
+sys/src/libc/386/cycles.s - 664 sys sys 1168306801 207
 sys/src/libc/386/getcallerpc.s - 664 sys sys 1135488131 65
 sys/src/libc/386/getfcr.s - 664 sys sys 944961710 282
 sys/src/libc/386/main9.s - 664 sys sys 1067718933 373
@@ -14971,10 +14971,10 @@ sys/src/libc/port/nrand.c - 664 sys sys 1035832917 191
 sys/src/libc/port/ntruerand.c - 664 sys sys 1014927400 371
 sys/src/libc/port/perror.c - 664 sys sys 1014927400 199
 sys/src/libc/port/pool.acid - 664 sys sys 1143759318 12028
-sys/src/libc/port/pool.c - 664 sys sys 1143695534 31040
+sys/src/libc/port/pool.c - 664 sys sys 1168306758 30863
 sys/src/libc/port/pow.c - 664 sys sys 1014927401 965
 sys/src/libc/port/pow10.c - 664 sys sys 1014927401 1946
-sys/src/libc/port/profile.c - 664 sys sys 1121367263 5413
+sys/src/libc/port/profile.c - 664 sys sys 1168306718 5415
 sys/src/libc/port/qsort.c - 664 sys sys 1119276453 1669
 sys/src/libc/port/quote.c - 664 sys sys 1014927401 2246
 sys/src/libc/port/rand.c - 664 sys sys 1035832918 79
@@ -15677,3 +15677,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
+sys/src/9/pc/devarch.c - 664 sys sys 1168315311 19342

+ 56 - 56
dist/replica/plan9.db

@@ -526,7 +526,7 @@
 386/include/ape/math.h - 664 sys sys 1087406385 2123
 386/include/ape/stdarg.h - 664 sys sys 944946040 276
 386/include/ape/ureg.h - 664 sys sys 944946041 812
-386/include/u.h - 664 sys sys 1115924095 1481
+386/include/u.h - 664 sys sys 1168306831 1510
 386/include/ureg.h - 664 sys sys 944946012 523
 386/init - 775 sys sys 1148500704 101512
 386/ld.com - 775 sys sys 1161230065 73464
@@ -696,7 +696,7 @@ acme/bin/unind - 775 sys sys 1015011256 27
 acme/bin/wnew - 775 sys sys 1046184422 84
 acme/mail - 20000000775 sys sys 1114697834 0
 acme/mail/guide - 444 sys sys 1015011264 92
-acme/mail/mkbox - 775 sys sys 1018029993 133
+acme/mail/mkbox - 775 sys sys 1168306880 133
 acme/mail/readme - 664 sys sys 1084385076 2795
 acme/mail/src - 20000000775 sys sys 1058463659 0
 acme/mail/src/dat.h - 664 sys sys 1033936953 3857
@@ -5463,7 +5463,7 @@ rc/bin/leak - 775 sys sys 1139744263 1052
 rc/bin/lookman - 775 sys sys 1017679344 686
 rc/bin/lp - 775 sys sys 1162105982 5201
 rc/bin/mail - 775 sys sys 1045504003 138
-rc/bin/man - 775 sys sys 1155361978 2516
+rc/bin/man - 775 sys sys 1168305408 2538
 rc/bin/map - 775 sys sys 945617207 1576
 rc/bin/mapdemo - 775 sys sys 945617207 4075
 rc/bin/membername - 775 sys sys 945617207 89
@@ -6024,7 +6024,7 @@ sys/include/html.h - 664 sys sys 1128662123 15232
 sys/include/httpd.h - 664 sys sys 1091904418 5771
 sys/include/ip.h - 664 sys sys 1103554773 2989
 sys/include/keyboard.h - 664 sys sys 1131637696 865
-sys/include/libc.h - 664 sys sys 1143129918 19699
+sys/include/libc.h - 664 sys sys 1168306860 19851
 sys/include/libsec.h - 664 sys sys 1124709121 9345
 sys/include/mach.h - 664 sys sys 1143814376 8641
 sys/include/memdraw.h - 664 sys sys 1091904419 5645
@@ -6137,7 +6137,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 1132452664 4522
+sys/lib/dist/mkfile - 664 sys sys 1168307719 5076
 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
@@ -6200,7 +6200,7 @@ sys/lib/dist/pc/inst/stopppp - 775 sys sys 1018469719 250
 sys/lib/dist/pc/inst/textonly - 775 sys sys 1112361039 182
 sys/lib/dist/pc/inst/watchfd - 775 sys sys 1127670125 362
 sys/lib/dist/pc/inst/xxx - 775 sys sys 1018469719 160
-sys/lib/dist/pc/mkfile - 664 sys sys 1142958580 2193
+sys/lib/dist/pc/mkfile - 664 sys sys 1168307754 2210
 sys/lib/dist/pc/multi - 20000000775 sys sys 1147022870 0
 sys/lib/dist/pc/plan9.ini - 664 sys sys 1142177575 236
 sys/lib/dist/pc/plan9.ini.blank - 664 sys sys 1018469720 512
@@ -6535,7 +6535,7 @@ sys/lib/lp/daemon/appletalk - 775 sys sys 954037458 255
 sys/lib/lp/daemon/dkcat - 775 sys sys 954037458 210
 sys/lib/lp/daemon/dumb - 775 sys sys 954037458 164
 sys/lib/lp/daemon/generic - 775 sys sys 1015012112 3962
-sys/lib/lp/daemon/hp - 775 sys sys 954037458 364
+sys/lib/lp/daemon/hp - 775 sys sys 1168305613 383
 sys/lib/lp/daemon/justsend - 775 sys sys 971810200 221
 sys/lib/lp/daemon/lpd-tek - 775 sys sys 1015012112 378
 sys/lib/lp/daemon/lpddaemon - 775 sys sys 954037458 407
@@ -6544,7 +6544,7 @@ sys/lib/lp/daemon/lps - 775 sys sys 954037458 259
 sys/lib/lp/daemon/pcclone - 775 sys sys 954037458 293
 sys/lib/lp/daemon/post - 775 sys sys 954037458 234
 sys/lib/lp/daemon/post.warn - 775 sys sys 954037458 1033
-sys/lib/lp/daemon/tcppost - 775 sys sys 954037458 348
+sys/lib/lp/daemon/tcppost - 775 sys sys 1168305628 288
 sys/lib/lp/daemon/tektronix - 775 sys sys 954037458 364
 sys/lib/lp/daemon/xante - 775 sys sys 954037458 364
 sys/lib/lp/daemon/xerox - 775 sys sys 954037458 326
@@ -6631,7 +6631,7 @@ sys/lib/man/preface4 - 664 sys sys 1020082276 1758
 sys/lib/man/secindex - 775 sys sys 956337727 322
 sys/lib/man/title - 664 sys sys 1019915894 746
 sys/lib/man/trademarks - 664 sys sys 958527089 1838
-sys/lib/mimetype - 664 sys sys 1120564829 6236
+sys/lib/mimetype - 664 sys sys 1168305580 6313
 sys/lib/newuser - 775 sys sys 1112362340 1226
 sys/lib/plumb - 20000000775 sys sys 1039727360 0
 sys/lib/plumb/basic - 664 sys sys 1155363394 2879
@@ -7611,7 +7611,7 @@ sys/man/4/archfs - 664 sys sys 960000712 533
 sys/man/4/cdfs - 664 sys sys 1026846913 3638
 sys/man/4/cfs - 664 sys sys 1015024813 1758
 sys/man/4/consolefs - 664 sys sys 1144424854 4245
-sys/man/4/dossrv - 664 sys sys 1015024813 4176
+sys/man/4/dossrv - 664 sys sys 1168307403 4334
 sys/man/4/execnet - 664 sys sys 1019866708 1069
 sys/man/4/exportfs - 664 sys sys 1145881912 4655
 sys/man/4/ext2srv - 664 sys sys 1055692986 2409
@@ -7631,7 +7631,7 @@ 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 1017723482 1541
 sys/man/4/plumber - 664 sys sys 944959699 2748
-sys/man/4/ramfs - 664 sys sys 1127393035 1447
+sys/man/4/ramfs - 664 sys sys 1168307208 1642
 sys/man/4/ratfs - 664 sys sys 1157898800 3276
 sys/man/4/rdbfs - 664 sys sys 944959699 1123
 sys/man/4/rio - 664 sys sys 1023206844 8660
@@ -7873,7 +7873,7 @@ sys/src/9/bitsy/uartsa1110.c - 664 sys sys 1142741102 8537
 sys/src/9/bitsy/wavelan.c - 664 sys sys 1116097770 27267
 sys/src/9/bitsy/wavelan.h - 664 sys sys 1037029076 27
 sys/src/9/boot - 20000000775 sys sys 1161222920 0
-sys/src/9/boot/aux.c - 664 sys sys 1063857702 2579
+sys/src/9/boot/aux.c - 664 sys sys 1168305725 2586
 sys/src/9/boot/boot.c - 664 sys sys 1146746630 6013
 sys/src/9/boot/boot.h - 664 sys sys 1063857659 1785
 sys/src/9/boot/bootauth.c - 664 sys sys 1131289783 1160
@@ -7908,9 +7908,9 @@ sys/src/9/ip/inferno.c - 664 sys sys 1022588098 517
 sys/src/9/ip/ip.c - 664 sys sys 1101906449 15285
 sys/src/9/ip/ip.h - 664 sys sys 1162907930 15760
 sys/src/9/ip/ipaux.c - 664 sys sys 1079538100 12862
-sys/src/9/ip/ipifc.c - 664 sys sys 1146151712 34215
+sys/src/9/ip/ipifc.c - 664 sys sys 1168305861 34233
 sys/src/9/ip/ipmux.c - 664 sys sys 1047260566 15362
-sys/src/9/ip/iproute.c - 664 sys sys 1049423192 14763
+sys/src/9/ip/iproute.c - 664 sys sys 1168305878 14778
 sys/src/9/ip/ipv6.c - 664 sys sys 1047951328 14433
 sys/src/9/ip/ipv6.h - 664 sys sys 1087406259 4321
 sys/src/9/ip/loopbackmedium.c - 664 sys sys 1055701769 1671
@@ -7960,8 +7960,8 @@ sys/src/9/pc/apmjump.s - 664 sys sys 1032058947 1527
 sys/src/9/pc/archmp.c - 664 sys sys 1131290214 2357
 sys/src/9/pc/audio.h - 664 sys sys 1015014513 343
 sys/src/9/pc/cga.c - 664 sys sys 1015014513 1843
-sys/src/9/pc/dat.h - 664 sys sys 1147098951 6654
-sys/src/9/pc/devarch.c - 664 sys sys 1143129812 19249
+sys/src/9/pc/dat.h - 664 sys sys 1168305049 6693
+sys/src/9/pc/devarch.c - 664 sys sys 1168315311 19342
 sys/src/9/pc/devether.c - 664 sys sys 1131290265 10315
 sys/src/9/pc/devfloppy.c - 664 sys sys 1142958305 20139
 sys/src/9/pc/devi82365.c - 664 sys sys 1146318335 20504
@@ -7972,7 +7972,7 @@ sys/src/9/pc/devlpt.c - 664 sys sys 1015014514 4420
 sys/src/9/pc/devpccard.c - 664 sys sys 1162222267 39301
 sys/src/9/pc/devrtc.c - 664 sys sys 1015014515 7167
 sys/src/9/pc/devtv.c - 664 sys sys 1131290299 45676
-sys/src/9/pc/devusb.c - 664 sys sys 1165555433 18791
+sys/src/9/pc/devusb.c - 664 sys sys 1168305372 18752
 sys/src/9/pc/devvga.c - 664 sys sys 1131290315 9332
 sys/src/9/pc/dma.c - 664 sys sys 1142966373 5332
 sys/src/9/pc/ether2000.c - 664 sys sys 1089299187 4819
@@ -7981,7 +7981,7 @@ sys/src/9/pc/ether589.c - 664 sys sys 1015014516 4644
 sys/src/9/pc/ether79c970.c - 664 sys sys 1160070602 14088
 sys/src/9/pc/ether8003.c - 664 sys sys 1015014516 6665
 sys/src/9/pc/ether8139.c - 664 sys sys 1160066369 18561
-sys/src/9/pc/ether8169.c - 664 sys sys 1162138241 25392
+sys/src/9/pc/ether8169.c - 664 sys sys 1168305932 25430
 sys/src/9/pc/ether82543gc.c - 664 sys sys 1131290377 32294
 sys/src/9/pc/ether82557.c - 664 sys sys 1153082663 30197
 sys/src/9/pc/ether83815.c - 664 sys sys 1140271743 26125
@@ -7990,11 +7990,11 @@ sys/src/9/pc/ether8390.h - 664 sys sys 1015014517 1511
 sys/src/9/pc/etherdp83820.c - 664 sys sys 1160069116 29352
 sys/src/9/pc/etherec2t.c - 664 sys sys 1135784135 4092
 sys/src/9/pc/etherelnk3.c - 664 sys sys 1158012427 48807
-sys/src/9/pc/etherga620.c - 664 sys sys 1134390125 28760
+sys/src/9/pc/etherga620.c - 664 sys sys 1168306078 29326
 sys/src/9/pc/etherga620fw.h - 664 sys sys 1026847642 222295
 sys/src/9/pc/etherif.h - 664 sys sys 1088178711 961
-sys/src/9/pc/etherigbe.c - 664 sys sys 1155995749 44820
-sys/src/9/pc/ethermii.c - 664 sys sys 1084331434 4612
+sys/src/9/pc/etherigbe.c - 664 sys sys 1168306113 44967
+sys/src/9/pc/ethermii.c - 664 sys sys 1168306129 4651
 sys/src/9/pc/ethermii.h - 664 sys sys 1086873891 3258
 sys/src/9/pc/etherrhine.c - 664 sys sys 1081706478 13799
 sys/src/9/pc/ethersink.c - 664 sys sys 1048644103 1076
@@ -8003,7 +8003,7 @@ sys/src/9/pc/ethervgbe.c - 664 sys sys 1160066496 26838
 sys/src/9/pc/ethervt6102.c - 664 sys sys 1131907459 22286
 sys/src/9/pc/etherwavelan.c - 664 sys sys 1131290380 3747
 sys/src/9/pc/floppy.h - 664 sys sys 1055700609 3835
-sys/src/9/pc/fns.h - 664 sys sys 1155995571 4564
+sys/src/9/pc/fns.h - 664 sys sys 1168303981 4587
 sys/src/9/pc/hcwAMC.h - 664 sys sys 1026860163 166004
 sys/src/9/pc/i8253.c - 664 sys sys 1139681387 6236
 sys/src/9/pc/i8259.c - 664 sys sys 1131290399 4586
@@ -8012,11 +8012,11 @@ sys/src/9/pc/initcode.s - 664 sys sys 1015014519 282
 sys/src/9/pc/io.h - 664 sys sys 1165555523 9406
 sys/src/9/pc/kbd.c - 664 sys sys 1132574883 12365
 sys/src/9/pc/l.s - 664 sys sys 1143129925 28552
-sys/src/9/pc/main.c - 664 sys sys 1162952105 15321
+sys/src/9/pc/main.c - 664 sys sys 1168306227 15337
 sys/src/9/pc/mem.h - 664 sys sys 1137622431 5203
 sys/src/9/pc/memory.c - 664 sys sys 1153172671 18773
 sys/src/9/pc/mkfile - 664 sys sys 1158794206 4004
-sys/src/9/pc/mmu.c - 664 sys sys 1164721711 24114
+sys/src/9/pc/mmu.c - 664 sys sys 1168306246 24320
 sys/src/9/pc/mouse.c - 664 sys sys 1098479254 7057
 sys/src/9/pc/mp.c - 664 sys sys 1162388126 17349
 sys/src/9/pc/mp.h - 664 sys sys 1153193597 6795
@@ -8048,13 +8048,13 @@ sys/src/9/pc/sdata.c - 664 sys sys 1167774860 52718
 sys/src/9/pc/sdmv50xx.c - 664 sys sys 1167774867 25865
 sys/src/9/pc/sdmylex.c - 664 sys sys 1167774835 27902
 sys/src/9/pc/sdscsi.c - 664 sys sys 1158889425 7241
-sys/src/9/pc/trap.c - 664 sys sys 1135487942 21257
+sys/src/9/pc/trap.c - 664 sys sys 1168306369 21848
 sys/src/9/pc/uartaxp.c - 664 sys sys 1166247784 18879
 sys/src/9/pc/uarti8250.c - 664 sys sys 1102820421 13958
 sys/src/9/pc/uartisa.c - 664 sys sys 1127126907 1777
 sys/src/9/pc/uartpci.c - 664 sys sys 1162859151 3617
 sys/src/9/pc/usb.h - 664 sys sys 1165555430 4257
-sys/src/9/pc/usbuhci.c - 664 sys sys 1165555497 31000
+sys/src/9/pc/usbuhci.c - 664 sys sys 1168306432 31047
 sys/src/9/pc/vga.c - 664 sys sys 1131290595 5148
 sys/src/9/pc/vga3dfx.c - 664 sys sys 1133218367 3833
 sys/src/9/pc/vgaark2000pv.c - 664 sys sys 1131290600 3422
@@ -8094,8 +8094,8 @@ sys/src/9/port/debugalloc.c - 664 sys sys 1014931171 10402
 sys/src/9/port/dev.c - 664 sys sys 1146151714 8177
 sys/src/9/port/devaudio.c - 664 sys sys 1142086793 21147
 sys/src/9/port/devbridge.c - 664 sys sys 1055688301 24308
-sys/src/9/port/devcap.c - 664 sys sys 1048644215 4113
-sys/src/9/port/devcons.c - 664 sys sys 1155995722 23114
+sys/src/9/port/devcap.c - 664 sys sys 1168304142 4128
+sys/src/9/port/devcons.c - 664 sys sys 1168304164 23127
 sys/src/9/port/devdraw.c - 664 sys sys 1147023550 44447
 sys/src/9/port/devdup.c - 664 sys sys 1014931172 2332
 sys/src/9/port/devenv.c - 664 sys sys 1048644225 6992
@@ -8108,7 +8108,7 @@ sys/src/9/port/devmntstats.c - 664 sys sys 1014931173 4039
 sys/src/9/port/devmouse.c - 664 sys sys 1130848303 13517
 sys/src/9/port/devpipe.c - 664 sys sys 1077055016 5825
 sys/src/9/port/devpnp.c - 664 sys sys 1088560907 13624
-sys/src/9/port/devproc.c - 664 sys sys 1142086847 28500
+sys/src/9/port/devproc.c - 664 sys sys 1168304324 28543
 sys/src/9/port/devroot.c - 664 sys sys 1146151714 4242
 sys/src/9/port/devsd.c - 664 sys sys 1167774805 31099
 sys/src/9/port/devsdp.c - 664 sys sys 1057323393 44800
@@ -9025,7 +9025,7 @@ sys/src/boot/pc/apm.c - 664 sys sys 1015007947 289
 sys/src/boot/pc/bcom.c - 664 sys sys 1032215919 6421
 sys/src/boot/pc/boot.c - 664 sys sys 1130887226 8421
 sys/src/boot/pc/bootld.c - 664 sys sys 1015007948 1801
-sys/src/boot/pc/bootp.c - 664 sys sys 1161230046 12447
+sys/src/boot/pc/bootp.c - 664 sys sys 1168307225 12478
 sys/src/boot/pc/cga.c - 664 sys sys 1015007948 1362
 sys/src/boot/pc/cis.c - 664 sys sys 1144961189 9232
 sys/src/boot/pc/clock.c - 664 sys sys 1103641772 6425
@@ -9280,9 +9280,9 @@ sys/src/cmd/9660srv/9660srv.c - 664 sys sys 1132451689 17151
 sys/src/cmd/9660srv/dat.h - 664 sys sys 1091904429 2097
 sys/src/cmd/9660srv/data.c - 664 sys sys 944960735 373
 sys/src/cmd/9660srv/fns.h - 664 sys sys 1019425186 428
-sys/src/cmd/9660srv/iobuf.c - 664 sys sys 1128255068 3126
+sys/src/cmd/9660srv/iobuf.c - 664 sys sys 1168307362 3152
 sys/src/cmd/9660srv/iso9660.h - 664 sys sys 1014924873 2607
-sys/src/cmd/9660srv/main.c - 664 sys sys 1134305455 9664
+sys/src/cmd/9660srv/main.c - 664 sys sys 1168307369 9808
 sys/src/cmd/9660srv/mkfile - 664 sys sys 1048644372 238
 sys/src/cmd/9660srv/xfile.c - 664 sys sys 1113742177 2736
 sys/src/cmd/9nfs - 20000000775 sys sys 1071498519 0
@@ -9477,7 +9477,7 @@ sys/src/cmd/auth/changeuser.c - 664 sys sys 1155994851 2949
 sys/src/cmd/auth/convbio.c - 664 sys sys 1015008432 2212
 sys/src/cmd/auth/convkeys.c - 664 sys sys 1155994849 2387
 sys/src/cmd/auth/convkeys2.c - 664 sys sys 1155994849 2444
-sys/src/cmd/auth/cron.c - 664 sys sys 1152222646 12266
+sys/src/cmd/auth/cron.c - 664 sys sys 1168307786 12266
 sys/src/cmd/auth/debug.c - 664 sys sys 1143694911 7325
 sys/src/cmd/auth/disable - 775 sys sys 1015008431 146
 sys/src/cmd/auth/enable - 775 sys sys 1015008430 134
@@ -9553,7 +9553,7 @@ sys/src/cmd/auth/secstore/secstore.h - 664 sys sys 1106575526 859
 sys/src/cmd/auth/secstore/secstored.c - 664 sys sys 1140272944 8087
 sys/src/cmd/auth/secstore/secuser.c - 664 sys sys 1143465899 5136
 sys/src/cmd/auth/secstore/util.c - 664 sys sys 1143694883 1741
-sys/src/cmd/auth/secureidcheck.c - 664 sys sys 1147099026 9788
+sys/src/cmd/auth/secureidcheck.c - 664 sys sys 1168307802 9787
 sys/src/cmd/auth/status - 775 sys sys 1015008430 738
 sys/src/cmd/auth/uniq.c - 664 sys sys 1140272945 1440
 sys/src/cmd/auth/userpasswd.c - 664 sys sys 1015008432 591
@@ -9643,7 +9643,7 @@ sys/src/cmd/aux/astarld.c - 664 sys sys 1015008684 4638
 sys/src/cmd/aux/cddb.c - 664 sys sys 1159664477 4676
 sys/src/cmd/aux/clog.c - 664 sys sys 1014925109 1000
 sys/src/cmd/aux/consolefs.c - 664 sys sys 1150201588 21201
-sys/src/cmd/aux/conswdir.c - 664 sys sys 1045504955 2077
+sys/src/cmd/aux/conswdir.c - 664 sys sys 1168307860 2583
 sys/src/cmd/aux/data2s.c - 664 sys sys 1032059295 796
 sys/src/cmd/aux/depend.c - 664 sys sys 1134305455 25880
 sys/src/cmd/aux/disksim.c - 664 sys sys 1143670638 11172
@@ -9667,7 +9667,7 @@ sys/src/cmd/aux/flashfs/testld.c - 664 sys sys 1015009082 1043
 sys/src/cmd/aux/flashfs/utils.c - 664 sys sys 1135487936 1094
 sys/src/cmd/aux/getflags.c - 664 sys sys 1139744276 1360
 sys/src/cmd/aux/gps - 20000000775 sys sys 1107448949 0
-sys/src/cmd/aux/gps/dat.h - 664 sys sys 1107448949 287
+sys/src/cmd/aux/gps/dat.h - 664 sys sys 1168307881 287
 sys/src/cmd/aux/gps/gpsevermore.c - 664 sys sys 1107448815 4501
 sys/src/cmd/aux/gps/gpsfs.c - 664 sys sys 1110882109 17951
 sys/src/cmd/aux/gps/mkfile - 664 sys sys 1108397331 219
@@ -9851,12 +9851,12 @@ sys/src/cmd/cc/bits.c - 664 sys sys 944960873 850
 sys/src/cmd/cc/c99 - 664 sys sys 1144690029 1302
 sys/src/cmd/cc/cc.h - 664 sys sys 1143759338 12233
 sys/src/cmd/cc/cc.y - 664 sys sys 1143220759 16160
-sys/src/cmd/cc/com.c - 664 sys sys 1134321739 22202
+sys/src/cmd/cc/com.c - 664 sys sys 1168307995 22218
 sys/src/cmd/cc/com64.c - 664 sys sys 1143240308 10001
 sys/src/cmd/cc/compat - 664 sys sys 1014925177 684
 sys/src/cmd/cc/compat.c - 664 sys sys 1132451523 454
 sys/src/cmd/cc/dcl.c - 664 sys sys 1143759352 27003
-sys/src/cmd/cc/dpchk.c - 664 sys sys 1107365037 7152
+sys/src/cmd/cc/dpchk.c - 664 sys sys 1168307976 7175
 sys/src/cmd/cc/funct.c - 664 sys sys 984718510 6167
 sys/src/cmd/cc/lex.c - 664 sys sys 1162952421 24538
 sys/src/cmd/cc/lexbody - 664 sys sys 1131293457 9188
@@ -10168,11 +10168,11 @@ sys/src/cmd/fmt.c - 664 sys sys 1137603598 4078
 sys/src/cmd/fortune.c - 664 sys sys 1072729222 1779
 sys/src/cmd/fossil - 20000000775 sys sys 1087005595 0
 sys/src/cmd/fossil/9.h - 664 sys sys 1138465941 4438
-sys/src/cmd/fossil/9auth.c - 664 sys sys 1138465942 3863
+sys/src/cmd/fossil/9auth.c - 664 sys sys 1168308062 3960
 sys/src/cmd/fossil/9dir.c - 664 sys sys 1085333382 2219
 sys/src/cmd/fossil/9excl.c - 664 sys sys 1042005502 1887
 sys/src/cmd/fossil/9fid.c - 664 sys sys 1045600016 5521
-sys/src/cmd/fossil/9fsys.c - 664 sys sys 1139667252 33422
+sys/src/cmd/fossil/9fsys.c - 664 sys sys 1168308072 33424
 sys/src/cmd/fossil/9lstn.c - 664 sys sys 1147355153 3038
 sys/src/cmd/fossil/9p.c - 664 sys sys 1140010159 22931
 sys/src/cmd/fossil/9ping.c - 664 sys sys 1042005503 1563
@@ -13028,7 +13028,7 @@ sys/src/cmd/postscript/trofftable/trofftable.mk - 664 sys sys 944961073 1852
 sys/src/cmd/postscript/trofftable/trofftable.ps - 664 sys sys 944961073 3678
 sys/src/cmd/postscript/trofftable/trofftable.rc - 664 sys sys 984789206 2637
 sys/src/cmd/postscript/trofftable/trofftable.sh - 664 sys sys 984789206 2613
-sys/src/cmd/pr.c - 664 sys sys 1050689592 11172
+sys/src/cmd/pr.c - 664 sys sys 1168307016 11172
 sys/src/cmd/primes.c - 664 sys sys 1135081181 2123
 sys/src/cmd/prof.c - 664 sys sys 1124305301 5547
 sys/src/cmd/proof - 20000000775 sys sys 1039727677 0
@@ -13092,7 +13092,7 @@ sys/src/cmd/ql/optab.c - 664 sys sys 1089299167 13392
 sys/src/cmd/ql/pass.c - 664 sys sys 1132450403 11861
 sys/src/cmd/ql/sched.c - 664 sys sys 1089299166 12776
 sys/src/cmd/ql/span.c - 664 sys sys 1143759342 19898
-sys/src/cmd/ramfs.c - 664 sys sys 1132415785 15915
+sys/src/cmd/ramfs.c - 664 sys sys 1168307038 16020
 sys/src/cmd/ratfs - 20000000775 sys sys 1039727600 0
 sys/src/cmd/ratfs/ctlfiles.c - 664 sys sys 1016943964 6694
 sys/src/cmd/ratfs/main.c - 664 sys sys 1016943964 6516
@@ -13225,8 +13225,8 @@ sys/src/cmd/scuzz/cdaudio.c - 664 sys sys 944961085 2821
 sys/src/cmd/scuzz/cdr.c - 664 sys sys 944961084 3849
 sys/src/cmd/scuzz/changer.c - 664 sys sys 944961084 1137
 sys/src/cmd/scuzz/mkfile - 664 sys sys 1032060571 231
-sys/src/cmd/scuzz/scsireq.c - 664 sys sys 1158891779 13609
-sys/src/cmd/scuzz/scsireq.h - 664 sys sys 1158891693 5977
+sys/src/cmd/scuzz/scsireq.c - 664 sys sys 1168308290 13609
+sys/src/cmd/scuzz/scsireq.h - 664 sys sys 1168308261 6011
 sys/src/cmd/scuzz/scuzz.c - 664 sys sys 1158891727 38135
 sys/src/cmd/scuzz/sense.c - 664 sys sys 969510790 3901
 sys/src/cmd/sed.c - 664 sys sys 1100962924 27001
@@ -14108,8 +14108,8 @@ sys/src/cmd/usb/audio/usbaudio.h - 664 sys sys 1140695062 1889
 sys/src/cmd/usb/audio/usbaudioctl.c - 664 sys sys 1140695062 18245
 sys/src/cmd/usb/audio/usbaudioctl.h - 664 sys sys 1140695062 618
 sys/src/cmd/usb/lib - 20000000775 sys sys 1091204979 0
-sys/src/cmd/usb/lib/device.c - 664 sys sys 1144905083 3073
-sys/src/cmd/usb/lib/dump.c - 664 sys sys 1163722010 12983
+sys/src/cmd/usb/lib/device.c - 664 sys sys 1168308464 3284
+sys/src/cmd/usb/lib/dump.c - 664 sys sys 1168308417 13122
 sys/src/cmd/usb/lib/fmt.c - 664 sys sys 1091204978 291
 sys/src/cmd/usb/lib/mkfile - 664 sys sys 1091204979 204
 sys/src/cmd/usb/lib/setup.c - 664 sys sys 1165044747 1936
@@ -14124,10 +14124,10 @@ sys/src/cmd/usb/mkfile - 664 sys sys 1091327562 354
 sys/src/cmd/usb/usbd - 20000000775 sys sys 1091204979 0
 sys/src/cmd/usb/usbd/dat.h - 664 sys sys 1091204979 675
 sys/src/cmd/usb/usbd/fns.h - 664 sys sys 1091204979 495
-sys/src/cmd/usb/usbd/hub.c - 664 sys sys 1138975310 4292
+sys/src/cmd/usb/usbd/hub.c - 664 sys sys 1168308558 4294
 sys/src/cmd/usb/usbd/mkfile - 664 sys sys 1091204979 304
-sys/src/cmd/usb/usbd/setup.c - 664 sys sys 1138975309 1210
-sys/src/cmd/usb/usbd/usbd.c - 664 sys sys 1143759341 5169
+sys/src/cmd/usb/usbd/setup.c - 664 sys sys 1168308573 1351
+sys/src/cmd/usb/usbd/usbd.c - 664 sys sys 1168308592 5204
 sys/src/cmd/va - 20000000775 sys sys 1039727598 0
 sys/src/cmd/va/a.h - 664 sys sys 1089299166 2915
 sys/src/cmd/va/a.y - 664 sys sys 944961340 7211
@@ -14139,7 +14139,7 @@ sys/src/cmd/vac/cache.c - 664 sys sys 1071245791 15806
 sys/src/cmd/vac/dat.h - 664 sys sys 1162951177 4029
 sys/src/cmd/vac/error.c - 664 sys sys 1036006057 633
 sys/src/cmd/vac/error.h - 664 sys sys 1036024048 327
-sys/src/cmd/vac/file.c - 664 sys sys 1162951640 19943
+sys/src/cmd/vac/file.c - 664 sys sys 1168307519 19922
 sys/src/cmd/vac/fns.h - 664 sys sys 1036006061 1746
 sys/src/cmd/vac/fs.c - 664 sys sys 1162327826 2902
 sys/src/cmd/vac/mkfile - 664 sys sys 1036024045 434
@@ -14200,7 +14200,7 @@ sys/src/cmd/venti/ifile.c - 664 sys sys 1055707440 2288
 sys/src/cmd/venti/index.c - 664 sys sys 1045503654 15232
 sys/src/cmd/venti/lump.c - 664 sys sys 1055707441 3844
 sys/src/cmd/venti/lumpcache.c - 664 sys sys 1019678879 7585
-sys/src/cmd/venti/lumpqueue.c - 664 sys sys 1055707442 2263
+sys/src/cmd/venti/lumpqueue.c - 664 sys sys 1168307536 2278
 sys/src/cmd/venti/mkfile - 664 sys sys 1139839228 1795
 sys/src/cmd/venti/mkroot.c - 664 sys sys 1045503630 1172
 sys/src/cmd/venti/mkxml - 775 sys sys 1019678879 1078
@@ -14623,7 +14623,7 @@ sys/src/libauth/authlocal.h - 664 sys sys 1014929317 87
 sys/src/libauth/httpauth.c - 664 sys sys 1017166331 1059
 sys/src/libauth/login.c - 664 sys sys 1014929318 264
 sys/src/libauth/mkfile - 664 sys sys 1063854014 455
-sys/src/libauth/newns.c - 664 sys sys 1128540492 7226
+sys/src/libauth/newns.c - 664 sys sys 1168307422 7344
 sys/src/libauth/noworld.c - 664 sys sys 1014929318 779
 sys/src/libauthsrv - 20000000775 sys sys 1055718668 0
 sys/src/libauthsrv/_asgetticket.c - 664 sys sys 1015091652 280
@@ -14641,7 +14641,7 @@ sys/src/libauthsrv/mkfile - 664 sys sys 1035389776 409
 sys/src/libauthsrv/nvcsum.c - 664 sys sys 1015091654 192
 sys/src/libauthsrv/opasstokey.c - 664 sys sys 1015091654 448
 sys/src/libauthsrv/passtokey.c - 664 sys sys 1143695654 488
-sys/src/libauthsrv/readnvram.c - 664 sys sys 1158593647 8945
+sys/src/libauthsrv/readnvram.c - 664 sys sys 1168307443 9048
 sys/src/libbin - 20000000775 sys sys 1045502972 0
 sys/src/libbin/bin.c - 664 sys sys 1135487932 1829
 sys/src/libbin/mkfile - 664 sys sys 1035389776 197
@@ -14678,7 +14678,7 @@ sys/src/libc/386/387/sin.s - 664 sys sys 944961709 95
 sys/src/libc/386/387/sqrt.s - 664 sys sys 944961709 128
 sys/src/libc/386/387/tan.s - 664 sys sys 944961709 91
 sys/src/libc/386/argv0.s - 664 sys sys 1067718932 88
-sys/src/libc/386/cycles.s - 664 sys sys 1067718932 213
+sys/src/libc/386/cycles.s - 664 sys sys 1168306801 207
 sys/src/libc/386/getcallerpc.s - 664 sys sys 1135488131 65
 sys/src/libc/386/getfcr.s - 664 sys sys 944961710 282
 sys/src/libc/386/main9.s - 664 sys sys 1067718933 373
@@ -14971,10 +14971,10 @@ sys/src/libc/port/nrand.c - 664 sys sys 1035832917 191
 sys/src/libc/port/ntruerand.c - 664 sys sys 1014927400 371
 sys/src/libc/port/perror.c - 664 sys sys 1014927400 199
 sys/src/libc/port/pool.acid - 664 sys sys 1143759318 12028
-sys/src/libc/port/pool.c - 664 sys sys 1143695534 31040
+sys/src/libc/port/pool.c - 664 sys sys 1168306758 30863
 sys/src/libc/port/pow.c - 664 sys sys 1014927401 965
 sys/src/libc/port/pow10.c - 664 sys sys 1014927401 1946
-sys/src/libc/port/profile.c - 664 sys sys 1121367263 5413
+sys/src/libc/port/profile.c - 664 sys sys 1168306718 5415
 sys/src/libc/port/qsort.c - 664 sys sys 1119276453 1669
 sys/src/libc/port/quote.c - 664 sys sys 1014927401 2246
 sys/src/libc/port/rand.c - 664 sys sys 1035832918 79

+ 57 - 0
dist/replica/plan9.log

@@ -46954,3 +46954,60 @@
 1168054206 0 c sys/games/lib/fortunes - 664 sys sys 1168053975 262351
 1168115406 0 c 386/bin/acid - 775 sys sys 1168114898 401251
 1168115406 1 c 386/lib/libmach.a - 664 sys sys 1168114900 785352
+1168304405 0 c sys/src/9/pc/fns.h - 664 sys sys 1168303981 4587
+1168304405 1 c sys/src/9/port/devcap.c - 664 sys sys 1168304142 4128
+1168304405 2 c sys/src/9/port/devcons.c - 664 sys sys 1168304164 23127
+1168304405 3 c sys/src/9/port/devproc.c - 664 sys sys 1168304324 28543
+1168306205 0 c rc/bin/man - 775 sys sys 1168305408 2538
+1168306205 1 c sys/lib/mimetype - 664 sys sys 1168305580 6313
+1168306205 2 c sys/lib/lp/daemon/hp - 775 sys sys 1168305613 383
+1168306205 3 c sys/lib/lp/daemon/tcppost - 775 sys sys 1168305628 288
+1168306205 4 c sys/src/9/boot/aux.c - 664 sys sys 1168305725 2586
+1168306205 5 c sys/src/9/ip/ipifc.c - 664 sys sys 1168305861 34233
+1168306205 6 c sys/src/9/ip/iproute.c - 664 sys sys 1168305878 14778
+1168306205 7 c sys/src/9/pc/dat.h - 664 sys sys 1168305049 6693
+1168306205 8 c sys/src/9/pc/devarch.c - 664 sys sys 1168305121 19340
+1168306205 9 c sys/src/9/pc/devusb.c - 664 sys sys 1168305372 18752
+1168306205 10 c sys/src/9/pc/etherigbe.c - 664 sys sys 1168306113 44967
+1168306205 11 c sys/src/9/pc/main.c - 664 sys sys 1168306227 15337
+1168306205 12 c sys/src/9/pc/mmu.c - 664 sys sys 1168306246 24320
+1168306205 13 c sys/src/9/pc/ether8169.c - 664 sys sys 1168305932 25430
+1168306205 14 c sys/src/9/pc/etherga620.c - 664 sys sys 1168306078 29326
+1168306205 15 c sys/src/9/pc/ethermii.c - 664 sys sys 1168306129 4651
+1168308006 0 c 386/include/u.h - 664 sys sys 1168306831 1510
+1168308006 1 c acme/mail/mkbox - 775 sys sys 1168306880 133
+1168308006 2 c sys/include/libc.h - 664 sys sys 1168306860 19851
+1168308006 3 c sys/lib/dist/mkfile - 664 sys sys 1168307719 5076
+1168308006 4 c sys/lib/dist/pc/mkfile - 664 sys sys 1168307754 2210
+1168308006 5 c sys/man/4/dossrv - 664 sys sys 1168307403 4334
+1168308006 6 c sys/man/4/ramfs - 664 sys sys 1168307208 1642
+1168308006 7 c sys/src/9/pc/trap.c - 664 sys sys 1168306369 21848
+1168308006 8 c sys/src/9/pc/usbuhci.c - 664 sys sys 1168306432 31047
+1168308006 9 c sys/src/boot/pc/bootp.c - 664 sys sys 1168307225 12478
+1168308006 10 c sys/src/cmd/9660srv/iobuf.c - 664 sys sys 1168307362 3152
+1168308006 11 c sys/src/cmd/9660srv/main.c - 664 sys sys 1168307369 9808
+1168308006 12 c sys/src/cmd/auth/cron.c - 664 sys sys 1168307786 12266
+1168308006 13 c sys/src/cmd/auth/secureidcheck.c - 664 sys sys 1168307802 9787
+1168308006 14 c sys/src/cmd/aux/conswdir.c - 664 sys sys 1168307860 2583
+1168308006 15 c sys/src/cmd/aux/gps/dat.h - 664 sys sys 1168307881 287
+1168308006 16 c sys/src/cmd/cc/com.c - 664 sys sys 1168307995 22218
+1168308006 17 c sys/src/cmd/cc/dpchk.c - 664 sys sys 1168307976 7175
+1168308006 18 c sys/src/cmd/pr.c - 664 sys sys 1168307016 11172
+1168308006 19 c sys/src/cmd/ramfs.c - 664 sys sys 1168307038 16020
+1168308006 20 c sys/src/cmd/vac/file.c - 664 sys sys 1168307519 19922
+1168308006 21 c sys/src/cmd/venti/lumpqueue.c - 664 sys sys 1168307536 2278
+1168308006 22 c sys/src/cmd/fossil/9auth.c - 664 sys sys 1168308062 3960
+1168308006 23 c sys/src/cmd/fossil/9fsys.c - 664 sys sys 1168308072 33424
+1168308006 24 c sys/src/libauth/newns.c - 664 sys sys 1168307422 7344
+1168308006 25 c sys/src/libauthsrv/readnvram.c - 664 sys sys 1168307443 9048
+1168308006 26 c sys/src/libc/386/cycles.s - 664 sys sys 1168306801 207
+1168308006 27 c sys/src/libc/port/pool.c - 664 sys sys 1168306758 30863
+1168308006 28 c sys/src/libc/port/profile.c - 664 sys sys 1168306718 5415
+1168309806 0 c sys/src/cmd/scuzz/scsireq.c - 664 sys sys 1168308290 13609
+1168309806 1 c sys/src/cmd/scuzz/scsireq.h - 664 sys sys 1168308261 6011
+1168309806 2 c sys/src/cmd/usb/lib/device.c - 664 sys sys 1168308464 3284
+1168309806 3 c sys/src/cmd/usb/lib/dump.c - 664 sys sys 1168308417 13122
+1168309806 4 c sys/src/cmd/usb/usbd/hub.c - 664 sys sys 1168308558 4294
+1168309806 5 c sys/src/cmd/usb/usbd/setup.c - 664 sys sys 1168308573 1351
+1168309806 6 c sys/src/cmd/usb/usbd/usbd.c - 664 sys sys 1168308592 5204
+1168317006 0 c sys/src/9/pc/devarch.c - 664 sys sys 1168315311 19342

+ 1 - 1
rc/bin/man

@@ -112,7 +112,7 @@ for(i in $fils) {
 			roff t $i
 
 		case p
-			roff t $i | proof
+			roff t $i | grep -v '^x X html' | proof
 
 		case P
 			roff t $i | page

+ 5 - 0
sys/include/libc.h

@@ -181,16 +181,20 @@ extern	Rune*	runefmtstrflush(Fmt*);
 #pragma	varargck	type	"llx"	uvlong
 #pragma	varargck	type	"ld"	long
 #pragma	varargck	type	"lx"	long
+#pragma	varargck	type	"lb"	long
 #pragma	varargck	type	"ld"	ulong
 #pragma	varargck	type	"lx"	ulong
+#pragma	varargck	type	"lb"	ulong
 #pragma	varargck	type	"d"	int
 #pragma	varargck	type	"x"	int
 #pragma	varargck	type	"c"	int
 #pragma	varargck	type	"C"	int
+#pragma	varargck	type	"b"	int
 #pragma	varargck	type	"d"	uint
 #pragma	varargck	type	"x"	uint
 #pragma	varargck	type	"c"	uint
 #pragma	varargck	type	"C"	uint
+#pragma	varargck	type	"b"	uint
 #pragma	varargck	type	"f"	double
 #pragma	varargck	type	"e"	double
 #pragma	varargck	type	"g"	double
@@ -204,6 +208,7 @@ extern	Rune*	runefmtstrflush(Fmt*);
 #pragma	varargck	type	"p"	uintptr
 #pragma	varargck	type	"p"	void*
 #pragma	varargck	flag	','
+#pragma	varargck	flag	'h'
 #pragma varargck	type	"<"	void*
 #pragma varargck	type	"["	void*
 #pragma varargck	type	"H"	void*

+ 85 - 51
sys/lib/dist/mkfile

@@ -1,15 +1,17 @@
+# /sys/lib/dist/mkfile
 d=/n/sources/plan9
-x=`{9fs sources; 9fs fsother; import -c tcp!204.178.31.2!666 /sys/lib/dist/web.protect}
+dist=/sys/lib/dist
+x=`{9fs sources; 9fs fsother; import -c tcp!204.178.31.2!666 $dist/web.protect}
 
 cd:V: /n/fsother/dist/plan9.iso
 
 ncd:V: /n/fsother/dist/plan9-new.iso.bz2
 
 ncd-dist:V: /n/fsother/dist/plan9-new.iso.bz2
-	mk /sys/lib/dist/web.protect/plan9-new.iso.bz2
+	mk $dist/web.protect/plan9-new.iso.bz2
 
 cd-dist:V: /n/fsother/dist/plan9.iso.bz2
-	mk /sys/lib/dist/web.protect/plan9.iso.bz2
+	mk $dist/web.protect/plan9.iso.bz2
 
 contrib-cd:V:	/n/fsother/dist/contrib.iso.bz2
 
@@ -22,17 +24,20 @@ contrib-cd:V:	/n/fsother/dist/contrib.iso.bz2
 	title=`{date | sed 's/(...) (...) (..) (..:..):.. (...) (....)/Plan 9 - \2 \3 \6 \4/'}
 	title=$"title
 	echo 'CD:' $title
-	disk/mk9660 -9cj -v $title -s $d \
-		-b bootdisk.img $target
+	disk/mk9660 -9cj -v $title -s $d -b bootdisk.img $target
 
-/sys/lib/dist/web.protect/%.iso.bz2:	/n/fsother/dist/%.iso.bz2
+$dist/web.protect/%.iso.bz2:	/n/fsother/dist/%.iso.bz2
 	cp $prereq $target
 
 scan:V:
-	replica/scan /sys/lib/dist/sources.replica <scan.lock
+	test -d /n/fsother/dist		# make sure fsother was mounted above
+	test -d $d
+	test -d $dist/web.protect
+	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
+	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
 
@@ -55,26 +60,25 @@ cd.install:V:
 D.install:V:
 	D=/n/roro/usr/rob/testplan9
 	9fs roro
-	cp $D/sys/lib/dist/pc/ndisk /sys/lib/dist/web.protect/ndisk
-	cp $D/sys/lib/dist/pc/9loaddebug /sys/lib/dist/web.protect/n9loaddebug
-
+	test -d $D
+	cp $D$dist/pc/ndisk $dist/web.protect/ndisk
+	cp $D$dist/pc/9loaddebug $dist/web.protect/n9loaddebug
 
 reallyinstall:V:
 	if(! ~ $sysname achille){ echo; echo; echo '*** this needs to run on achille.'; exit bad }
 	cd web.protect
-	for (i in plan9.iso.bz2 disk 9loaddebug vmware.zip){
+	for (i in plan9.iso.bz2 disk 9loaddebug vmware.zip)
 		if(test -f n$i){
 			mv $i _$i && { mv n$i $i || mv _$i $i }
 		}
-	}
 	rm /srv/ramfs.9down4e
-	/sys/lib/dist/startcache
+	$dist/startcache
 
 dump:V:
 	rm -f /srv/9660.xxx
 	9660srv 9660.xxx
 	mount /srv/9660.xxx /n/kremvax /n/fsother/dist/plan9.iso
-	now=`{mtime /sys/lib/dist/web.protect/plan9.iso.bz2 | awk '{print $1}'}
+	now=`{mtime $dist/web.protect/plan9.iso.bz2 | awk '{print $1}'}
 	ls -l /rls/plan9/4e.iso
 	disk/dump9660 -9cj -s /n/kremvax -n $now /rls/plan9/4e.iso
 	ls -l /rls/plan9/4e.iso
@@ -90,55 +94,85 @@ reencode:V:
 	rm /srv/9660.xxx
 
 /n/fsother/dist/%.iso.bz2:D: /n/fsother/dist/%.iso
-	bzip2 -9 < /n/fsother/dist/$stem.iso > /n/fsother/dist/n$stem.iso.bz2 &&
-	{mv /n/fsother/dist/$stem.iso.bz2 /n/fsother/dist/_$stem.iso.bz2
-	mv /n/fsother/dist/n$stem.iso.bz2 /n/fsother/dist/$stem.iso.bz2
+	@ {
+		cd /n/fsother/dist
+		bzip2 -9 <$stem.iso >n$stem.iso.bz2 &&
+		{
+			if (test -e $stem.iso.bz2)
+				mv  $stem.iso.bz2 _$stem.iso.bz2
+			mv n$stem.iso.bz2 $stem.iso.bz2
+		}
+		echo `{date} md5 `{md5sum <$stem.iso.bz2} \
+			sha1 `{sha1sum <$stem.iso.bz2} \
+			$stem.iso.bz2 >>/usr/web/plan9checksums.txt
 	}
-	echo `{date} md5 `{md5sum </n/fsother/dist/$stem.iso.bz2} sha1 `{sha1sum </n/fsother/dist/$stem.iso.bz2} $stem.iso.bz2 >>/usr/web/plan9checksums.txt
 
 /n/fsother/dist/contrib.iso:DV:
 	rm -f $target
-	disk/mk9660 -9cj -v 'Plan 9 Extras' -s /n/sources -p ./contrib.proto $target
+	disk/mk9660 -9cj -v 'Plan 9 Extras' -s /n/sources \
+		-p ./contrib.proto $target
 
 rebuild-mail:V:
 	rebuild
-	if(test -s buildit.out){
-		dd=`{date}
-		dd=$"date
-		mail -s 'nightly build errors '^$dd 9trouble <buildit.out
-	}
-	if(test -s checkbuild.out){
-		dd=`{date}
-		dd=$"date
-		mail -s 'nightly build differences '^$dd 9trouble <checkbuild.out
-	}
+	datemail 'nightly build errors' 9trouble <buildit.out
+	datemail 'nightly build differences' 9trouble <checkbuild.out
 	status=''
 
 scansources-mail:V:
-	dd=`{date}
-	dd=$"dd
-	scansources |mail -s 'nightly fs vs. martha scan '^$dd 9trouble
+	scansources | datemail 'nightly fs vs. martha scan' 9trouble
 
 worldwritable-mail:V:
-	cd /n/sources; /usr/rsc/bin/$cputype/lsr -t -d | awk '$2 ~ /[2367]$/' |{grep -v '^./patch' >/sys/lib/dist/writable || status=''}
-	if(test -s /sys/lib/dist/writable){
-		dd=`{date}
-		dd=$"date
-		mail -s 'WRITABLE FILES ON SOURCES '^$dd 9trouble </sys/lib/dist/writable
-	}
+	test -e /n/sources/plan9
+	@ {cd /n/sources; /usr/rsc/bin/$cputype/lsr -t -d} |
+		awk '$2 ~ /[2367]$/' | grep -vf ok-writable |
+		datemail 'WRITABLE FILES ON SOURCES' 9trouble || status=''
 	status=''
-	cd /n/sources/plan9; /usr/rsc/bin/$cputype/lsr -t -d /n/sources/plan9 | awk '$2 ~ /[2367][^2367].$/' >/sys/lib/dist/writable
-	if(test -s /sys/lib/dist/writable){
-		dd=`{date}
-		dd=$"date
-		mail -s 'non-group-writable files on sources'^$dd 9trouble </sys/lib/dist/writable
-	}
+	@ {
+		cd /n/sources/plan9
+		/usr/rsc/bin/$cputype/lsr -t -d /n/sources/plan9
+	} |
+		awk '$2 ~ /[2367][^2367].$/' |
+		datemail 'non-group-writable files on sources' 9trouble
 	status=''
-	/usr/rsc/bin/$cputype/lsr -t -d /sys /lib | awk '$2 ~ /[2367][^2367].$/' >/sys/lib/dist/writable
-	if(test -s /sys/lib/dist/writable){
-		dd=`{date}
-		dd=$"date
-		mail -s 'non-group-writable files on fs '^$dd 9trouble </sys/lib/dist/writable
-	}
+	# use /n/boot to avoid walking the archives mounted under
+	# /lib/vac, or other mounts or binds.
+	rfork n
+	9fs boot
+	test -e /n/boot/sys
+	/usr/rsc/bin/$cputype/lsr -t -d /n/boot/sys /n/boot/lib |
+		awk '$2 ~ /[2367][^2367].$/' |
+		datemail 'non-group-writable files on fs' 9trouble
 	status=''
 
+9.tar.gz:V:
+	@{
+		rfork n
+		9fs sources
+		test -e /n/sources/plan9
+		bind -a /n/sources/plan9 /n/sources/plan9/sys/src
+		cd /n/sources/plan9/sys/src
+		tar c LICENSE NOTICE 9
+	} | gzip >$target
+
+9-export:V: 9.tar.gz
+	9fs sources
+	cp 9.tar.gz /n/sources/extra/9.tgz
+
+plan9.tar.bz2:V:
+	@{
+		rfork n
+		9fs sources
+		cd /n/sources
+		test -e /n/sources/plan9
+		bind /n/empty /n/sources/plan9/lib/font
+		bind /n/empty /n/sources/plan9/sys/lib/postscript/font
+		bind /n/empty /n/sources/plan9/sys/lib/ghostscript
+		bind /n/empty /n/sources/plan9/sys/src/cmd/gs
+		tar c plan9/LICENSE* plan9/NOTICE plan9/*/mkfile plan9/*/include \
+			plan9/acme/*/src plan9/acme/bin/source \
+			plan9/^(adm cron lib lp mail rc sys tmp usr)
+	} | bzip2 >$target
+
+plan9-export:V: plan9.tar.bz2
+	9fs sources
+	mv plan9.tar.bz2 /n/sources/extra/plan9.tar.bz2

+ 1 - 1
sys/lib/dist/pc/mkfile

@@ -77,7 +77,7 @@ install:V: ndisk 9loaddebug
 	9fs outside
 	dst=/n/outside/sys/lib/dist/web.protect
 	cp 9loaddebug $dst
-	cp ndisk $dst/disk
+	gzip -9 < ndisk > $dst/plan9.flp.gz
 	#mk clean
 
 test:V: ndisk 9loaddebug

+ 5 - 1
sys/lib/lp/daemon/hp

@@ -1,3 +1,7 @@
 #!/bin/rc
+# daemon/hp
 # The destination is set to PS for the Tektronix printer, no other printer cares
-generic 'aux/download -f -H/sys/lib/postscript/font -mfontmap -plw+ < $LPDEST/$FILE(1) | aux/lpdsend -dPS -H$LPMACHID -P$LPUSERID  $OUTDEV >[2] $PRINTLOG' '{cat <{echo -d$LPDEST -pnoproc -M$SCHEDLINE(1) -u$SCHEDLINE(2)} $LPDEST/$FILE(1);sleep 5} | lpsend.rc $DEST_HOST' ''
+generic 'aux/download -f -H/sys/lib/postscript/font -mfontmap -plw+ < $LPDEST/$FILE(1) |
+		aux/lpdsend -dPS -H$LPMACHID -P$LPUSERID $OUTDEV >[2]$PRINTLOG' \
+	'{cat <{echo -d$LPDEST -pnoproc -M$SCHEDLINE(1) -u$SCHEDLINE(2)} \
+		$LPDEST/$FILE(1);sleep 5} | lpsend.rc $DEST_HOST' ''

+ 5 - 2
sys/lib/lp/daemon/tcppost

@@ -1,3 +1,6 @@
 #!/bin/rc
-# aux/download -f -H/sys/lib/postscript/font -mfontmap -plw+ < $LPDEST/$FILE(1) | 
-generic 'aux/download -f -H/sys/lib/postscript/font -mfontmap -plw+ < $LPDEST/$FILE(1) | aux/tcpostio -b^$SPEED $OUTDEV >[2]$PRINTLOG' '{cat <{echo -d$LPDEST -pnoproc -M^$SCHEDLINE(1) -u^$SCHEDLINE(2)} $LPDEST/$FILE(1);sleep 5} | lpsend.rc $DEST_HOST' ''
+# daemon/tcppost
+generic 'aux/download -f -H/sys/lib/postscript/font -mfontmap -plw+ <$LPDEST/$FILE(1) |
+		aux/tcpostio -b$SPEED $OUTDEV >[2]$PRINTLOG' \
+	'{cat <{echo -d$LPDEST -pnoproc -M$SCHEDLINE(1) -u$SCHEDLINE(2)} \
+		$LPDEST/$FILE(1); sleep 5} | lpsend.rc $DEST_HOST' ''

+ 2 - 0
sys/lib/mimetype

@@ -69,6 +69,7 @@
 .jpeg		image		jpeg		-		y
 .jpg		image		jpeg		-		y
 .jpg		image		pjpeg		-		y
+.js		application	x-javascript	-		y
 .latex		application	x-latex		-		y
 .ltx		application	x-latex		-		y
 .man		application	x-troff-man	-		y
@@ -123,6 +124,7 @@
 .suspect	application	octet-stream	-		y # upas/vf
 .sv4cpio	application	x-sv4cpio	-		m
 .sv4crc		application	x-sv4crc	-		y
+.swf		application	x-shockwave-flash		-		y
 .t		application	x-troff		-		y
 .tar		application	x-tar		-		m
 .tardist	application	x-tardist	-		n # SGI SoftwareManager

+ 13 - 9
sys/man/4/dossrv

@@ -4,11 +4,7 @@ dossrv, 9660srv, a:, b:, c:, d:, 9fat:, dosmnt, eject \- DOS and ISO9660 file sy
 .SH SYNOPSIS
 .B dossrv
 [
-.B -v
-] [
-.B -r
-] [
-.B -s
+.B -rsv
 ] [
 .B -f
 .I file
@@ -18,11 +14,10 @@ dossrv, 9660srv, a:, b:, c:, d:, 9fat:, dosmnt, eject \- DOS and ISO9660 file sy
 .PP
 .B 9660srv
 [
-.B -9J
+.B -9Jsv
 ] [
-.B -v
-] [
-.B -s
+.B -c
+.I clusters
 ] [
 .B -f
 .I file
@@ -191,6 +186,15 @@ while the
 .B -J
 flag causes it to
 ignore the Joliet tree.
+The
+.B -c
+option sets the size of the RAM cache to
+.I clusters
+clusters of 128KB.
+The default
+.I clusters
+is 16,
+but a value of 5600 will cache an entire CD incrementally.
 .PP
 If the floppy drive has an ejection motor,
 .I eject

+ 11 - 1
sys/man/4/ramfs

@@ -4,7 +4,7 @@ ramfs  \- memory file system
 .SH SYNOPSIS
 .B ramfs
 [
-.B -Dips
+.B -Dipsu
 ]
 [
 .B -m
@@ -70,6 +70,16 @@ However, it does not authenticate its clients and its
 implementation of groups is simplistic, so
 it should not be used for precious data.
 .PP
+The
+.B -u
+option permits
+.I ramfs
+to consume as much memory as needed;
+without it,
+.I ramfs
+will limit its consumption to some arbitrary amount,
+currently 768MB (enough to hold a CD image).
+.PP
 This program is useful mainly as an example of how
 to write a user-level file server.
 It can also be used to provide high-performance temporary files.

+ 2 - 0
sys/src/9/boot/aux.c

@@ -2,6 +2,7 @@
 #include <libc.h>
 #include <../boot/boot.h>
 
+/*
 int
 plumb(char *dir, char *dest, int *efd, char *here)
 {
@@ -39,6 +40,7 @@ plumb(char *dir, char *dest, int *efd, char *here)
 	}
 	return efd[1];
 }
+ */
 
 int
 sendmsg(int fd, char *msg)

+ 1 - 1
sys/src/9/ip/ipifc.c

@@ -135,7 +135,7 @@ ipifcbind(Conv *c, char **argv, int argc)
 	if(argc > 2)
 		strncpy(ifc->dev, argv[2], sizeof(ifc->dev));
 	else
-		sprint(ifc->dev, "%s%d", m->name, c->x);
+		snprint(ifc->dev, sizeof ifc->dev, "%s%d", m->name, c->x);
 	ifc->dev[sizeof(ifc->dev)-1] = 0;
 
 	/* set up parameters */

+ 1 - 1
sys/src/9/ip/iproute.c

@@ -662,7 +662,7 @@ sprintroute(Route *r, Routewalk *rw)
 	iname = "-";
 	if(nifc != -1) {
 		iname = ifbuf;
-		sprint(ifbuf, "%d", nifc);
+		snprint(ifbuf, sizeof ifbuf, "%d", nifc);
 	}
 	p = seprint(rw->p, rw->e, rformat, addr, mask, gate, t, r->tag, iname);
 	if(rw->o < 0){

+ 2 - 0
sys/src/9/pc/dat.h

@@ -17,6 +17,7 @@ typedef struct Proc	Proc;
 typedef struct Segdesc	Segdesc;
 typedef struct Ureg	Ureg;
 typedef struct Vctl	Vctl;
+typedef vlong		Tval;
 
 #pragma incomplete Pcidev
 #pragma incomplete Ureg
@@ -36,6 +37,7 @@ struct Lock
 	Proc	*p;
 	Mach	*m;
 	ushort	isilock;
+	long	lockcycles;
 };
 
 struct Label

+ 8 - 1
sys/src/9/pc/devarch.c

@@ -664,7 +664,8 @@ cpuidprint(void)
 	i = sprint(buf, "cpu%d: %dMHz ", m->machno, m->cpumhz);
 	if(m->cpuidid[0])
 		i += sprint(buf+i, "%12.12s ", m->cpuidid);
-	sprint(buf+i, "%s (cpuid: AX 0x%4.4uX DX 0x%4.4uX)\n",
+	seprint(buf+i, buf + sizeof buf - 1,
+		"%s (cpuid: AX 0x%4.4uX DX 0x%4.4uX)\n",
 		m->cpuidtype, m->cpuidax, m->cpuiddx);
 	print(buf);
 }
@@ -960,6 +961,12 @@ fastticks(uvlong *hz)
 	return (*arch->fastclock)(hz);
 }
 
+ulong
+µs(void)
+{
+	return fastticks2us((*arch->fastclock)(nil));
+}
+
 /*
  *  set next timer interrupt
  */

+ 16 - 23
sys/src/9/pc/devusb.c

@@ -138,7 +138,7 @@ addusbtype(char* t, int (*r)(Usbhost*))
 static Udev*
 usbdeviceofslot(Usbhost *uh, int s)
 {
-	if(s < 0 || s > nelem(uh->dev))
+	if(s < 0 || s >= nelem(uh->dev))
 		return nil;
 	return uh->dev[s];
 }
@@ -151,7 +151,7 @@ usbdevice(Chan *c)
 	Usbhost *uh;
 
 	bus = CTLR(c->qid);
-	if(bus > nelem(usbhost) || (uh = usbhost[bus]) == nil) {
+	if(bus >= nelem(usbhost) || (uh = usbhost[bus]) == nil) {
 		error(Egreg);
 		return nil;		/* for compiler */
 	}
@@ -320,7 +320,7 @@ usbgen(Chan *c, char *, Dirtab*, int, int s, Dir *dp)
 	}
 	bus = CTLR(c->qid);
 	if(bus >= nelem(usbhost) || (uh = usbhost[bus]) == nil)
-			return -1;
+		return -1;
 
 	/*
 	 * Second level contains "new", "port", and a numbered
@@ -347,7 +347,7 @@ usbgen(Chan *c, char *, Dirtab*, int, int s, Dir *dp)
 			d = uh->dev[s];
 			if(d == nil)
 				return 0;
-			sprint(up->genbuf, "%d", s);
+			snprint(up->genbuf, sizeof up->genbuf, "%d", s);
 			mkqid(&q, PATH(Q3rd, s, bus), d->id, QTDIR);
 			devdir(c, q, up->genbuf, 0, eve, 0555, dp);
 			return 1;
@@ -379,7 +379,7 @@ usbgen(Chan *c, char *, Dirtab*, int, int s, Dir *dp)
 		return -1;
 	if(s == 0 || (e = d->ep[s]) == nil)	/* ep0data is called "setup" */
 		return 0;
-	sprint(up->genbuf, "ep%ddata", s);
+	snprint(up->genbuf, sizeof up->genbuf, "ep%ddata", s);
 	mkqid(&q, PATH(Qep0+s, slot, bus), c->qid.vers, QTFILE);
 	switch(e->mode) {
 	case OREAD:
@@ -402,8 +402,7 @@ usbprobe(int cardno, int ctlrno)
 	Usbhost *uh;
 	char buf[128], *ebuf, name[64], *p, *type;
 
-	uh = malloc(sizeof(Usbhost));
-	memset(uh, 0, sizeof(Usbhost));
+	uh = mallocz(sizeof *uh, 1);
 	uh->tbdf = BUSUNKNOWN;
 
 	if(cardno < 0){
@@ -415,17 +414,13 @@ usbprobe(int cardno, int ctlrno)
 			type = uh->type;
 			if(type==nil || *type==0)
 				type = "uhci";
-			if(cistrcmp(usbtypes[cardno].type, type))
-				continue;
-			break;
+			if(cistrcmp(usbtypes[cardno].type, type) == 0)
+				break;
 		}
 	}
 
-	if(cardno >= MaxUsb || usbtypes[cardno].type == nil){
-		free(uh);
-		return nil;
-	}
-	if(usbtypes[cardno].reset(uh) < 0){
+	if(cardno >= MaxUsb || usbtypes[cardno].type == nil ||
+	    usbtypes[cardno].reset(uh) < 0){
 		free(uh);
 		return nil;
 	}
@@ -458,11 +453,9 @@ usbreset(void)
 	int cardno, ctlrno;
 	Usbhost *uh;
 
-	for(ctlrno = 0; ctlrno < MaxUsb; ctlrno++){
-		if((uh = usbprobe(-1, ctlrno)) == nil)
-			continue;
-		usbhost[ctlrno] = uh;
-	}
+	for(ctlrno = 0; ctlrno < MaxUsb; ctlrno++)
+		if((uh = usbprobe(-1, ctlrno)) != nil)
+			usbhost[ctlrno] = uh;
 
 	if(getconf("*nousbprobe"))
 		return;
@@ -493,7 +486,7 @@ usbinit(void)
 		uh = usbhost[ctlrno];
 		if(uh == nil)
 			continue;
-		if(uh->init != 0)
+		if(uh->init != nil)
 			uh->init(uh);
 
 		/* reserve device for configuration */
@@ -785,8 +778,8 @@ usbwrite(Chan *c, void *a, long n, vlong offset)
 			 */
 			d->npt = strtoul(cb->f[1], nil, 0); /* # of interfaces */
 			i = strtoul(cb->f[2], nil, 0);		/* endpoint */
-			if (i < 0 || i >= nelem(d->ep)
-			 || d->npt > nelem(d->ep) || i >= d->npt)
+			if (i < 0 || i >= nelem(d->ep) ||
+			    d->npt > nelem(d->ep) || i >= d->npt)
 				cmderror(cb, Ebadusbmsg);
 			if (cb->nf == 6) {
 				d->vid = strtoul(cb->f[4], nil, 0);

+ 2 - 2
sys/src/9/pc/ether8169.c

@@ -776,10 +776,10 @@ rtl8169attach(Ether* edev)
 	/*
 	 * Wait for link to be ready.
 	 */
-	for(timeo = 0; timeo < 3500; timeo++){
+	for(timeo = 0; timeo < 350; timeo++){
 		if(miistatus(ctlr->mii) == 0)
 			break;
-		delay(10);
+		delay(100);		/* print fewer miistatus messages */
 	}
 }
 

+ 27 - 6
sys/src/9/pc/etherga620.c

@@ -550,23 +550,37 @@ ga620replenish(Ctlr* ctlr)
 }
 
 static void
-ga620event(Ctlr* ctlr, int eci, int epi)
+ga620event(Ether *edev, int eci, int epi)
 {
 	int event;
+	ulong gls, fls;
+	Ctlr *ctlr;
 
+	ctlr = edev->ctlr;
 	while(eci != epi){
 		event = ctlr->er[eci].event;
 		switch(event>>24){
 		case 0x01:		/* firmware operational */
 			ga620command(ctlr, 0x01, 0x01, 0x00);
 			ga620command(ctlr, 0x0B, 0x00, 0x00);
-print("%8.8uX: %8.8uX\n", ctlr->port, event);
+print("ga620: %8.8uX: %8.8uX\n", ctlr->port, event);
 			break;
 		case 0x04:		/* statistics updated */
 			break;
 		case 0x06:		/* link state changed */
-print("%8.8uX: %8.8uX %8.8uX %8.8uX\n",
+print("ga620: %8.8uX: %8.8uX %8.8uX %8.8uX\n",
     ctlr->port, event, csr32r(ctlr, Gls), csr32r(ctlr, Fls));
+			gls = csr32r(ctlr, Gls);
+			fls = csr32r(ctlr, Fls);
+			if ((gls&(Le|L1000MB)) == (Le|L1000MB))
+				edev->mbps = 1000;
+			else if ((fls&(Le|L100MB)) == (Le|L100MB))
+				edev->mbps = 100;
+			else if ((fls&(Le|L10MB)) == (Le|L10MB))
+				edev->mbps = 10;
+			else
+				break;
+			print("#l%d: %dMbps\n", edev->ctlrno, edev->mbps);
 			break;
 		case 0x07:		/* event error */
 		default:
@@ -645,7 +659,7 @@ ga620interrupt(Ureg*, void* arg)
 
 		csr = csr32r(ctlr, Eci);
 		if(csr != ctlr->epi[0]){
-			ga620event(ctlr, csr, ctlr->epi[0]);
+			ga620event(edev, csr, ctlr->epi[0]);
 			work = 1;
 		}
 
@@ -1161,6 +1175,12 @@ ga620pci(void)
 	}
 }
 
+/* multicast may already be on, so we don't need to do anything */
+static void
+ga620multicast(void*, uchar*, int)
+{
+}
+
 static int
 ga620pnp(Ether* edev)
 {
@@ -1189,7 +1209,7 @@ ga620pnp(Ether* edev)
 	edev->port = ctlr->port;
 	edev->irq = ctlr->pcidev->intl;
 	edev->tbdf = ctlr->pcidev->tbdf;
-	edev->mbps = 1000;
+	edev->mbps = 1000;		/* placeholder */
 
 	/*
 	 * Check if the adapter's station address is to be overridden.
@@ -1210,10 +1230,11 @@ ga620pnp(Ether* edev)
 	edev->interrupt = ga620interrupt;
 	edev->ifstat = ga620ifstat;
 	edev->ctl = ga620ctl;
-	edev->shutdown = ga620shutdown;
 
 	edev->arg = edev;
 	edev->promiscuous = nil;
+	edev->multicast = ga620multicast;
+	edev->shutdown = ga620shutdown;
 
 	return 0;
 }

+ 7 - 4
sys/src/9/pc/etherigbe.c

@@ -445,6 +445,7 @@ typedef struct Ctlr {
 	int	port;
 	Pcidev*	pcidev;
 	Ctlr*	next;
+	Ether*	edev;
 	int	active;
 	int	started;
 	int	id;
@@ -511,7 +512,7 @@ static Ctlr* igbectlrhead;
 static Ctlr* igbectlrtail;
 
 static Lock igberblock;		/* free receive Blocks */
-static Block* igberbpool;
+static Block* igberbpool;	/* receive Blocks for all igbe controllers */
 
 static char* statistics[Nstatistics] = {
 	"CRC Error",
@@ -1012,7 +1013,8 @@ igbereplenish(Ctlr* ctlr)
 		if(ctlr->rb[rdt] == nil){
 			bp = igberballoc();
 			if(bp == nil){
-				iprint("no available buffers\n");
+				iprint("#l%d: igbereplenish: no available buffers\n",
+					ctlr->edev->ctlrno);
 				break;
 			}
 			ctlr->rb[rdt] = bp;
@@ -1171,6 +1173,7 @@ igbeattach(Ether* edev)
 	char name[KNAMELEN];
 
 	ctlr = edev->ctlr;
+	ctlr->edev = edev;			/* point back to Ether* */
 	qlock(&ctlr->alock);
 	if(ctlr->alloc != nil){
 		qunlock(&ctlr->alock);
@@ -1787,9 +1790,9 @@ if(i == Ea && ctlr->id == i82541gi && ctlr->eeprom[i] == 0xFFFF)
 
 	/*
 	 * Just in case the Eerst didn't load the defaults
-	 * (doesn't appear to fully on the 8243GC), do it manually.
+	 * (doesn't appear to fully on the 82543GC), do it manually.
 	 */
-	if (ctlr->id == i82543gc) {	// 82543
+	if (ctlr->id == i82543gc) {
 		txcw = csr32r(ctlr, Txcw);
 		txcw &= ~(TxcwAne|TxcwPauseMASK|TxcwFd);
 		ctrl = csr32r(ctlr, Ctrl);

+ 3 - 3
sys/src/9/pc/ethermii.c

@@ -176,13 +176,13 @@ miistatus(Mii* mii)
 	bmsr = mii->mir(mii, phyno, Bmsr);
 	if(!(bmsr & (BmsrAnc|BmsrAna)))
 {
-print("miistatus 1\n");
+print("miistatus: auto-neg incomplete\n");
 		return -1;
 }
 
 	bmsr = mii->mir(mii, phyno, Bmsr);
 	if(!(bmsr & BmsrLs)){
-print("miistatus 2\n");
+print("miistatus: link down\n");
 		phy->link = 0;
 		return -1;
 	}
@@ -216,7 +216,7 @@ print("miistatus 2\n");
 	}
 	if(phy->speed == 0)
 {
-print("miistatus 3\n");
+print("miistatus: phy speed 0\n");
 		return -1;
 }
 

+ 1 - 0
sys/src/9/pc/fns.h

@@ -4,6 +4,7 @@ void	aamloop(int);
 Dirtab*	addarchfile(char*, int, long(*)(Chan*,void*,long,vlong), long(*)(Chan*,void*,long,vlong));
 void	archinit(void);
 void	bootargs(void*);
+ulong	cankaddr(ulong);
 void	clockintr(Ureg*, void*);
 int	(*cmpswap)(long*, long, long);
 int	cmpswap486(long*, long, long);

+ 2 - 1
sys/src/9/pc/main.c

@@ -489,7 +489,8 @@ mathnote(void)
 		}else
 			msg = "invalid operation";
 	}
-	sprint(note, "sys: fp: %s fppc=0x%lux status=0x%lux", msg, up->fpsave.pc, status);
+	snprint(note, sizeof note, "sys: fp: %s fppc=0x%lux status=0x%lux",
+		msg, up->fpsave.pc, status);
 	postnote(up, 1, note, NDebug);
 }
 

+ 11 - 0
sys/src/9/pc/mmu.c

@@ -1041,4 +1041,15 @@ checkfault(ulong, ulong)
 {
 }
 
+/*
+ * Return the number of bytes that can be accessed via KADDR(pa).
+ * If pa is not a valid argument to KADDR, return 0.
+ */
+ulong
+cankaddr(ulong pa)
+{
+	if(pa >= -KZERO)
+		return 0;
+	return -KZERO - pa;
+}
 

+ 56 - 35
sys/src/9/pc/trap.c

@@ -416,12 +416,13 @@ trap(Ureg* ureg)
 	}
 	else{
 		if(vno == VectorNMI){
+			/*
+			 * Don't re-enable, it confuses the crash dumps.
 			nmienable();
-			if(m->machno != 0){
-				print("cpu%d: PC %8.8luX\n",
-					m->machno, ureg->pc);
-				for(;;);
-			}
+			 */
+			iprint("cpu%d: PC %#8.8lux\n", m->machno, ureg->pc);
+			while(m->machno != 0)
+				;
 		}
 		dumpregs(ureg);
 		if(!user){
@@ -454,18 +455,18 @@ void
 dumpregs2(Ureg* ureg)
 {
 	if(up)
-		print("cpu%d: registers for %s %lud\n",
+		iprint("cpu%d: registers for %s %lud\n",
 			m->machno, up->text, up->pid);
 	else
-		print("cpu%d: registers for kernel\n", m->machno);
-	print("FLAGS=%luX TRAP=%luX ECODE=%luX PC=%luX",
+		iprint("cpu%d: registers for kernel\n", m->machno);
+	iprint("FLAGS=%luX TRAP=%luX ECODE=%luX PC=%luX",
 		ureg->flags, ureg->trap, ureg->ecode, ureg->pc);
-	print(" SS=%4.4luX USP=%luX\n", ureg->ss & 0xFFFF, ureg->usp);
-	print("  AX %8.8luX  BX %8.8luX  CX %8.8luX  DX %8.8luX\n",
+	iprint(" SS=%4.4luX USP=%luX\n", ureg->ss & 0xFFFF, ureg->usp);
+	iprint("  AX %8.8luX  BX %8.8luX  CX %8.8luX  DX %8.8luX\n",
 		ureg->ax, ureg->bx, ureg->cx, ureg->dx);
-	print("  SI %8.8luX  DI %8.8luX  BP %8.8luX\n",
+	iprint("  SI %8.8luX  DI %8.8luX  BP %8.8luX\n",
 		ureg->si, ureg->di, ureg->bp);
-	print("  CS %4.4luX  DS %4.4luX  ES %4.4luX  FS %4.4luX  GS %4.4luX\n",
+	iprint("  CS %4.4luX  DS %4.4luX  ES %4.4luX  FS %4.4luX  GS %4.4luX\n",
 		ureg->cs & 0xFFFF, ureg->ds & 0xFFFF, ureg->es & 0xFFFF,
 		ureg->fs & 0xFFFF, ureg->gs & 0xFFFF);
 }
@@ -484,17 +485,17 @@ dumpregs(Ureg* ureg)
 	 * CR4. If there is a CR4 and machine check extensions, read the machine
 	 * check address and machine check type registers if RDMSR supported.
 	 */
-	print("  CR0 %8.8lux CR2 %8.8lux CR3 %8.8lux",
+	iprint("  CR0 %8.8lux CR2 %8.8lux CR3 %8.8lux",
 		getcr0(), getcr2(), getcr3());
 	if(m->cpuiddx & 0x9A){
-		print(" CR4 %8.8lux", getcr4());
+		iprint(" CR4 %8.8lux", getcr4());
 		if((m->cpuiddx & 0xA0) == 0xA0){
 			rdmsr(0x00, &mca);
 			rdmsr(0x01, &mct);
-			print("\n  MCA %8.8llux MCT %8.8llux", mca, mct);
+			iprint("\n  MCA %8.8llux MCT %8.8llux", mca, mct);
 		}
 	}
-	print("\n  ur %lux up %lux\n", ureg, up);
+	iprint("\n  ur %lux up %lux\n", ureg, up);
 }
 
 
@@ -514,7 +515,7 @@ callwithureg(void (*fn)(Ureg*))
 static void
 _dumpstack(Ureg *ureg)
 {
-	ulong l, v, i, estack;
+	uintptr l, v, i, estack;
 	extern ulong etext;
 	int x;
 
@@ -525,38 +526,53 @@ _dumpstack(Ureg *ureg)
 	iprint("dumpstack\n");
 
 	x = 0;
-	x += print("ktrace /kernel/path %.8lux %.8lux <<EOF\n", ureg->pc, ureg->sp);
+	x += iprint("ktrace /kernel/path %.8lux %.8lux <<EOF\n", ureg->pc, ureg->sp);
 	i = 0;
 	if(up
-	&& (ulong)&l >= (ulong)up->kstack
-	&& (ulong)&l <= (ulong)up->kstack+KSTACK)
-		estack = (ulong)up->kstack+KSTACK;
-	else if((ulong)&l >= (ulong)m->stack
-	&& (ulong)&l <= (ulong)m+BY2PG)
-		estack = (ulong)m+MACHSIZE;
+	&& (uintptr)&l >= (uintptr)up->kstack
+	&& (uintptr)&l <= (uintptr)up->kstack+KSTACK)
+		estack = (uintptr)up->kstack+KSTACK;
+	else if((uintptr)&l >= (uintptr)m->stack
+	&& (uintptr)&l <= (uintptr)m+MACHSIZE)
+		estack = (uintptr)m+MACHSIZE;
 	else
 		return;
-	x += print("estackx %.8lux\n", estack);
+	x += iprint("estackx %p\n", estack);
 
-	for(l=(ulong)&l; l<estack; l+=4){
-		v = *(ulong*)l;
-		if((KTZERO < v && v < (ulong)&etext) || estack-l<32){
+	for(l = (uintptr)&l; l < estack; l += sizeof(uintptr)){
+		v = *(uintptr*)l;
+		if((KTZERO < v && v < (uintptr)&etext) || estack-l < 32){
 			/*
-			 * we could Pick off general CALL (((uchar*)v)[-5] == 0xE8)
-			 * and CALL indirect through AX (((uchar*)v)[-2] == 0xFF && ((uchar*)v)[-2] == 0xD0),
+			 * Could Pick off general CALL (((uchar*)v)[-5] == 0xE8)
+			 * and CALL indirect through AX
+			 * (((uchar*)v)[-2] == 0xFF && ((uchar*)v)[-2] == 0xD0),
 			 * but this is too clever and misses faulting address.
 			 */
-			x += print("%.8lux=%.8lux ", l, v);
+			x += iprint("%.8p=%.8p ", l, v);
 			i++;
 		}
 		if(i == 4){
 			i = 0;
-			x += print("\n");
+			x += iprint("\n");
 		}
 	}
 	if(i)
-		print("\n");
-	print("EOF\n");
+		iprint("\n");
+	iprint("EOF\n");
+
+	if(ureg->trap != VectorNMI)
+		return;
+
+	i = 0;
+	for(l = (uintptr)&l; l < estack; l += sizeof(uintptr)){
+		iprint("%.8p ", *(uintptr*)l);
+		if(++i == 8){
+			i = 0;
+			iprint("\n");
+		}
+	}
+	if(i)
+		iprint("\n");
 }
 
 void
@@ -782,13 +798,16 @@ notify(Ureg* ureg)
 		splhi();
 		return 0;
 	}
-		
+
 	if(!up->notify){
 		qunlock(&up->debug);
 		pexit(n->msg, n->flag!=NDebug);
 	}
 	sp = ureg->usp;
+	sp -= 256;	/* debugging: preserve context causing problem */
 	sp -= sizeof(Ureg);
+if(0) print("%s %lud: notify %.8lux %.8lux %.8lux %s\n", 
+	up->text, up->pid, ureg->pc, ureg->usp, sp, n->msg);
 
 	if(!okaddr((ulong)up->notify, 1, 0)
 	|| !okaddr(sp-ERRMAX-4*BY2WD, sizeof(Ureg)+ERRMAX+4*BY2WD, 1)){
@@ -871,6 +890,8 @@ noted(Ureg* ureg, ulong arg0)
 	switch(arg0){
 	case NCONT:
 	case NRSTR:
+if(0) print("%s %lud: noted %.8lux %.8lux\n", 
+	up->text, up->pid, nureg->pc, nureg->usp);
 		if(!okaddr(nureg->pc, 1, 0) || !okaddr(nureg->usp, BY2WD, 0)){
 			qunlock(&up->debug);
 			pprint("suicide: trap in noted\n");

+ 8 - 7
sys/src/9/pc/usbuhci.c

@@ -455,6 +455,7 @@ cleantd(Ctlr *ctlr, TD *t, int discard)
 	case Utokout:
 		/* TO DO: mark it done somewhere */
 		XPRINT("cleanTD: TokOut %lux\n", &t->ep);
+		ilock(ctlr);		/* e->ntd++ is ilocked */
 		if(t->ep != nil){
 			if(t->bp){
 				n = BLEN(t->bp);
@@ -463,13 +464,12 @@ cleantd(Ctlr *ctlr, TD *t, int discard)
 			}
 			if(t->ep->x!=0 && err != 0)
 				t->ep->err = err==Stalled? Estalled: Eio;
-			ilock(ctlr);		/* e->ntd++ is ilocked */
 			if(--t->ep->ntd < 0)
 				panic("cleantd ntd");
-			iunlock(ctlr);
 			wakeup(&t->ep->wr);	/* TO DO */
 			XPRINT("cleanTD: wakeup %lux\n", &t->ep->wr);
 		}
+		iunlock(ctlr);
 		break;
 	}
 	freetd(ctlr, t);
@@ -1135,14 +1135,14 @@ isoio(Ctlr *ctlr, Endpt *e, void *a, long n, ulong offset, int w)
 		iprint("offset %lud, foffset %lud\n", offset, e->foffset);
 		/* Seek to a specific position */
 		frnum = (IN(Frnum) + 8) & 0x3ff;
-		td = x->td0 +frnum;
+		td = x->td0 + frnum;
 		if (offset < td->offset)
 			error("ancient history");
-		while (offset > e->toffset){
+		while (offset > e->toffset)
 			tsleep(&e->wr, return0, 0, 500);
-		}
+		/* TODO: how should this be parenthesised? */
 		while (offset >= td->offset +
-		    ((w? (td->dev>>21): td->status) + 1) & 0x7ff){
+		    (((w? (td->dev>>21): td->status) + 1) & 0x7ff)){
 			td = td->next;
 			if (td == x->xtd)
 				iprint("trouble\n");
@@ -1341,7 +1341,8 @@ write(Usbhost *uh, Endpt *e, void *a, long n, vlong offset, int tok)
 			nexterror();
 		}
 		XPRINT("out [%d]", i);
-		for (j = 0; j < i; j++) XPRINT(" %.2x", p[j]);
+		for (j = 0; j < i; j++)
+			XPRINT(" %.2x", p[j]);
 		XPRINT("\n");
 		memmove(b->wp, p, i);
 		b->wp += i;

+ 3 - 1
sys/src/9/port/devcap.c

@@ -105,10 +105,11 @@ capopen(Chan *c, int omode)
 	return c;
 }
 
+/*
 static char*
 hashstr(uchar *hash)
 {
-	static char buf[256];
+	static char buf[2*Hashlen+1];
 	int i;
 
 	for(i = 0; i < Hashlen; i++)
@@ -116,6 +117,7 @@ hashstr(uchar *hash)
 	buf[2*Hashlen] = 0;
 	return buf;
 }
+ */
 
 static Caphash*
 remcap(uchar *hash)

+ 1 - 1
sys/src/9/port/devcons.c

@@ -321,7 +321,7 @@ pprint(char *fmt, ...)
 	c = up->fgrp->fd[2];
 	if(c==0 || (c->mode!=OWRITE && c->mode!=ORDWR))
 		return 0;
-	n = sprint(buf, "%s %lud: ", up->text, up->pid);
+	n = snprint(buf, sizeof buf, "%s %lud: ", up->text, up->pid);
 	va_start(arg, fmt);
 	n = vseprint(buf+n, buf+sizeof(buf), fmt, arg) - buf;
 	va_end(arg);

+ 4 - 3
sys/src/9/port/devproc.c

@@ -671,7 +671,8 @@ eventsavailable(void *)
 static long
 procread(Chan *c, void *va, long n, vlong off)
 {
-	char *a, flag[10], *sps, *srv, statbuf[NSEG*32];
+	/* NSEG*32 was too small for worst cases */
+	char *a, flag[10], *sps, *srv, statbuf[NSEG*64];
 	int i, j, m, navail, ne, pid, rsize;
 	long l;
 	uchar *rptr;
@@ -699,9 +700,9 @@ procread(Chan *c, void *va, long n, vlong off)
 			navail = n / sizeof(Traceevent);
 		while(navail > 0) {
 			ne = ((tconsumed & Emask) + navail > Nevents)? 
-						Nevents - (tconsumed & Emask): navail;
+					Nevents - (tconsumed & Emask): navail;
 			memmove(rptr, &tevents[tconsumed & Emask], 
-						ne * sizeof(Traceevent));
+					ne * sizeof(Traceevent));
 
 			tconsumed += ne;
 			rptr += ne * sizeof(Traceevent);

+ 3 - 3
sys/src/boot/pc/bootp.c

@@ -292,15 +292,15 @@ udprecv(int ctlrno, Netaddr *a, void *data, int dlen)
 
 		if(a->port != 0 && nhgets(h->udpsport) != a->port) {
 			if(debug)
-				print("udpport %ux %ux\n",
+				print("udpport %ux not %ux\n",
 					nhgets(h->udpsport), a->port);
 			continue;
 		}
 
 		addr = nhgetl(h->udpsrc);
-		if(a->ip != Bcastip && addr != a->ip) {
+		if(a->ip != Bcastip && a->ip != addr) {
 			if(debug)
-				print("bad ip\n");
+				print("bad ip %lux not %lux\n", addr, a->ip);
 			continue;
 		}
 

+ 5 - 2
sys/src/cmd/9660srv/iobuf.c

@@ -26,6 +26,8 @@
 #define	BUFPERCLUST	64	/* 64*Sectorsize = 128kb */
 #define	NCLUST		16
 
+int nclust = NCLUST;
+
 static Ioclust*	iohead;
 static Ioclust*	iotail;
 static Ioclust*	getclust(Xdata*, long);
@@ -40,13 +42,14 @@ iobuf_init(void)
 	Iobuf *b;
 	uchar *mem;
 
-	n = NCLUST*sizeof(Ioclust)+NCLUST*BUFPERCLUST*(sizeof(Iobuf)+Sectorsize);
+	n = nclust*sizeof(Ioclust) +
+		nclust*BUFPERCLUST*(sizeof(Iobuf)+Sectorsize);
 	mem = sbrk(n);
 	if(mem == (void*)-1)
 		panic(0, "iobuf_init");
 	memset(mem, 0, n);
 
-	for(i=0; i<NCLUST; i++){
+	for(i=0; i<nclust; i++){
 		c = (Ioclust*)mem;
 		mem += sizeof(Ioclust);
 		c->addr = -1;

+ 15 - 9
sys/src/cmd/9660srv/main.c

@@ -44,6 +44,7 @@ int errno;
 static char	srvfile[64];
 
 extern Xfsub	*xsublist[];
+extern int	nclust;
 
 jmp_buf	err_lab[16];
 int	nerr_lab;
@@ -78,24 +79,29 @@ main(int argc, char **argv)
 
 	stdio = 0;
 	ARGBEGIN {
-	case 'v':
-		chatty = 1;
+	case '9':
+		noplan9 = 1;
+		break;
+	case 'c':
+		nclust = atoi(EARGF(usage()));
+		if (nclust <= 0)
+			sysfatal("nclust %d non-positive", nclust);
 		break;
 	case 'f':
-		deffile = ARGF();
+		deffile = EARGF(usage());
+		break;
+	case 'r':
+		norock = 1;
 		break;
 	case 's':
 		stdio = 1;
 		break;
-	case '9':
-		noplan9 = 1;
+	case 'v':
+		chatty = 1;
 		break;
 	case 'J':
 		nojoliet = 1;
 		break;
-	case 'r':
-		norock = 1;
-		break;
 	default:
 		usage();
 	} ARGEND
@@ -385,7 +391,7 @@ rwalk(void)
 			chat("\tnot dir: type=%#x\n", f->qid.type);
 			error("walk in non-directory");
 		}
-		
+
 		if(strcmp(req->wname[rep->nwqid], "..")==0){
 			if(f->qid.path != f->xf->rootqid.path)
 				(*f->xf->s->walkup)(f);

+ 1 - 1
sys/src/cmd/auth/cron.c

@@ -451,7 +451,7 @@ call(char *host)
 
 /*
  * convert command to run properly on the remote machine
- * need to escape the quotes wo they don't get stripped
+ * need to escape the quotes so they don't get stripped
  */
 int
 mkcmd(char *cmd, char *buf, int len)

+ 1 - 1
sys/src/cmd/auth/secureidcheck.c

@@ -415,7 +415,7 @@ secureidcheck(char *user, char *response)
 		if(strcmp(nt->attr, "ip") != 0)
 			continue;
 
-		snprint(dest,sizeof dest,"udp!%s!oradius", nt->val);
+		snprint(dest,sizeof dest,"udp!%s!radius", nt->val);
 		resp = rpc(dest, &shared, req);
 		if(resp == nil){
 			syslog(0, AUTHLOG, "%s nil response", dest);

+ 37 - 1
sys/src/cmd/aux/conswdir.c

@@ -11,6 +11,14 @@
 #include <u.h>
 #include <libc.h>
 
+struct {
+	char *file;
+	char name[512];
+} keep[] = {
+	{ "/dev/label" },
+	{ "/dev/wdir" }
+};
+
 char *prog = "/bin/rwd";
 
 void
@@ -20,6 +28,31 @@ usage(void)
 	exits("usage");
 }
 
+void
+save(void)
+{
+	int i, fd;
+	for(i = 0; i < nelem(keep); i++){
+		*keep[i].name = 0;
+		if((fd = open(keep[i].file, OREAD)) != -1){
+			read(fd, keep[i].name, sizeof(keep[i].name));
+			close(fd);
+		}
+	}
+}
+
+void
+rest(void)
+{
+	int i, fd;
+	for(i = 0; i < nelem(keep); i++)
+		if((fd = open(keep[i].file, OWRITE)) != -1){
+			write(fd, keep[i].name, strlen(keep[i].name));
+			close(fd);
+		}
+
+}
+
 void
 setpath(char *s)
 {
@@ -125,6 +158,7 @@ main(int argc, char **argv)
 	if(argc == 1)
 		prog = argv[0];
 
+	save();
 	n = 0;
 	for(;;){
 		m = read(0, buf+n, sizeof buf-n);
@@ -132,7 +166,7 @@ main(int argc, char **argv)
 			rerrstr(buf, sizeof buf);
 			if(strstr(buf, "interrupt"))
 				continue;
-			exits(nil);
+			break;
 		}
 		n += m;
 		m = process(buf, n, &n);
@@ -142,4 +176,6 @@ main(int argc, char **argv)
 			n -= m;
 		}
 	}
+	rest();
+	exits(nil);
 }

+ 1 - 1
sys/src/cmd/aux/gps/dat.h

@@ -8,7 +8,7 @@ struct Place {
 
 enum {
 	Undef		= 0x80000000,
-	Baud=		4800,
+	Baud=		9600,
 };
 
 extern Place nowhere;

+ 1 - 1
sys/src/cmd/cc/com.c

@@ -1255,7 +1255,7 @@ compar(Node *n, int reverse)
 	if(l->op == OCONST)
 		return 0;
 	lt = l->type;
-	if(l->op == ONAME){
+	if(l->op == ONAME && l->sym->type){
 		lt = l->sym->type;
 		if(lt && lt->etype == TARRAY)
 			lt = lt->link;

+ 1 - 0
sys/src/cmd/cc/dpchk.c

@@ -158,6 +158,7 @@ arginit(void)
 	argflag('.', Fignor);
 	argflag('#', Fignor);
 	argflag('u', Fignor);
+	argflag('h', Fignor);
 	argflag('+', Fignor);
 	argflag('-', Fignor);
 

+ 17 - 9
sys/src/cmd/fossil/9auth.c

@@ -1,5 +1,4 @@
 #include "stdinc.h"
-
 #include "9.h"
 
 int
@@ -15,7 +14,7 @@ authRead(Fid* afid, void* data, int count)
 
 	switch(auth_rpc(rpc, "read", nil, 0)){
 	default:
-		vtSetError("auth protocol not finished");
+		vtSetError("fossil authRead: auth protocol not finished");
 		return -1;
 	case ARdone:
 		if((ai = auth_getinfo(rpc)) == nil){
@@ -87,19 +86,25 @@ authCheck(Fcall* t, Fid* fid, Fs* fsys)
 		if(con->isconsole){
 			/* anything goes */
 		}else if((con->flags&ConNoneAllow) || con->aok){
-			consPrint("attach %s as %s: allowing as none\n", fsysGetName(fsys), fid->uname);
+			static int noneprint;
+
+			if(noneprint++ < 10)
+				consPrint("attach %s as %s: allowing as none\n",
+					fsysGetName(fsys), fid->uname);
 			vtMemFree(fid->uname);
 			fid->uname = vtStrDup(unamenone);
 		}else{
 			vtRUnlock(con->alock);
-			consPrint("attach %s as %s: connection not authenticated, not console\n", fsysGetName(fsys), fid->uname);
+			consPrint("attach %s as %s: connection not authenticated, not console\n",
+				fsysGetName(fsys), fid->uname);
 			vtSetError("cannot attach as none before authentication");
 			return 0;
 		}
 		vtRUnlock(con->alock);
 
 		if((fid->uid = uidByUname(fid->uname)) == nil){
-			consPrint("attach %s as %s: unknown uname\n", fsysGetName(fsys), fid->uname);
+			consPrint("attach %s as %s: unknown uname\n",
+				fsysGetName(fsys), fid->uname);
 			vtSetError("unknown user");
 			return 0;
 		}
@@ -117,13 +122,15 @@ authCheck(Fcall* t, Fid* fid, Fs* fsys)
 	 * check uname and aname match.
 	 */
 	if(!(afid->qid.type & QTAUTH)){
-		consPrint("attach %s as %s: afid not an auth file\n", fsysGetName(fsys), fid->uname);
+		consPrint("attach %s as %s: afid not an auth file\n", fsysGetName(fsys),
+			fid->uname);
 		fidPut(afid);
 		vtSetError("bad authentication fid");
 		return 0;
 	}
 	if(strcmp(afid->uname, fid->uname) != 0 || afid->fsys != fsys){
-		consPrint("attach %s as %s: afid is for %s as %s\n", fsysGetName(fsys), fid->uname, fsysGetName(afid->fsys), afid->uname);
+		consPrint("attach %s as %s: afid is for %s as %s\n", fsysGetName(fsys),
+			fid->uname, fsysGetName(afid->fsys), afid->uname);
 		fidPut(afid);
 		vtSetError("attach/auth mismatch");
 		return 0;
@@ -135,7 +142,7 @@ authCheck(Fcall* t, Fid* fid, Fs* fsys)
 			vtUnlock(afid->alock);
 			consPrint("attach %s as %s: %R\n", fsysGetName(fsys), fid->uname);
 			fidPut(afid);
-			vtSetError("authentication protocol not finished");
+			vtSetError("fossil authCheck: auth protocol not finished");
 			return 0;
 		}
 	}
@@ -143,7 +150,8 @@ authCheck(Fcall* t, Fid* fid, Fs* fsys)
 
 	assert(fid->uid == nil);
 	if((fid->uid = uidByUname(afid->cuname)) == nil){
-		consPrint("attach %s as %s: unknown cuname %s\n", fsysGetName(fsys), fid->uname, afid->cuname);
+		consPrint("attach %s as %s: unknown cuname %s\n", fsysGetName(fsys),
+			fid->uname, afid->cuname);
 		fidPut(afid);
 		vtSetError("unknown user");
 		return 0;

+ 1 - 1
sys/src/cmd/fossil/9fsys.c

@@ -805,7 +805,7 @@ fsysDf(Fsys *fsys, int argc, char* argv[])
 	cacheCountUsed(fs->cache, fs->elo, &used, &tot, &bsize);
 	consPrint("\t%s: %,llud used + %,llud free = %,llud (%ud%% used)\n",
 		fsys->name, used*(vlong)bsize, (tot-used)*(vlong)bsize,
-		tot*(vlong)bsize, used*100/tot);
+		tot*(vlong)bsize, used*100LL/tot);
 	return 1;
 }
 

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

@@ -15,7 +15,7 @@
 #define NUMW		5
 #define MARGIN		10
 #define DEFTAB		8
-#define NFILES		10
+#define NFILES		20
 #define HEAD		"%12.12s %4.4s  %s Page %d\n\n\n", date+4, date+24, head, Page
 #define TOLOWER(c)	(isupper(c) ? tolower(c) : c)	/* ouch! */
 #define cerror(S)	fprint(2, "pr: %s", S)

+ 7 - 2
sys/src/cmd/ramfs.c

@@ -137,6 +137,8 @@ char	Enotempty[] =	"directory not empty";
 int debug;
 int private;
 
+static int memlim = 1;
+
 void
 notifyf(void *a, char *s)
 {
@@ -177,6 +179,9 @@ main(int argc, char *argv[])
 	case 'p':
 		private++;
 		break;
+	case 'u':
+		memlim = 0;		/* unlimited memory consumption */
+		break;
 	case 'S':
 		defmnt = 0;
 		service = EARGF(usage());
@@ -550,7 +555,7 @@ rwrite(Fid *f)
 	cnt = thdr.count;
 	if(r->qid.type & QTDIR)
 		return Eisdir;
-	if(off+cnt >= Maxsize)		/* sanity check */
+	if(memlim && off+cnt >= Maxsize)		/* sanity check */
 		return "write too big";
 	if(off+cnt > r->ndata)
 		r->data = erealloc(r->data, off+cnt);
@@ -885,6 +890,6 @@ estrdup(char *q)
 void
 usage(void)
 {
-	fprint(2, "usage: %s [-Dips] [-m mountpoint] [-S srvname]\n", argv0);
+	fprint(2, "usage: %s [-Dipsu] [-m mountpoint] [-S srvname]\n", argv0);
 	exits("usage");
 }

+ 1 - 1
sys/src/cmd/scuzz/scsireq.c

@@ -565,7 +565,7 @@ dirdevopen(ScsiReq *rp)
 
 	if(SRstart(rp, 1) == -1 || SRrcapacity(rp, data) == -1)
 		return -1;
-	rp->lbsize = (data[4]<<28)|(data[5]<<16)|(data[6]<<8)|data[7];
+	rp->lbsize = (data[4]<<24)|(data[5]<<16)|(data[6]<<8)|data[7];
 	blocks =     (data[0]<<24)|(data[1]<<16)|(data[2]<<8)|data[3];
 	/* some newer dev's don't support 6-byte commands */
 	if(blocks > 0x1fffff && !force6bytecmds)

+ 14 - 14
sys/src/cmd/scuzz/scsireq.h

@@ -12,23 +12,23 @@ enum {					/* fundamental constants/defaults */
 };
 
 typedef struct {
-	uchar *p;
-	long count;
-	uchar write;
+	uchar	*p;
+	long	count;
+	uchar	write;
 } ScsiPtr;
 
 typedef struct {
-	int flags;
-	char *unit;			/* unit directory */
-	int lun;
-	ulong lbsize;
-	ulong offset;
-	int fd;
-	ScsiPtr cmd;
-	ScsiPtr data;
-	int status;			/* returned status */
-	uchar sense[MaxDirData];	/* returned sense data */
-	uchar inquiry[MaxDirData];	/* returned inquiry data */
+	int	flags;
+	char	*unit;			/* unit directory */
+	int	lun;
+	ulong	lbsize;
+	ulong	offset;			/* in blocks of lbsize bytes */
+	int	fd;
+	ScsiPtr	cmd;
+	ScsiPtr	data;
+	int	status;			/* returned status */
+	uchar	sense[MaxDirData];	/* returned sense data */
+	uchar	inquiry[MaxDirData];	/* returned inquiry data */
 } ScsiReq;
 
 enum {					/* flags */

+ 22 - 11
sys/src/cmd/usb/lib/device.c

@@ -110,12 +110,20 @@ describedevice(Device *d)
 {
 	DDevice *dd;
 	byte buf[1023];
-	int nr = -1;
-
-	if (setupreq(d->ep[0], RD2H|Rstandard|Rdevice, GET_DESCRIPTOR, (DEVICE<<8)|0, 0, sizeof(buf)) < 0 ||
-	   (nr = setupreply(d->ep[0], buf, sizeof(buf))) < DDEVLEN) {
-		fprint(2, "usb: error reading device descriptor, got %d of %d\n",
-			nr, DDEVLEN);
+	int nr;
+
+	werrstr("");
+	if (setupreq(d->ep[0], RD2H|Rstandard|Rdevice, GET_DESCRIPTOR,
+	     DEVICE<<8|0, 0, sizeof buf) < 0) {
+		fprint(2,
+"%s: describedevice: error writing usb device request: get device descriptor: %r\n",
+			argv0);
+		return -1;
+	}
+	if ((nr = setupreply(d->ep[0], buf, sizeof buf)) < DDEVLEN) {
+		fprint(2,
+"%s: describedevice: error reading usb device descriptor, got %d of %d: %r\n",
+			argv0, nr, DDEVLEN);
 		return -1;
 	}
 	/* extract gubbins */
@@ -137,11 +145,14 @@ int
 loadconfig(Device *d, int n)
 {
 	byte buf[1023];
-	int nr, len;
-
-	if (setupreq(d->ep[0], RD2H|Rstandard|Rdevice, GET_DESCRIPTOR, (CONFIGURATION<<8)|n, 0, sizeof(buf)) < 0 ||
-	   (nr = setupreply(d->ep[0], buf, sizeof(buf))) < 1) {
-		fprint(2, "usb: error reading configuration descriptor\n");
+	int nr = -1, len;
+
+	if (setupreq(d->ep[0], RD2H|Rstandard|Rdevice, GET_DESCRIPTOR,
+	     CONFIGURATION<<8|n, 0, sizeof buf) < 0 ||
+	    (nr = setupreply(d->ep[0], buf, sizeof buf)) < 1) {
+		fprint(2,
+	"%s: error reading usb configuration descriptor: read %d bytes: %r\n",
+			argv0, nr);
 		return -1;
 	}
 	if (buf[1] == CONFIGURATION) {

+ 78 - 48
sys/src/cmd/usb/lib/dump.c

@@ -158,11 +158,11 @@ preport(Device *, int, ulong, byte *b, int n)
 			fprint(2, "long report tag");
 			return;
 		}
-		if((nb = tag&3)==3)
+		if((nb = tag&3) == 3)
 			nb = 4;
 		v = 0;
 		for(i=0; i<nb; i++)
-			v |= s[i]<<(i*8);
+			v |= s[i] << (i*8);
 		switch(tag & Tmtype){
 		case Treserved:
 			if(tag == Tlong){
@@ -175,12 +175,28 @@ preport(Device *, int, ulong, byte *b, int n)
 			tab = nil;
 			if (debug & Dbginfo) {
 				switch(tag & Tmitem){
-				case Tinput:	fprint(2, "Input"); tab = ioflags; break;
-				case Toutput:	fprint(2, "Output"); tab = ioflags; break;
-				case Tfeature:	fprint(2, "Feature"); tab = ioflags; break;
-				case Tcoll:	fprint(2, "Collection"); indent++; break;
-				case Tecoll:	fprint(2, "End Collection"); indent--; break;
-				default:		fprint(2, "unexpected item %.2x", tag);
+				case Tinput:
+					fprint(2, "Input");
+					tab = ioflags;
+					break;
+				case Toutput:
+					fprint(2, "Output");
+					tab = ioflags;
+					break;
+				case Tfeature:
+					fprint(2, "Feature");
+					tab = ioflags;
+					break;
+				case Tcoll:
+					fprint(2, "Collection");
+					indent++;
+					break;
+				case Tecoll:
+					fprint(2, "End Collection");
+					indent--;
+					break;
+				default:
+					fprint(2, "unexpected item %.2x", tag);
 				}
 				fprint(2, "=%#ux", v);
 				if(tab != nil)
@@ -289,8 +305,9 @@ phub(Device *, int, ulong, void *b, int n)
 	d = b;
 	if (debug & Dbginfo)
 		fprint(2, "nport %d charac %#.4x pwr %dms current %dmA remov %#.2x",
-			d->bNbrPorts, GET2(d->wHubCharacteristics), d->bPwrOn2PwrGood*2,
-			d->bHubContrCurrent, d->DeviceRemovable[0]);
+			d->bNbrPorts, GET2(d->wHubCharacteristics),
+			d->bPwrOn2PwrGood*2, d->bHubContrCurrent,
+			d->DeviceRemovable[0]);
 }
 
 void
@@ -353,14 +370,17 @@ pcs_endpoint(Device *, int, ulong, void *bb, int n)
 	if (debug & Dbginfo) {
 		switch(b[2]) {
 		case 0x01:
-			fprint(2, "CS_ENDPOINT for TerminalID %d, delay %d, format_tag %#ux\n",
+			fprint(2,