Browse Source

Plan 9 from Bell Labs 2003-12-13

David du Colombier 20 years ago
parent
commit
788a6407d3
47 changed files with 858 additions and 503 deletions
  1. 137 137
      dist/replica/plan9.db
  2. 137 0
      dist/replica/plan9.log
  3. 1 0
      sys/games/lib/fortunes
  4. 2 2
      sys/man/1/page
  5. 4 1
      sys/man/2/encode
  6. 7 0
      sys/man/2/mp
  7. 20 17
      sys/man/8/mkfs
  8. 4 3
      sys/src/9/alphapc/dat.h
  9. 0 1
      sys/src/9/alphapc/mkfile
  10. 4 3
      sys/src/9/bitsy/dat.h
  11. 1 1
      sys/src/9/bitsy/devpcmcia.c
  12. 4 3
      sys/src/9/bitsy/devuda1341.c
  13. 1 1
      sys/src/9/bitsy/etherwavelan.c
  14. 0 1
      sys/src/9/bitsy/mkfile
  15. 2 1
      sys/src/9/mtx/dat.h
  16. 1 1
      sys/src/9/mtx/devether.c
  17. 0 1
      sys/src/9/mtx/mkfile
  18. 4 3
      sys/src/9/pc/dat.h
  19. 28 23
      sys/src/9/pc/devpccard.c
  20. 15 10
      sys/src/9/pc/devtv.c
  21. 6 4
      sys/src/9/pc/ether79c970.c
  22. 3 2
      sys/src/9/pc/ether8139.c
  23. 3 2
      sys/src/9/pc/ether8390.c
  24. 3 2
      sys/src/9/pc/etherigbe.c
  25. 3 2
      sys/src/9/pc/ethersmc.c
  26. 4 3
      sys/src/9/pc/i8253.c
  27. 6 4
      sys/src/9/pc/memory.c
  28. 68 65
      sys/src/9/pc/pci.c
  29. 4 1
      sys/src/9/pc/sdata.c
  30. 9 6
      sys/src/9/pc/sdmylex.c
  31. 3 2
      sys/src/9/pc/vga3dfx.c
  32. 3 2
      sys/src/9/pc/vgaclgd546x.c
  33. 7 4
      sys/src/9/pc/vgamach64xx.c
  34. 3 2
      sys/src/9/pc/vganeomagic.c
  35. 79 78
      sys/src/9/port/devsd.c
  36. 2 1
      sys/src/9/port/portdat.h
  37. 218 79
      sys/src/9/port/proc.c
  38. 2 1
      sys/src/9/ppc/dat.h
  39. 3 0
      sys/src/ape/lib/ap/stdio/strerror.c
  40. 1 1
      sys/src/cmd/acid/builtin.c
  41. 4 2
      sys/src/cmd/auth/factotum/apop.c
  42. 18 6
      sys/src/cmd/aux/olefs.c
  43. 19 22
      sys/src/cmd/history.c
  44. 1 1
      sys/src/cmd/ramfs.c
  45. 0 2
      sys/src/cmd/vac/cache.c
  46. 5 0
      sys/src/libc/port/encodefmt.c
  47. 9 0
      sys/src/libmp/port/mpextendedgcd.c

+ 137 - 137
dist/replica/plan9.db

@@ -27,23 +27,23 @@
 386/bin/9660srv - 775 sys sys 1064598019 104963
 386/bin/9660srv - 775 sys sys 1064598019 104963
 386/bin/aan - 775 sys sys 1064598020 128816
 386/bin/aan - 775 sys sys 1064598020 128816
 386/bin/acid - 775 sys sys 1068558062 379803
 386/bin/acid - 775 sys sys 1068558062 379803
-386/bin/acme - 775 sys sys 1068385791 417693
+386/bin/acme - 775 sys sys 1071245279 417811
 386/bin/ape - 20000000775 sys sys 1016944144 0
 386/bin/ape - 20000000775 sys sys 1016944144 0
-386/bin/ape/basename - 775 sys sys 1048744993 132430
+386/bin/ape/basename - 775 sys sys 1071245280 133877
 386/bin/ape/cc - 775 sys sys 1064598025 68790
 386/bin/ape/cc - 775 sys sys 1064598025 68790
-386/bin/ape/diff - 775 sys sys 1048744994 345866
-386/bin/ape/diff3 - 775 sys sys 1048744996 184572
-386/bin/ape/dirname - 775 sys sys 1048744997 132209
-386/bin/ape/expr - 775 sys sys 1048744998 142002
-386/bin/ape/kill - 775 sys sys 1048744999 137622
-386/bin/ape/make - 775 sys sys 1048745000 205277
-386/bin/ape/patch - 775 sys sys 1048745001 298475
+386/bin/ape/diff - 775 sys sys 1071245281 348833
+386/bin/ape/diff3 - 775 sys sys 1071245282 186855
+386/bin/ape/dirname - 775 sys sys 1071245282 133656
+386/bin/ape/expr - 775 sys sys 1071245283 143297
+386/bin/ape/kill - 775 sys sys 1071245283 139225
+386/bin/ape/make - 775 sys sys 1071245284 207848
+386/bin/ape/patch - 775 sys sys 1071245285 301457
 386/bin/ape/psh - 775 sys sys 1042220689 34
 386/bin/ape/psh - 775 sys sys 1042220689 34
-386/bin/ape/sed - 775 sys sys 1048745002 157596
-386/bin/ape/sh - 775 sys sys 1052191981 476284
+386/bin/ape/sed - 775 sys sys 1071245286 159351
+386/bin/ape/sh - 775 sys sys 1071245287 476439
 386/bin/ape/stty - 775 sys sys 1064598025 41307
 386/bin/ape/stty - 775 sys sys 1064598025 41307
 386/bin/ape/tar - 775 sys sys 1064598026 60163
 386/bin/ape/tar - 775 sys sys 1064598026 60163
-386/bin/ape/uname - 775 sys sys 1048745005 132335
+386/bin/ape/uname - 775 sys sys 1071245288 133706
 386/bin/aquarela - 775 sys sys 1064598027 319170
 386/bin/aquarela - 775 sys sys 1064598027 319170
 386/bin/ar - 775 sys sys 1064598028 113056
 386/bin/ar - 775 sys sys 1064598028 113056
 386/bin/archfs - 775 sys sys 1064598029 142591
 386/bin/archfs - 775 sys sys 1064598029 142591
@@ -61,7 +61,7 @@
 386/bin/auth/disable - 775 sys sys 1020319057 146
 386/bin/auth/disable - 775 sys sys 1020319057 146
 386/bin/auth/enable - 775 sys sys 1020319057 134
 386/bin/auth/enable - 775 sys sys 1020319057 134
 386/bin/auth/factotum - 775 sys sys 1069592358 310160
 386/bin/auth/factotum - 775 sys sys 1069592358 310160
-386/bin/auth/fgui - 775 sys sys 1064598040 212529
+386/bin/auth/fgui - 775 sys sys 1071245288 212496
 386/bin/auth/guard.srv - 775 sys sys 1069592359 141153
 386/bin/auth/guard.srv - 775 sys sys 1069592359 141153
 386/bin/auth/iam - 775 sys sys 1064598041 50807
 386/bin/auth/iam - 775 sys sys 1064598041 50807
 386/bin/auth/keyfs - 775 sys sys 1064598042 116509
 386/bin/auth/keyfs - 775 sys sys 1064598042 116509
@@ -101,7 +101,7 @@
 386/bin/aux/data2s - 775 sys sys 1064598064 58930
 386/bin/aux/data2s - 775 sys sys 1064598064 58930
 386/bin/aux/depend - 775 sys sys 1064598065 146380
 386/bin/aux/depend - 775 sys sys 1064598065 146380
 386/bin/aux/disksim - 775 sys sys 1064598066 145867
 386/bin/aux/disksim - 775 sys sys 1064598066 145867
-386/bin/aux/download - 775 sys sys 1048745014 175067
+386/bin/aux/download - 775 sys sys 1071245289 177517
 386/bin/aux/faxreceive - 775 sys sys 1064598066 83175
 386/bin/aux/faxreceive - 775 sys sys 1064598066 83175
 386/bin/aux/faxsend - 775 sys sys 1064598067 88579
 386/bin/aux/faxsend - 775 sys sys 1064598067 88579
 386/bin/aux/flashfs - 775 sys sys 1064598068 161679
 386/bin/aux/flashfs - 775 sys sys 1064598068 161679
@@ -113,13 +113,13 @@
 386/bin/aux/lines - 775 sys sys 1064598069 58904
 386/bin/aux/lines - 775 sys sys 1064598069 58904
 386/bin/aux/listen - 775 sys sys 1064598070 105547
 386/bin/aux/listen - 775 sys sys 1064598070 105547
 386/bin/aux/listen1 - 775 sys sys 1064598071 91836
 386/bin/aux/listen1 - 775 sys sys 1064598071 91836
-386/bin/aux/lpdaemon - 775 sys sys 1048745018 165127
-386/bin/aux/lpdsend - 775 sys sys 1048745019 153335
+386/bin/aux/lpdaemon - 775 sys sys 1071245290 166954
+386/bin/aux/lpdsend - 775 sys sys 1071245290 155010
 386/bin/aux/lpsend - 775 sys sys 1064598071 52847
 386/bin/aux/lpsend - 775 sys sys 1064598071 52847
 386/bin/aux/mapd - 775 sys sys 1064598072 191386
 386/bin/aux/mapd - 775 sys sys 1064598072 191386
 386/bin/aux/mkflashfs - 775 sys sys 1064598073 65995
 386/bin/aux/mkflashfs - 775 sys sys 1064598073 65995
 386/bin/aux/mklatinkbd - 775 sys sys 1064598073 62613
 386/bin/aux/mklatinkbd - 775 sys sys 1064598073 62613
-386/bin/aux/mnihongo - 775 sys sys 1064598074 136846
+386/bin/aux/mnihongo - 775 sys sys 1071245291 136933
 386/bin/aux/mouse - 775 sys sys 1064598075 44245
 386/bin/aux/mouse - 775 sys sys 1064598075 44245
 386/bin/aux/ms2 - 775 sys sys 1064598075 83805
 386/bin/aux/ms2 - 775 sys sys 1064598075 83805
 386/bin/aux/mswordstrings - 775 sys sys 1064598076 64020
 386/bin/aux/mswordstrings - 775 sys sys 1064598076 64020
@@ -128,23 +128,23 @@
 386/bin/aux/nfsserver - 775 sys sys 1069592360 171438
 386/bin/aux/nfsserver - 775 sys sys 1069592360 171438
 386/bin/aux/olefs - 775 sys sys 1068385795 145454
 386/bin/aux/olefs - 775 sys sys 1068385795 145454
 386/bin/aux/p9bitpost - 775 sys sys 1064598082 127824
 386/bin/aux/p9bitpost - 775 sys sys 1064598082 127824
-386/bin/aux/pcmcia - 775 sys sys 1065397226 46816
+386/bin/aux/pcmcia - 775 sys sys 1071245291 46548
 386/bin/aux/pcnfsd - 775 sys sys 1069592361 127134
 386/bin/aux/pcnfsd - 775 sys sys 1069592361 127134
 386/bin/aux/portmap - 775 sys sys 1064598084 141451
 386/bin/aux/portmap - 775 sys sys 1064598084 141451
 386/bin/aux/portmapper - 775 sys sys 1069592362 126022
 386/bin/aux/portmapper - 775 sys sys 1069592362 126022
-386/bin/aux/postgif - 775 sys sys 1048745022 174648
-386/bin/aux/postprint - 775 sys sys 1048745023 159149
-386/bin/aux/postreverse - 775 sys sys 1048745024 164587
-386/bin/aux/posttek - 775 sys sys 1048745025 162347
+386/bin/aux/postgif - 775 sys sys 1071245292 176711
+386/bin/aux/postprint - 775 sys sys 1071245292 161360
+386/bin/aux/postreverse - 775 sys sys 1071245293 166125
+386/bin/aux/posttek - 775 sys sys 1071245294 164558
 386/bin/aux/rdwr - 775 sys sys 1064598085 38530
 386/bin/aux/rdwr - 775 sys sys 1064598085 38530
 386/bin/aux/reboot - 775 sys sys 1064598085 58802
 386/bin/aux/reboot - 775 sys sys 1064598085 58802
-386/bin/aux/samterm - 775 sys sys 1066572837 245540
+386/bin/aux/samterm - 775 sys sys 1071245295 245329
 386/bin/aux/searchfs - 775 sys sys 1064598087 90729
 386/bin/aux/searchfs - 775 sys sys 1064598087 90729
 386/bin/aux/sprog - 775 sys sys 1064598088 77816
 386/bin/aux/sprog - 775 sys sys 1064598088 77816
 386/bin/aux/ssh_genkey - 775 sys sys 1045537957 194629
 386/bin/aux/ssh_genkey - 775 sys sys 1045537957 194629
 386/bin/aux/sshserve - 775 sys sys 1069592362 251177
 386/bin/aux/sshserve - 775 sys sys 1069592362 251177
 386/bin/aux/stub - 775 sys sys 1064598090 136225
 386/bin/aux/stub - 775 sys sys 1064598090 136225
-386/bin/aux/tcpostio - 775 sys sys 1048745028 196997
+386/bin/aux/tcpostio - 775 sys sys 1071245296 199664
 386/bin/aux/text2post - 775 sys sys 1064598091 77005
 386/bin/aux/text2post - 775 sys sys 1064598091 77005
 386/bin/aux/timesync - 775 sys sys 1064598092 127746
 386/bin/aux/timesync - 775 sys sys 1064598092 127746
 386/bin/aux/tr2post - 775 sys sys 1064598093 175937
 386/bin/aux/tr2post - 775 sys sys 1064598093 175937
@@ -157,17 +157,17 @@
 386/bin/aux/write - 775 sys sys 1038443108 4198
 386/bin/aux/write - 775 sys sys 1038443108 4198
 386/bin/aux/zerotrunc - 775 sys sys 1057551514 58154
 386/bin/aux/zerotrunc - 775 sys sys 1057551514 58154
 386/bin/awd - 775 sys sys 1038443108 5033
 386/bin/awd - 775 sys sys 1038443108 5033
-386/bin/awk - 775 sys sys 1048745031 316908
+386/bin/awk - 775 sys sys 1071245297 320327
 386/bin/basename - 775 sys sys 1064598096 38107
 386/bin/basename - 775 sys sys 1064598096 38107
 386/bin/bc - 775 sys sys 1064598097 80143
 386/bin/bc - 775 sys sys 1064598097 80143
 386/bin/bind - 775 sys sys 1064598097 58057
 386/bin/bind - 775 sys sys 1064598097 58057
 386/bin/bitsy - 20000000775 sys sys 1018721039 0
 386/bin/bitsy - 20000000775 sys sys 1018721039 0
 386/bin/bitsy/bitsyload - 775 sys sys 1064598097 61861
 386/bin/bitsy/bitsyload - 775 sys sys 1064598097 61861
-386/bin/bitsy/keyboard - 775 sys sys 1064598099 302069
+386/bin/bitsy/keyboard - 775 sys sys 1071245298 302036
 386/bin/bitsy/light - 775 sys sys 1020319072 242
 386/bin/bitsy/light - 775 sys sys 1020319072 242
 386/bin/bitsy/params - 775 sys sys 1064598100 57026
 386/bin/bitsy/params - 775 sys sys 1064598100 57026
-386/bin/bitsy/pencal - 775 sys sys 1064598100 115589
-386/bin/bitsy/prompter - 775 sys sys 1064598102 284255
+386/bin/bitsy/pencal - 775 sys sys 1071245299 115667
+386/bin/bitsy/prompter - 775 sys sys 1071245300 284220
 386/bin/bunzip2 - 775 sys sys 1064598103 95833
 386/bin/bunzip2 - 775 sys sys 1064598103 95833
 386/bin/bzip2 - 775 sys sys 1064598103 112422
 386/bin/bzip2 - 775 sys sys 1064598103 112422
 386/bin/cal - 775 sys sys 1064598104 66430
 386/bin/cal - 775 sys sys 1064598104 66430
@@ -179,9 +179,9 @@
 386/bin/chgrp - 775 sys sys 1064598108 58245
 386/bin/chgrp - 775 sys sys 1064598108 58245
 386/bin/chmod - 775 sys sys 1064598108 61489
 386/bin/chmod - 775 sys sys 1064598108 61489
 386/bin/cleanname - 775 sys sys 1064598109 56400
 386/bin/cleanname - 775 sys sys 1064598109 56400
-386/bin/clock - 775 sys sys 1064598110 155647
+386/bin/clock - 775 sys sys 1071245300 155729
 386/bin/cmp - 775 sys sys 1064598110 40864
 386/bin/cmp - 775 sys sys 1064598110 40864
-386/bin/colors - 775 sys sys 1064598111 147821
+386/bin/colors - 775 sys sys 1071245301 147903
 386/bin/comm - 775 sys sys 1064598111 59755
 386/bin/comm - 775 sys sys 1064598111 59755
 386/bin/con - 775 sys sys 1064598112 76255
 386/bin/con - 775 sys sys 1064598112 76255
 386/bin/cp - 775 sys sys 1064598112 62444
 386/bin/cp - 775 sys sys 1064598112 62444
@@ -210,7 +210,7 @@
 386/bin/disk/ksync - 775 sys sys 1020319074 302
 386/bin/disk/ksync - 775 sys sys 1020319074 302
 386/bin/disk/mbr - 775 sys sys 1064598127 73194
 386/bin/disk/mbr - 775 sys sys 1064598127 73194
 386/bin/disk/mk9660 - 775 sys sys 1020319074 144
 386/bin/disk/mk9660 - 775 sys sys 1020319074 144
-386/bin/disk/mkext - 775 sys sys 1070344538 77722
+386/bin/disk/mkext - 775 sys sys 1071245301 77957
 386/bin/disk/mkfs - 775 sys sys 1064598129 87215
 386/bin/disk/mkfs - 775 sys sys 1064598129 87215
 386/bin/disk/mksacfs - 775 sys sys 1020319074 71451
 386/bin/disk/mksacfs - 775 sys sys 1020319074 71451
 386/bin/disk/prep - 775 sys sys 1069592365 99123
 386/bin/disk/prep - 775 sys sys 1069592365 99123
@@ -219,20 +219,20 @@
 386/bin/du - 775 sys sys 1068385799 69180
 386/bin/du - 775 sys sys 1068385799 69180
 386/bin/echo - 775 sys sys 1064598132 55580
 386/bin/echo - 775 sys sys 1064598132 55580
 386/bin/ed - 775 sys sys 1064598133 91839
 386/bin/ed - 775 sys sys 1064598133 91839
-386/bin/eqn - 775 sys sys 1048745036 240244
+386/bin/eqn - 775 sys sys 1071245302 244127
 386/bin/execnet - 775 sys sys 1064598134 173621
 386/bin/execnet - 775 sys sys 1064598134 173621
 386/bin/exportfs - 775 sys sys 1069592365 161581
 386/bin/exportfs - 775 sys sys 1069592365 161581
 386/bin/ext2srv - 775 sys sys 1064598136 176120
 386/bin/ext2srv - 775 sys sys 1064598136 176120
-386/bin/faces - 775 sys sys 1064598137 191011
+386/bin/faces - 775 sys sys 1071245303 191093
 386/bin/factor - 775 sys sys 1064598138 59887
 386/bin/factor - 775 sys sys 1064598138 59887
-386/bin/file - 775 sys sys 1065017417 118088
-386/bin/fmt - 775 sys sys 1070032020 63683
+386/bin/file - 775 sys sys 1071245303 117452
+386/bin/fmt - 775 sys sys 1071245303 63683
 386/bin/fortune - 775 sys sys 1064598140 66084
 386/bin/fortune - 775 sys sys 1064598140 66084
 386/bin/fossil - 20000000775 sys sys 1042005470 0
 386/bin/fossil - 20000000775 sys sys 1042005470 0
 386/bin/fossil/conf - 775 sys sys 1056364255 1497
 386/bin/fossil/conf - 775 sys sys 1056364255 1497
-386/bin/fossil/flchk - 775 sys sys 1070288097 232862
-386/bin/fossil/flfmt - 775 sys sys 1070288098 230827
-386/bin/fossil/fossil - 775 sys sys 1071179084 345532
+386/bin/fossil/flchk - 775 sys sys 1071245304 232757
+386/bin/fossil/flfmt - 775 sys sys 1071245305 230722
+386/bin/fossil/fossil - 775 sys sys 1071245306 345532
 386/bin/freq - 775 sys sys 1064598145 60197
 386/bin/freq - 775 sys sys 1064598145 60197
 386/bin/fs - 20000000775 sys sys 954380769 0
 386/bin/fs - 20000000775 sys sys 954380769 0
 386/bin/fs/32vfs - 775 sys sys 1064598146 95907
 386/bin/fs/32vfs - 775 sys sys 1064598146 95907
@@ -244,15 +244,15 @@
 386/bin/fs/v6fs - 775 sys sys 1064598150 95873
 386/bin/fs/v6fs - 775 sys sys 1064598150 95873
 386/bin/ftpfs - 775 sys sys 1064598151 149205
 386/bin/ftpfs - 775 sys sys 1064598151 149205
 386/bin/getmap - 775 sys sys 1064598152 63430
 386/bin/getmap - 775 sys sys 1064598152 63430
-386/bin/gif - 775 sys sys 1068385799 156607
-386/bin/grap - 775 sys sys 1048745045 275664
+386/bin/gif - 775 sys sys 1071245307 156729
+386/bin/grap - 775 sys sys 1071245308 279167
 386/bin/graph - 775 sys sys 1064598154 127779
 386/bin/graph - 775 sys sys 1064598154 127779
 386/bin/grep - 775 sys sys 1064598154 77644
 386/bin/grep - 775 sys sys 1064598154 77644
-386/bin/gs - 775 sys sys 1064598210 11133912
+386/bin/gs - 775 sys sys 1071245334 11134067
 386/bin/gunzip - 775 sys sys 1064598211 79675
 386/bin/gunzip - 775 sys sys 1064598211 79675
 386/bin/gzip - 775 sys sys 1064598211 83770
 386/bin/gzip - 775 sys sys 1064598211 83770
 386/bin/hayes - 775 sys sys 1064598212 63307
 386/bin/hayes - 775 sys sys 1064598212 63307
-386/bin/hget - 775 sys sys 1070286807 222506
+386/bin/hget - 775 sys sys 1071245335 222506
 386/bin/history - 775 sys sys 1064598214 71890
 386/bin/history - 775 sys sys 1064598214 71890
 386/bin/hoc - 775 sys sys 1064598215 98708
 386/bin/hoc - 775 sys sys 1064598215 98708
 386/bin/html2ms - 775 sys sys 1064598215 64484
 386/bin/html2ms - 775 sys sys 1064598215 64484
@@ -267,7 +267,7 @@
 386/bin/ip/dhcpleases - 775 sys sys 1064598222 84420
 386/bin/ip/dhcpleases - 775 sys sys 1064598222 84420
 386/bin/ip/ftpd - 775 sys sys 1064598223 167454
 386/bin/ip/ftpd - 775 sys sys 1064598223 167454
 386/bin/ip/gizzard - 775 sys sys 1069592366 99449
 386/bin/ip/gizzard - 775 sys sys 1069592366 99449
-386/bin/ip/gping - 775 sys sys 1064598225 180088
+386/bin/ip/gping - 775 sys sys 1071245335 180170
 386/bin/ip/hogports - 775 sys sys 1064598225 43028
 386/bin/ip/hogports - 775 sys sys 1064598225 43028
 386/bin/ip/httpd - 20000000775 sys sys 1016920846 0
 386/bin/ip/httpd - 20000000775 sys sys 1016920846 0
 386/bin/ip/httpd/httpd - 775 sys sys 1064598227 288683
 386/bin/ip/httpd/httpd - 775 sys sys 1064598227 288683
@@ -276,9 +276,9 @@
 386/bin/ip/httpd/netlib_find - 775 sys sys 1068385801 114179
 386/bin/ip/httpd/netlib_find - 775 sys sys 1068385801 114179
 386/bin/ip/httpd/netlib_history - 775 sys sys 1068385801 112809
 386/bin/ip/httpd/netlib_history - 775 sys sys 1068385801 112809
 386/bin/ip/httpd/save - 775 sys sys 1064598231 130742
 386/bin/ip/httpd/save - 775 sys sys 1064598231 130742
-386/bin/ip/httpd/webls - 775 sys sys 1068385802 129726
+386/bin/ip/httpd/webls - 775 sys sys 1071245336 129484
 386/bin/ip/httpd/wikipost - 775 sys sys 1064598232 111102
 386/bin/ip/httpd/wikipost - 775 sys sys 1064598232 111102
-386/bin/ip/imap4d - 775 sys sys 1066317082 237216
+386/bin/ip/imap4d - 775 sys sys 1071245337 236964
 386/bin/ip/ipconfig - 775 sys sys 1069592367 128851
 386/bin/ip/ipconfig - 775 sys sys 1069592367 128851
 386/bin/ip/ping - 775 sys sys 1064598234 74889
 386/bin/ip/ping - 775 sys sys 1064598234 74889
 386/bin/ip/ppp - 775 sys sys 1069592368 217323
 386/bin/ip/ppp - 775 sys sys 1069592368 217323
@@ -294,15 +294,15 @@
 386/bin/ip/traceroute - 775 sys sys 1069592369 70835
 386/bin/ip/traceroute - 775 sys sys 1069592369 70835
 386/bin/ip/udpecho - 775 sys sys 1064598244 43304
 386/bin/ip/udpecho - 775 sys sys 1064598244 43304
 386/bin/join - 775 sys sys 1064598245 114856
 386/bin/join - 775 sys sys 1064598245 114856
-386/bin/jpg - 775 sys sys 1068385803 173300
+386/bin/jpg - 775 sys sys 1071245337 173422
 386/bin/kprof - 775 sys sys 1068717502 101803
 386/bin/kprof - 775 sys sys 1068717502 101803
 386/bin/ktrace - 775 sys sys 1068558079 115884
 386/bin/ktrace - 775 sys sys 1068558079 115884
-386/bin/lens - 775 sys sys 1064598248 122791
+386/bin/lens - 775 sys sys 1071245338 122873
 386/bin/lex - 775 sys sys 1064598249 97280
 386/bin/lex - 775 sys sys 1064598249 97280
 386/bin/lnfs - 775 sys sys 1064598250 100511
 386/bin/lnfs - 775 sys sys 1064598250 100511
 386/bin/look - 775 sys sys 1064598250 64212
 386/bin/look - 775 sys sys 1064598250 64212
 386/bin/ls - 775 sys sys 1064598251 81101
 386/bin/ls - 775 sys sys 1064598251 81101
-386/bin/mc - 775 sys sys 1064598251 129459
+386/bin/mc - 775 sys sys 1071245338 129548
 386/bin/md5sum - 775 sys sys 1064598252 59465
 386/bin/md5sum - 775 sys sys 1064598252 59465
 386/bin/mk - 775 sys sys 1064598253 143638
 386/bin/mk - 775 sys sys 1064598253 143638
 386/bin/mkdir - 775 sys sys 1064598253 57591
 386/bin/mkdir - 775 sys sys 1064598253 57591
@@ -314,7 +314,7 @@
 386/bin/mtime - 775 sys sys 1064598257 57628
 386/bin/mtime - 775 sys sys 1064598257 57628
 386/bin/mv - 775 sys sys 1064598258 64748
 386/bin/mv - 775 sys sys 1064598258 64748
 386/bin/ndb - 20000000775 sys sys 985743147 0
 386/bin/ndb - 20000000775 sys sys 985743147 0
-386/bin/ndb/cs - 775 sys sys 1069766560 144581
+386/bin/ndb/cs - 775 sys sys 1071245339 144581
 386/bin/ndb/csquery - 775 sys sys 1064598259 59890
 386/bin/ndb/csquery - 775 sys sys 1064598259 59890
 386/bin/ndb/dns - 775 sys sys 1070288106 218607
 386/bin/ndb/dns - 775 sys sys 1070288106 218607
 386/bin/ndb/dnsdebug - 775 sys sys 1070288107 190956
 386/bin/ndb/dnsdebug - 775 sys sys 1070288107 190956
@@ -333,22 +333,22 @@
 386/bin/nntpfs - 775 sys sys 1064598272 162969
 386/bin/nntpfs - 775 sys sys 1064598272 162969
 386/bin/ns - 775 sys sys 1064598273 63582
 386/bin/ns - 775 sys sys 1064598273 63582
 386/bin/p - 775 sys sys 1064598274 63537
 386/bin/p - 775 sys sys 1064598274 63537
-386/bin/page - 775 sys sys 1069793956 216396
+386/bin/page - 775 sys sys 1071245340 216518
 386/bin/paqfs - 775 sys sys 1064598276 107830
 386/bin/paqfs - 775 sys sys 1064598276 107830
 386/bin/passwd - 775 sys sys 1069592374 80215
 386/bin/passwd - 775 sys sys 1069592374 80215
 386/bin/pbd - 775 sys sys 1038443175 4663
 386/bin/pbd - 775 sys sys 1038443175 4663
 386/bin/pcc - 775 sys sys 1064598277 66117
 386/bin/pcc - 775 sys sys 1064598277 66117
-386/bin/pic - 775 sys sys 1048745061 300459
+386/bin/pic - 775 sys sys 1071245341 304118
 386/bin/pipefile - 775 sys sys 1064598278 39623
 386/bin/pipefile - 775 sys sys 1064598278 39623
-386/bin/plot - 775 sys sys 1064598279 220038
+386/bin/plot - 775 sys sys 1071245342 220129
 386/bin/plumb - 775 sys sys 1064598279 65223
 386/bin/plumb - 775 sys sys 1064598279 65223
 386/bin/plumber - 775 sys sys 1064598281 170526
 386/bin/plumber - 775 sys sys 1064598281 170526
-386/bin/png - 775 sys sys 1069592374 159884
-386/bin/ppm - 775 sys sys 1068385805 147658
+386/bin/png - 775 sys sys 1071245342 160006
+386/bin/ppm - 775 sys sys 1071245343 147780
 386/bin/pr - 775 sys sys 1064598283 76323
 386/bin/pr - 775 sys sys 1064598283 76323
 386/bin/primes - 775 sys sys 1064598284 39022
 386/bin/primes - 775 sys sys 1064598284 39022
 386/bin/prof - 775 sys sys 1068558090 106673
 386/bin/prof - 775 sys sys 1068558090 106673
-386/bin/proof - 775 sys sys 1064598286 176186
+386/bin/proof - 775 sys sys 1071245344 176279
 386/bin/ps - 775 sys sys 1064598286 64385
 386/bin/ps - 775 sys sys 1064598286 64385
 386/bin/pwd - 775 sys sys 1068385805 37108
 386/bin/pwd - 775 sys sys 1068385805 37108
 386/bin/qc - 775 sys sys 1063639757 291344
 386/bin/qc - 775 sys sys 1063639757 291344
@@ -367,12 +367,12 @@
 386/bin/replica/setupdirs - 775 sys sys 1020319083 44
 386/bin/replica/setupdirs - 775 sys sys 1020319083 44
 386/bin/replica/updatedb - 775 sys sys 1068558250 95126
 386/bin/replica/updatedb - 775 sys sys 1068558250 95126
 386/bin/resample - 775 sys sys 1064598294 120124
 386/bin/resample - 775 sys sys 1064598294 120124
-386/bin/rio - 775 sys sys 1064598297 303363
+386/bin/rio - 775 sys sys 1071245344 303330
 386/bin/rm - 775 sys sys 1064598298 59786
 386/bin/rm - 775 sys sys 1064598298 59786
-386/bin/rtstats - 775 sys sys 1064598300 177851
-386/bin/rx - 775 sys sys 1066572586 79934
+386/bin/rtstats - 775 sys sys 1071245345 177818
+386/bin/rx - 775 sys sys 1071245345 80158
 386/bin/sam - 775 sys sys 1064598302 156664
 386/bin/sam - 775 sys sys 1064598302 156664
-386/bin/scat - 775 sys sys 1064598303 282458
+386/bin/scat - 775 sys sys 1071245346 282545
 386/bin/scp - 775 sys sys 1069592375 151684
 386/bin/scp - 775 sys sys 1069592375 151684
 386/bin/scuzz - 775 sys sys 1064598306 110748
 386/bin/scuzz - 775 sys sys 1064598306 110748
 386/bin/sed - 775 sys sys 1064598306 88194
 386/bin/sed - 775 sys sys 1064598306 88194
@@ -385,14 +385,14 @@
 386/bin/sniffer - 775 sys sys 1038443185 99028
 386/bin/sniffer - 775 sys sys 1038443185 99028
 386/bin/snoopy - 775 sys sys 1068385806 153816
 386/bin/snoopy - 775 sys sys 1068385806 153816
 386/bin/sort - 775 sys sys 1064598313 81046
 386/bin/sort - 775 sys sys 1064598313 81046
-386/bin/spin - 775 sys sys 1048745068 649685
+386/bin/spin - 775 sys sys 1071245348 654328
 386/bin/split - 775 sys sys 1064598314 74007
 386/bin/split - 775 sys sys 1064598314 74007
-386/bin/srv - 775 sys sys 1065915883 80817
+386/bin/srv - 775 sys sys 1071245348 80563
 386/bin/srvfs - 775 sys sys 1069592375 39735
 386/bin/srvfs - 775 sys sys 1069592375 39735
 386/bin/srvold9p - 775 sys sys 1064598316 130962
 386/bin/srvold9p - 775 sys sys 1064598316 130962
-386/bin/ssh - 775 sys sys 1069592376 210500
-386/bin/sshnet - 775 sys sys 1069592376 284820
-386/bin/stats - 775 sys sys 1067278459 188751
+386/bin/ssh - 775 sys sys 1071245349 210501
+386/bin/sshnet - 775 sys sys 1071245354 284821
+386/bin/stats - 775 sys sys 1071245355 188617
 386/bin/strings - 775 sys sys 1064598320 60633
 386/bin/strings - 775 sys sys 1064598320 60633
 386/bin/strip - 775 sys sys 1064598321 60583
 386/bin/strip - 775 sys sys 1064598321 60583
 386/bin/sum - 775 sys sys 1064598321 40087
 386/bin/sum - 775 sys sys 1064598321 40087
@@ -405,19 +405,19 @@
 386/bin/tee - 775 sys sys 1064598326 38656
 386/bin/tee - 775 sys sys 1064598326 38656
 386/bin/telco - 775 sys sys 1064598327 104810
 386/bin/telco - 775 sys sys 1064598327 104810
 386/bin/telnet - 775 sys sys 1064598327 80561
 386/bin/telnet - 775 sys sys 1064598327 80561
-386/bin/test - 775 sys sys 1070459150 68512
+386/bin/test - 775 sys sys 1071245355 68512
 386/bin/time - 775 sys sys 1064598328 59564
 386/bin/time - 775 sys sys 1064598328 59564
 386/bin/tlsclient - 775 sys sys 1064598330 196114
 386/bin/tlsclient - 775 sys sys 1064598330 196114
 386/bin/tlssrv - 775 sys sys 1064598331 196448
 386/bin/tlssrv - 775 sys sys 1064598331 196448
-386/bin/togif - 775 sys sys 1068385807 189563
+386/bin/togif - 775 sys sys 1071245356 189681
 386/bin/topng - 775 sys sys 1068717504 137683
 386/bin/topng - 775 sys sys 1068717504 137683
-386/bin/toppm - 775 sys sys 1064598335 164939
+386/bin/toppm - 775 sys sys 1071245357 165019
 386/bin/touch - 775 sys sys 1064598335 62963
 386/bin/touch - 775 sys sys 1064598335 62963
 386/bin/tprof - 775 sys sys 1068558117 275057
 386/bin/tprof - 775 sys sys 1068558117 275057
 386/bin/tr - 775 sys sys 1064598338 60290
 386/bin/tr - 775 sys sys 1064598338 60290
-386/bin/troff - 775 sys sys 1048745077 352988
+386/bin/troff - 775 sys sys 1071245358 356719
 386/bin/troff2html - 775 sys sys 1064598338 80782
 386/bin/troff2html - 775 sys sys 1064598338 80782
-386/bin/tweak - 775 sys sys 1064598340 190754
+386/bin/tweak - 775 sys sys 1071245359 190836
 386/bin/unicode - 775 sys sys 1064598340 60845
 386/bin/unicode - 775 sys sys 1064598340 60845
 386/bin/uniq - 775 sys sys 1064598341 60310
 386/bin/uniq - 775 sys sys 1064598341 60310
 386/bin/units - 775 sys sys 1064598342 73631
 386/bin/units - 775 sys sys 1064598342 73631
@@ -425,28 +425,28 @@
 386/bin/unzip - 775 sys sys 1064598342 89863
 386/bin/unzip - 775 sys sys 1064598342 89863
 386/bin/upas - 20000000775 sys sys 1016857390 0
 386/bin/upas - 20000000775 sys sys 1016857390 0
 386/bin/upas/addhash - 775 sys sys 1064598343 67859
 386/bin/upas/addhash - 775 sys sys 1064598343 67859
-386/bin/upas/aliasmail - 775 sys sys 1069592377 101729
+386/bin/upas/aliasmail - 775 sys sys 1071245360 101743
 386/bin/upas/bayes - 775 sys sys 1064598344 70530
 386/bin/upas/bayes - 775 sys sys 1064598344 70530
-386/bin/upas/deliver - 775 sys sys 1069592377 98260
-386/bin/upas/filter - 775 sys sys 1069592378 146338
-386/bin/upas/fs - 775 sys sys 1069592379 334751
+386/bin/upas/deliver - 775 sys sys 1071245360 98274
+386/bin/upas/filter - 775 sys sys 1071245361 146352
+386/bin/upas/fs - 775 sys sys 1071245362 334765
 386/bin/upas/isspam - 775 sys sys 1064598349 38
 386/bin/upas/isspam - 775 sys sys 1064598349 38
 386/bin/upas/list - 775 sys sys 1064598349 81216
 386/bin/upas/list - 775 sys sys 1064598349 81216
-386/bin/upas/marshal - 775 sys sys 1069592379 129517
-386/bin/upas/ml - 775 sys sys 1069592380 120497
-386/bin/upas/mlmgr - 775 sys sys 1069592380 101095
+386/bin/upas/marshal - 775 sys sys 1071245362 129531
+386/bin/upas/ml - 775 sys sys 1071245363 120511
+386/bin/upas/mlmgr - 775 sys sys 1071245363 101109
 386/bin/upas/mlowner - 775 sys sys 1064598353 90150
 386/bin/upas/mlowner - 775 sys sys 1064598353 90150
 386/bin/upas/msgcat - 775 sys sys 1064598353 38
 386/bin/upas/msgcat - 775 sys sys 1064598353 38
 386/bin/upas/msgtok - 775 sys sys 1064598354 75149
 386/bin/upas/msgtok - 775 sys sys 1064598354 75149
-386/bin/upas/nedmail - 775 sys sys 1069592381 150197
-386/bin/upas/pop3 - 775 sys sys 1069592381 257694
-386/bin/upas/qer - 775 sys sys 1069592382 98641
-386/bin/upas/ratfs - 775 sys sys 1064598359 112146
-386/bin/upas/runq - 775 sys sys 1069592382 111455
-386/bin/upas/scanmail - 775 sys sys 1069592383 127740
-386/bin/upas/send - 775 sys sys 1069592383 190498
-386/bin/upas/smtp - 775 sys sys 1069592384 271115
-386/bin/upas/smtpd - 775 sys sys 1069592385 320515
+386/bin/upas/nedmail - 775 sys sys 1071245364 150211
+386/bin/upas/pop3 - 775 sys sys 1071245365 257708
+386/bin/upas/qer - 775 sys sys 1071245365 98655
+386/bin/upas/ratfs - 775 sys sys 1071245366 112106
+386/bin/upas/runq - 775 sys sys 1071245366 111469
+386/bin/upas/scanmail - 775 sys sys 1071245367 127754
+386/bin/upas/send - 775 sys sys 1071245368 190512
+386/bin/upas/smtp - 775 sys sys 1071245369 271129
+386/bin/upas/smtpd - 775 sys sys 1071245370 320529
 386/bin/upas/spam - 775 sys sys 1064598366 36
 386/bin/upas/spam - 775 sys sys 1064598366 36
 386/bin/upas/testscan - 775 sys sys 1064598366 82161
 386/bin/upas/testscan - 775 sys sys 1064598366 82161
 386/bin/upas/token - 775 sys sys 1064598367 75930
 386/bin/upas/token - 775 sys sys 1064598367 75930
@@ -478,20 +478,20 @@
 386/bin/venti/wrarena - 775 sys sys 1068558267 182318
 386/bin/venti/wrarena - 775 sys sys 1068558267 182318
 386/bin/venti/write - 775 sys sys 1064598391 100783
 386/bin/venti/write - 775 sys sys 1064598391 100783
 386/bin/vncs - 775 sys sys 1064598394 442530
 386/bin/vncs - 775 sys sys 1064598394 442530
-386/bin/vncv - 775 sys sys 1064598395 270632
-386/bin/vt - 775 sys sys 1064598396 171298
+386/bin/vncv - 775 sys sys 1071245371 271560
+386/bin/vt - 775 sys sys 1071245372 171391
 386/bin/vtdump - 775 sys sys 1064598398 161142
 386/bin/vtdump - 775 sys sys 1064598398 161142
 386/bin/wc - 775 sys sys 1064598399 42148
 386/bin/wc - 775 sys sys 1064598399 42148
 386/bin/webcookies - 775 sys sys 1068558171 162995
 386/bin/webcookies - 775 sys sys 1068558171 162995
 386/bin/webfs - 775 sys sys 1068558224 352388
 386/bin/webfs - 775 sys sys 1068558224 352388
 386/bin/webfsget - 775 sys sys 1068558178 39356
 386/bin/webfsget - 775 sys sys 1068558178 39356
 386/bin/wikifs - 775 sys sys 1064598403 197449
 386/bin/wikifs - 775 sys sys 1064598403 197449
-386/bin/winwatch - 775 sys sys 1064598404 141476
+386/bin/winwatch - 775 sys sys 1071245372 141560
 386/bin/xd - 775 sys sys 1064598404 62556
 386/bin/xd - 775 sys sys 1064598404 62556
 386/bin/xmr - 775 sys sys 1064598405 40384
 386/bin/xmr - 775 sys sys 1064598405 40384
 386/bin/xms - 775 sys sys 1064598405 40965
 386/bin/xms - 775 sys sys 1064598405 40965
 386/bin/yacc - 775 sys sys 1064598406 100603
 386/bin/yacc - 775 sys sys 1064598406 100603
-386/bin/yuv - 775 sys sys 1068385813 148206
+386/bin/yuv - 775 sys sys 1071245373 148328
 386/bin/zip - 775 sys sys 1064598407 89069
 386/bin/zip - 775 sys sys 1064598407 89069
 386/include - 20000000775 sys sys 953243048 0
 386/include - 20000000775 sys sys 953243048 0
 386/include/ape - 20000000775 sys sys 944946041 0
 386/include/ape - 20000000775 sys sys 944946041 0
@@ -506,9 +506,9 @@
 386/lib - 20000000775 sys sys 1016826328 0
 386/lib - 20000000775 sys sys 1016826328 0
 386/lib/ape - 20000000775 sys sys 944969312 0
 386/lib/ape - 20000000775 sys sys 944969312 0
 386/lib/ape/lib9.a - 664 sys sys 1038237538 6378
 386/lib/ape/lib9.a - 664 sys sys 1038237538 6378
-386/lib/ape/libap.a - 664 sys sys 1070342464 810262
+386/lib/ape/libap.a - 664 sys sys 1071245376 815548
 386/lib/ape/libbsd.a - 664 sys sys 1070342465 179718
 386/lib/ape/libbsd.a - 664 sys sys 1070342465 179718
-386/lib/ape/libdraw.a - 664 sys sys 1070519111 574426
+386/lib/ape/libdraw.a - 664 sys sys 1071245377 574556
 386/lib/ape/libfmt.a - 664 sys sys 1070519112 148600
 386/lib/ape/libfmt.a - 664 sys sys 1070519112 148600
 386/lib/ape/libl.a - 664 sys sys 1068558290 9450
 386/lib/ape/libl.a - 664 sys sys 1068558290 9450
 386/lib/ape/libnet.a - 664 sys sys 1068558291 16996
 386/lib/ape/libnet.a - 664 sys sys 1068558291 16996
@@ -524,7 +524,7 @@
 386/lib/libc.a - 664 sys sys 1068385836 506616
 386/lib/libc.a - 664 sys sys 1068385836 506616
 386/lib/libcontrol.a - 664 sys sys 1068385837 243448
 386/lib/libcontrol.a - 664 sys sys 1068385837 243448
 386/lib/libdisk.a - 664 sys sys 1068385837 43692
 386/lib/libdisk.a - 664 sys sys 1068385837 43692
-386/lib/libdraw.a - 664 sys sys 1070519127 372960
+386/lib/libdraw.a - 664 sys sys 1071245378 373032
 386/lib/libflate.a - 664 sys sys 1068385839 77880
 386/lib/libflate.a - 664 sys sys 1068385839 77880
 386/lib/libframe.a - 664 sys sys 1068385839 65832
 386/lib/libframe.a - 664 sys sys 1068385839 65832
 386/lib/libgeometry.a - 664 sys sys 1068385839 50806
 386/lib/libgeometry.a - 664 sys sys 1068385839 50806
@@ -3309,7 +3309,7 @@ sys/doc/venti/venti.pdf - 755 sys sys 1020384352 139090
 sys/doc/venti/venti.ps - 664 sys sys 1019852320 2012620
 sys/doc/venti/venti.ps - 664 sys sys 1019852320 2012620
 sys/games - 20000000775 sys sys 952648872 0
 sys/games - 20000000775 sys sys 952648872 0
 sys/games/lib - 20000000775 sys sys 952648879 0
 sys/games/lib - 20000000775 sys sys 952648879 0
-sys/games/lib/fortunes - 664 sys sys 1070982320 246889
+sys/games/lib/fortunes - 664 sys sys 1071247330 247127
 sys/include - 20000000775 sys sys 1016902416 0
 sys/include - 20000000775 sys sys 1016902416 0
 sys/include/9p.h - 664 sys sys 1044836327 4309
 sys/include/9p.h - 664 sys sys 1044836327 4309
 sys/include/String.h - 664 sys sys 1055701304 1291
 sys/include/String.h - 664 sys sys 1055701304 1291
@@ -4661,7 +4661,7 @@ sys/man/1/news - 664 sys sys 1015024739 1148
 sys/man/1/nm - 664 sys sys 944959673 1539
 sys/man/1/nm - 664 sys sys 944959673 1539
 sys/man/1/ns - 664 sys sys 944959677 893
 sys/man/1/ns - 664 sys sys 944959677 893
 sys/man/1/p - 664 sys sys 944959673 504
 sys/man/1/p - 664 sys sys 944959673 504
-sys/man/1/page - 664 sys sys 969499885 4870
+sys/man/1/page - 664 sys sys 1071247418 4870
 sys/man/1/passwd - 664 sys sys 1068823217 1377
 sys/man/1/passwd - 664 sys sys 1068823217 1377
 sys/man/1/patch - 664 sys sys 1067804449 2176
 sys/man/1/patch - 664 sys sys 1067804449 2176
 sys/man/1/pcc - 664 sys sys 1015024740 3478
 sys/man/1/pcc - 664 sys sys 1015024740 3478
@@ -4767,7 +4767,7 @@ sys/man/2/draw - 664 sys sys 1059484405 19362
 sys/man/2/dsa - 664 sys sys 1027629169 2072
 sys/man/2/dsa - 664 sys sys 1027629169 2072
 sys/man/2/dup - 664 sys sys 950593489 827
 sys/man/2/dup - 664 sys sys 950593489 827
 sys/man/2/elgamal - 664 sys sys 1027629189 2152
 sys/man/2/elgamal - 664 sys sys 1027629189 2152
-sys/man/2/encode - 664 sys sys 1015701030 1498
+sys/man/2/encode - 664 sys sys 1071289168 1572
 sys/man/2/encrypt - 664 sys sys 951229670 1885
 sys/man/2/encrypt - 664 sys sys 951229670 1885
 sys/man/2/errstr - 664 sys sys 1015091519 1518
 sys/man/2/errstr - 664 sys sys 1015091519 1518
 sys/man/2/event - 664 sys sys 1015091520 7512
 sys/man/2/event - 664 sys sys 1015091520 7512
@@ -4815,7 +4815,7 @@ sys/man/2/memlayer - 664 sys sys 1040484074 6963
 sys/man/2/memory - 664 sys sys 944959694 2139
 sys/man/2/memory - 664 sys sys 944959694 2139
 sys/man/2/mktemp - 664 sys sys 950892862 669
 sys/man/2/mktemp - 664 sys sys 950892862 669
 sys/man/2/mouse - 664 sys sys 971455512 4966
 sys/man/2/mouse - 664 sys sys 971455512 4966
-sys/man/2/mp - 664 sys sys 1027253880 10580
+sys/man/2/mp - 664 sys sys 1071238964 10690
 sys/man/2/muldiv - 664 sys sys 984709633 639
 sys/man/2/muldiv - 664 sys sys 984709633 639
 sys/man/2/nan - 664 sys sys 975084242 937
 sys/man/2/nan - 664 sys sys 975084242 937
 sys/man/2/ndb - 664 sys sys 1050078464 7686
 sys/man/2/ndb - 664 sys sys 1050078464 7686
@@ -5030,7 +5030,7 @@ sys/man/8/kfscmd - 664 sys sys 1068569797 4515
 sys/man/8/listen - 664 sys sys 1045501609 3740
 sys/man/8/listen - 664 sys sys 1045501609 3740
 sys/man/8/lp - 664 sys sys 954614702 2491
 sys/man/8/lp - 664 sys sys 954614702 2491
 sys/man/8/mk9660 - 664 sys sys 1045501618 3940
 sys/man/8/mk9660 - 664 sys sys 1045501618 3940
-sys/man/8/mkfs - 664 sys sys 1015024985 3492
+sys/man/8/mkfs - 664 sys sys 1071245592 3420
 sys/man/8/mkpaqfs - 664 sys sys 1018386778 892
 sys/man/8/mkpaqfs - 664 sys sys 1018386778 892
 sys/man/8/mksacfs - 664 sys sys 964886843 710
 sys/man/8/mksacfs - 664 sys sys 964886843 710
 sys/man/8/mouse - 664 sys sys 971455511 2476
 sys/man/8/mouse - 664 sys sys 971455511 2476
@@ -5087,7 +5087,7 @@ sys/src/9/alphapc/axp.h - 664 sys sys 1015012783 1090
 sys/src/9/alphapc/cga.c - 664 sys sys 1015012783 1814
 sys/src/9/alphapc/cga.c - 664 sys sys 1015012783 1814
 sys/src/9/alphapc/clock.c - 664 sys sys 1032052963 1472
 sys/src/9/alphapc/clock.c - 664 sys sys 1032052963 1472
 sys/src/9/alphapc/cycintr.c - 664 sys sys 1018721238 230
 sys/src/9/alphapc/cycintr.c - 664 sys sys 1018721238 230
-sys/src/9/alphapc/dat.h - 664 sys sys 1067722581 5162
+sys/src/9/alphapc/dat.h - 664 sys sys 1071245535 5215
 sys/src/9/alphapc/devarch.c - 664 sys sys 1039753422 9760
 sys/src/9/alphapc/devarch.c - 664 sys sys 1039753422 9760
 sys/src/9/alphapc/devether.c - 664 sys sys 1055701009 28
 sys/src/9/alphapc/devether.c - 664 sys sys 1055701009 28
 sys/src/9/alphapc/devfloppy.c - 664 sys sys 1015012784 29
 sys/src/9/alphapc/devfloppy.c - 664 sys sys 1015012784 29
@@ -5109,7 +5109,7 @@ sys/src/9/alphapc/main.c - 664 sys sys 1039753420 13626
 sys/src/9/alphapc/mem.h - 664 sys sys 1017166326 3132
 sys/src/9/alphapc/mem.h - 664 sys sys 1017166326 3132
 sys/src/9/alphapc/memmove.s - 664 sys sys 1015012786 2936
 sys/src/9/alphapc/memmove.s - 664 sys sys 1015012786 2936
 sys/src/9/alphapc/memset.s - 664 sys sys 1015012786 844
 sys/src/9/alphapc/memset.s - 664 sys sys 1015012786 844
-sys/src/9/alphapc/mkfile - 664 sys sys 1067722619 2030
+sys/src/9/alphapc/mkfile - 664 sys sys 1071245505 2014
 sys/src/9/alphapc/mmu.c - 664 sys sys 1015012786 4872
 sys/src/9/alphapc/mmu.c - 664 sys sys 1015012786 4872
 sys/src/9/alphapc/mouse.c - 664 sys sys 1015012786 25
 sys/src/9/alphapc/mouse.c - 664 sys sys 1015012786 25
 sys/src/9/alphapc/pci.c - 664 sys sys 1039753420 7868
 sys/src/9/alphapc/pci.c - 664 sys sys 1039753420 7868
@@ -5133,16 +5133,16 @@ sys/src/9/bitsy/Booting101 - 664 sys sys 1054798506 8841
 sys/src/9/bitsy/bitsy - 664 sys sys 1067722592 424
 sys/src/9/bitsy/bitsy - 664 sys sys 1067722592 424
 sys/src/9/bitsy/bitsyreset.s - 664 sys sys 1017695510 2352
 sys/src/9/bitsy/bitsyreset.s - 664 sys sys 1017695510 2352
 sys/src/9/bitsy/clock.c - 664 sys sys 1037028998 4835
 sys/src/9/bitsy/clock.c - 664 sys sys 1037028998 4835
-sys/src/9/bitsy/dat.h - 664 sys sys 1067722592 5739
+sys/src/9/bitsy/dat.h - 664 sys sys 1071245535 5792
 sys/src/9/bitsy/defont.c - 664 sys sys 1017695511 21570
 sys/src/9/bitsy/defont.c - 664 sys sys 1017695511 21570
 sys/src/9/bitsy/devether.c - 664 sys sys 1037029002 10675
 sys/src/9/bitsy/devether.c - 664 sys sys 1037029002 10675
 sys/src/9/bitsy/devflash.c - 664 sys sys 1018386999 16832
 sys/src/9/bitsy/devflash.c - 664 sys sys 1018386999 16832
-sys/src/9/bitsy/devpcmcia.c - 664 sys sys 1037029005 12962
+sys/src/9/bitsy/devpcmcia.c - 664 sys sys 1071245513 12963
 sys/src/9/bitsy/devpenmouse.c - 664 sys sys 1067722592 9296
 sys/src/9/bitsy/devpenmouse.c - 664 sys sys 1067722592 9296
-sys/src/9/bitsy/devuda1341.c - 664 sys sys 1037029011 30326
+sys/src/9/bitsy/devuda1341.c - 664 sys sys 1071245420 30346
 sys/src/9/bitsy/devµc.c - 664 sys sys 1068393562 8125
 sys/src/9/bitsy/devµc.c - 664 sys sys 1068393562 8125
 sys/src/9/bitsy/etherif.h - 664 sys sys 1045501788 913
 sys/src/9/bitsy/etherif.h - 664 sys sys 1045501788 913
-sys/src/9/bitsy/etherwavelan.c - 664 sys sys 1037029016 869
+sys/src/9/bitsy/etherwavelan.c - 664 sys sys 1071245513 870
 sys/src/9/bitsy/fns.h - 664 sys sys 1067722591 3366
 sys/src/9/bitsy/fns.h - 664 sys sys 1067722591 3366
 sys/src/9/bitsy/fpi.c - 664 sys sys 1017695513 5248
 sys/src/9/bitsy/fpi.c - 664 sys sys 1017695513 5248
 sys/src/9/bitsy/fpi.h - 664 sys sys 1017695513 1679
 sys/src/9/bitsy/fpi.h - 664 sys sys 1017695513 1679
@@ -5156,7 +5156,7 @@ sys/src/9/bitsy/l.s - 664 sys sys 1055700934 18211
 sys/src/9/bitsy/main.c - 664 sys sys 1067722593 9083
 sys/src/9/bitsy/main.c - 664 sys sys 1067722593 9083
 sys/src/9/bitsy/map - 664 sys sys 1017695515 236
 sys/src/9/bitsy/map - 664 sys sys 1017695515 236
 sys/src/9/bitsy/mem.h - 664 sys sys 1055700932 8049
 sys/src/9/bitsy/mem.h - 664 sys sys 1055700932 8049
-sys/src/9/bitsy/mkfile - 664 sys sys 1067718907 2466
+sys/src/9/bitsy/mkfile - 664 sys sys 1071245512 2450
 sys/src/9/bitsy/mmu.c - 664 sys sys 1055700931 11228
 sys/src/9/bitsy/mmu.c - 664 sys sys 1055700931 11228
 sys/src/9/bitsy/mouse.c - 664 sys sys 1017695516 962
 sys/src/9/bitsy/mouse.c - 664 sys sys 1017695516 962
 sys/src/9/bitsy/paqfiles - 20000000775 sys sys 1020011250 0
 sys/src/9/bitsy/paqfiles - 20000000775 sys sys 1020011250 0
@@ -5233,9 +5233,9 @@ sys/src/9/mkfile - 664 sys sys 1063857477 205
 sys/src/9/mtx - 20000000775 sys sys 1018721288 0
 sys/src/9/mtx - 20000000775 sys sys 1018721288 0
 sys/src/9/mtx/clock.c - 664 sys sys 1032053278 1293
 sys/src/9/mtx/clock.c - 664 sys sys 1032053278 1293
 sys/src/9/mtx/cycintr.c - 664 sys sys 1018721285 230
 sys/src/9/mtx/cycintr.c - 664 sys sys 1018721285 230
-sys/src/9/mtx/dat.h - 664 sys sys 1067722599 3798
+sys/src/9/mtx/dat.h - 664 sys sys 1071245548 3849
 sys/src/9/mtx/devarch.c - 664 sys sys 1018721285 6793
 sys/src/9/mtx/devarch.c - 664 sys sys 1018721285 6793
-sys/src/9/mtx/devether.c - 664 sys sys 1048644013 9279
+sys/src/9/mtx/devether.c - 664 sys sys 1071245412 9281
 sys/src/9/mtx/devrtc.c - 664 sys sys 1018721285 6772
 sys/src/9/mtx/devrtc.c - 664 sys sys 1018721285 6772
 sys/src/9/mtx/ether2114x.c - 664 sys sys 1026848191 37904
 sys/src/9/mtx/ether2114x.c - 664 sys sys 1026848191 37904
 sys/src/9/mtx/etherif.h - 664 sys sys 1045504432 785
 sys/src/9/mtx/etherif.h - 664 sys sys 1045504432 785
@@ -5248,7 +5248,7 @@ sys/src/9/mtx/kbd.c - 664 sys sys 1018721286 8358
 sys/src/9/mtx/l.s - 664 sys sys 1067722599 10730
 sys/src/9/mtx/l.s - 664 sys sys 1067722599 10730
 sys/src/9/mtx/main.c - 664 sys sys 1018721287 8344
 sys/src/9/mtx/main.c - 664 sys sys 1018721287 8344
 sys/src/9/mtx/mem.h - 664 sys sys 1026848200 5959
 sys/src/9/mtx/mem.h - 664 sys sys 1026848200 5959
-sys/src/9/mtx/mkfile - 664 sys sys 1067722598 1520
+sys/src/9/mtx/mkfile - 664 sys sys 1071245412 1504
 sys/src/9/mtx/mmu.c - 664 sys sys 1018721287 4388
 sys/src/9/mtx/mmu.c - 664 sys sys 1018721287 4388
 sys/src/9/mtx/mtx - 664 sys sys 1056336297 416
 sys/src/9/mtx/mtx - 664 sys sys 1056336297 416
 sys/src/9/mtx/mtxcpu - 664 sys sys 1039753442 421
 sys/src/9/mtx/mtxcpu - 664 sys sys 1039753442 421
@@ -5266,7 +5266,7 @@ sys/src/9/pc/apmjump.s - 664 sys sys 1032058947 1527
 sys/src/9/pc/archmp.c - 664 sys sys 1067722683 2323
 sys/src/9/pc/archmp.c - 664 sys sys 1067722683 2323
 sys/src/9/pc/audio.h - 664 sys sys 1015014513 343
 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/cga.c - 664 sys sys 1015014513 1843
-sys/src/9/pc/dat.h - 664 sys sys 1068393384 6124
+sys/src/9/pc/dat.h - 664 sys sys 1071245548 6177
 sys/src/9/pc/devarch.c - 664 sys sys 1068466702 17542
 sys/src/9/pc/devarch.c - 664 sys sys 1068466702 17542
 sys/src/9/pc/devether.c - 664 sys sys 1048644042 10178
 sys/src/9/pc/devether.c - 664 sys sys 1048644042 10178
 sys/src/9/pc/devfloppy.c - 664 sys sys 1055689885 20024
 sys/src/9/pc/devfloppy.c - 664 sys sys 1055689885 20024
@@ -5275,39 +5275,39 @@ sys/src/9/pc/devlm78.c - 664 sys sys 1026847635 6038
 sys/src/9/pc/devlml.c - 664 sys sys 1026847636 7486
 sys/src/9/pc/devlml.c - 664 sys sys 1026847636 7486
 sys/src/9/pc/devlml.h - 664 sys sys 1026847636 2948
 sys/src/9/pc/devlml.h - 664 sys sys 1026847636 2948
 sys/src/9/pc/devlpt.c - 664 sys sys 1015014514 4420
 sys/src/9/pc/devlpt.c - 664 sys sys 1015014514 4420
-sys/src/9/pc/devpccard.c - 664 sys sys 1065717606 39976
+sys/src/9/pc/devpccard.c - 664 sys sys 1071245415 40055
 sys/src/9/pc/devrtc.c - 664 sys sys 1015014515 7167
 sys/src/9/pc/devrtc.c - 664 sys sys 1015014515 7167
-sys/src/9/pc/devtv.c - 664 sys sys 1032052915 45652
+sys/src/9/pc/devtv.c - 664 sys sys 1071245470 45750
 sys/src/9/pc/devusb.c - 664 sys sys 1063857423 18352
 sys/src/9/pc/devusb.c - 664 sys sys 1063857423 18352
 sys/src/9/pc/devvga.c - 664 sys sys 1063857412 8714
 sys/src/9/pc/devvga.c - 664 sys sys 1063857412 8714
 sys/src/9/pc/dma.c - 664 sys sys 1015014515 4736
 sys/src/9/pc/dma.c - 664 sys sys 1015014515 4736
 sys/src/9/pc/ether2000.c - 664 sys sys 1017854323 2839
 sys/src/9/pc/ether2000.c - 664 sys sys 1017854323 2839
 sys/src/9/pc/ether2114x.c - 664 sys sys 1067891102 41253
 sys/src/9/pc/ether2114x.c - 664 sys sys 1067891102 41253
 sys/src/9/pc/ether589.c - 664 sys sys 1015014516 4644
 sys/src/9/pc/ether589.c - 664 sys sys 1015014516 4644
-sys/src/9/pc/ether79c970.c - 664 sys sys 1018386992 14056
+sys/src/9/pc/ether79c970.c - 664 sys sys 1071245466 14094
 sys/src/9/pc/ether8003.c - 664 sys sys 1015014516 6665
 sys/src/9/pc/ether8003.c - 664 sys sys 1015014516 6665
-sys/src/9/pc/ether8139.c - 664 sys sys 1055689886 18012
+sys/src/9/pc/ether8139.c - 664 sys sys 1071245462 18026
 sys/src/9/pc/ether82543gc.c - 664 sys sys 1055689887 32296
 sys/src/9/pc/ether82543gc.c - 664 sys sys 1055689887 32296
 sys/src/9/pc/ether82557.c - 664 sys sys 1066514925 29683
 sys/src/9/pc/ether82557.c - 664 sys sys 1066514925 29683
 sys/src/9/pc/ether83815.c - 664 sys sys 1026847640 23050
 sys/src/9/pc/ether83815.c - 664 sys sys 1026847640 23050
-sys/src/9/pc/ether8390.c - 664 sys sys 1067722623 17541
+sys/src/9/pc/ether8390.c - 664 sys sys 1071245462 17557
 sys/src/9/pc/ether8390.h - 664 sys sys 1015014517 1511
 sys/src/9/pc/ether8390.h - 664 sys sys 1015014517 1511
 sys/src/9/pc/etherec2t.c - 664 sys sys 1020284820 4038
 sys/src/9/pc/etherec2t.c - 664 sys sys 1020284820 4038
 sys/src/9/pc/etherelnk3.c - 664 sys sys 1063857363 48522
 sys/src/9/pc/etherelnk3.c - 664 sys sys 1063857363 48522
 sys/src/9/pc/etherga620.c - 664 sys sys 1067723192 28788
 sys/src/9/pc/etherga620.c - 664 sys sys 1067723192 28788
 sys/src/9/pc/etherga620fw.h - 644 sys sys 1026847642 222295
 sys/src/9/pc/etherga620fw.h - 644 sys sys 1026847642 222295
 sys/src/9/pc/etherif.h - 664 sys sys 1045063564 961
 sys/src/9/pc/etherif.h - 664 sys sys 1045063564 961
-sys/src/9/pc/etherigbe.c - 664 sys sys 1067792708 42430
+sys/src/9/pc/etherigbe.c - 664 sys sys 1071245461 42444
 sys/src/9/pc/ethermii.c - 664 sys sys 1039803177 4555
 sys/src/9/pc/ethermii.c - 664 sys sys 1039803177 4555
 sys/src/9/pc/ethermii.h - 664 sys sys 1039895684 3259
 sys/src/9/pc/ethermii.h - 664 sys sys 1039895684 3259
 sys/src/9/pc/etherrhine.c - 664 sys sys 1068244865 13437
 sys/src/9/pc/etherrhine.c - 664 sys sys 1068244865 13437
 sys/src/9/pc/ethersink.c - 664 sys sys 1048644103 1076
 sys/src/9/pc/ethersink.c - 664 sys sys 1048644103 1076
-sys/src/9/pc/ethersmc.c - 664 sys sys 1015014518 15079
+sys/src/9/pc/ethersmc.c - 664 sys sys 1071245461 15103
 sys/src/9/pc/etherwavelan.c - 664 sys sys 1026847642 3722
 sys/src/9/pc/etherwavelan.c - 664 sys sys 1026847642 3722
 sys/src/9/pc/floppy.h - 664 sys sys 1055700609 3835
 sys/src/9/pc/floppy.h - 664 sys sys 1055700609 3835
 sys/src/9/pc/fns.h - 664 sys sys 1068393346 4299
 sys/src/9/pc/fns.h - 664 sys sys 1068393346 4299
 sys/src/9/pc/hcwAMC.h - 664 sys sys 1026860163 166004
 sys/src/9/pc/hcwAMC.h - 664 sys sys 1026860163 166004
-sys/src/9/pc/i8253.c - 664 sys sys 1067722684 6217
+sys/src/9/pc/i8253.c - 664 sys sys 1071245560 6251
 sys/src/9/pc/i8259.c - 664 sys sys 1015014519 4423
 sys/src/9/pc/i8259.c - 664 sys sys 1015014519 4423
 sys/src/9/pc/init9.c - 664 sys sys 1040002518 94
 sys/src/9/pc/init9.c - 664 sys sys 1040002518 94
 sys/src/9/pc/initcode.s - 664 sys sys 1015014519 282
 sys/src/9/pc/initcode.s - 664 sys sys 1015014519 282
@@ -5316,7 +5316,7 @@ sys/src/9/pc/kbd.c - 664 sys sys 1039753498 9134
 sys/src/9/pc/l.s - 664 sys sys 1068394843 23295
 sys/src/9/pc/l.s - 664 sys sys 1068394843 23295
 sys/src/9/pc/main.c - 664 sys sys 1067722634 14685
 sys/src/9/pc/main.c - 664 sys sys 1067722634 14685
 sys/src/9/pc/mem.h - 664 sys sys 1018553448 4573
 sys/src/9/pc/mem.h - 664 sys sys 1018553448 4573
-sys/src/9/pc/memory.c - 664 sys sys 1032303986 12994
+sys/src/9/pc/memory.c - 664 sys sys 1071245460 13028
 sys/src/9/pc/mkfile - 664 sys sys 1067810339 3219
 sys/src/9/pc/mkfile - 664 sys sys 1067810339 3219
 sys/src/9/pc/mmu.c - 664 sys sys 1049509456 10014
 sys/src/9/pc/mmu.c - 664 sys sys 1049509456 10014
 sys/src/9/pc/mouse.c - 664 sys sys 1065717607 6625
 sys/src/9/pc/mouse.c - 664 sys sys 1065717607 6625
@@ -5332,7 +5332,7 @@ sys/src/9/pc/pcf - 664 sys sys 1067722637 1431
 sys/src/9/pc/pcf.c - 664 sys sys 1058659039 5110
 sys/src/9/pc/pcf.c - 664 sys sys 1058659039 5110
 sys/src/9/pc/pcfl - 664 sys sys 1042004821 1563
 sys/src/9/pc/pcfl - 664 sys sys 1042004821 1563
 sys/src/9/pc/pcflop - 664 sys sys 1067722894 1383
 sys/src/9/pc/pcflop - 664 sys sys 1067722894 1383
-sys/src/9/pc/pci.c - 664 sys sys 1068393407 24094
+sys/src/9/pc/pci.c - 664 sys sys 1071245502 24015
 sys/src/9/pc/pcmciamodem.c - 664 sys sys 1048635123 1545
 sys/src/9/pc/pcmciamodem.c - 664 sys sys 1048635123 1545
 sys/src/9/pc/piix4smbus.c - 664 sys sys 1067722684 5273
 sys/src/9/pc/piix4smbus.c - 664 sys sys 1067722684 5273
 sys/src/9/pc/plan9l.s - 664 sys sys 1015014521 910
 sys/src/9/pc/plan9l.s - 664 sys sys 1015014521 910
@@ -5346,8 +5346,8 @@ sys/src/9/pc/screen.h - 664 sys sys 1060267144 3797
 sys/src/9/pc/sd53c8xx.c - 664 sys sys 1055689891 52089
 sys/src/9/pc/sd53c8xx.c - 664 sys sys 1055689891 52089
 sys/src/9/pc/sd53c8xx.i - 664 sys sys 1045063730 27355
 sys/src/9/pc/sd53c8xx.i - 664 sys sys 1045063730 27355
 sys/src/9/pc/sd53c8xx.n - 664 sys sys 1032059019 12455
 sys/src/9/pc/sd53c8xx.n - 664 sys sys 1032059019 12455
-sys/src/9/pc/sdata.c - 664 sys sys 1068336178 50325
-sys/src/9/pc/sdmylex.c - 664 sys sys 1015014523 27750
+sys/src/9/pc/sdata.c - 664 sys sys 1071247345 50401
+sys/src/9/pc/sdmylex.c - 664 sys sys 1071245460 27812
 sys/src/9/pc/sdscsi.c - 664 sys sys 1055689892 7406
 sys/src/9/pc/sdscsi.c - 664 sys sys 1055689892 7406
 sys/src/9/pc/trap.c - 664 sys sys 1068237910 20045
 sys/src/9/pc/trap.c - 664 sys sys 1068237910 20045
 sys/src/9/pc/uarti8250.c - 664 sys sys 1067722686 13859
 sys/src/9/pc/uarti8250.c - 664 sys sys 1067722686 13859
@@ -5355,20 +5355,20 @@ sys/src/9/pc/uartpci.c - 664 sys sys 1015014524 2709
 sys/src/9/pc/usb.h - 664 sys sys 1063857246 3566
 sys/src/9/pc/usb.h - 664 sys sys 1063857246 3566
 sys/src/9/pc/usbuhci.c - 664 sys sys 1063857239 30688
 sys/src/9/pc/usbuhci.c - 664 sys sys 1063857239 30688
 sys/src/9/pc/vga.c - 664 sys sys 1039753497 4963
 sys/src/9/pc/vga.c - 664 sys sys 1039753497 4963
-sys/src/9/pc/vga3dfx.c - 664 sys sys 1026847654 4837
+sys/src/9/pc/vga3dfx.c - 664 sys sys 1071247360 4867
 sys/src/9/pc/vgaark2000pv.c - 664 sys sys 1015014524 3416
 sys/src/9/pc/vgaark2000pv.c - 664 sys sys 1015014524 3416
 sys/src/9/pc/vgabt485.c - 664 sys sys 1015014525 5041
 sys/src/9/pc/vgabt485.c - 664 sys sys 1015014525 5041
 sys/src/9/pc/vgaclgd542x.c - 664 sys sys 1015014525 5068
 sys/src/9/pc/vgaclgd542x.c - 664 sys sys 1015014525 5068
-sys/src/9/pc/vgaclgd546x.c - 664 sys sys 1015014525 4740
+sys/src/9/pc/vgaclgd546x.c - 664 sys sys 1071245447 4770
 sys/src/9/pc/vgact65545.c - 664 sys sys 1015014525 2243
 sys/src/9/pc/vgact65545.c - 664 sys sys 1015014525 2243
 sys/src/9/pc/vgacyber938x.c - 664 sys sys 1015014526 4192
 sys/src/9/pc/vgacyber938x.c - 664 sys sys 1015014526 4192
 sys/src/9/pc/vgaet4000.c - 664 sys sys 1015014526 5105
 sys/src/9/pc/vgaet4000.c - 664 sys sys 1015014526 5105
 sys/src/9/pc/vgahiqvideo.c - 664 sys sys 1048635701 5033
 sys/src/9/pc/vgahiqvideo.c - 664 sys sys 1048635701 5033
 sys/src/9/pc/vgai81x.c - 664 sys sys 1032052924 4905
 sys/src/9/pc/vgai81x.c - 664 sys sys 1032052924 4905
-sys/src/9/pc/vgamach64xx.c - 664 sys sys 1048644147 29112
+sys/src/9/pc/vgamach64xx.c - 664 sys sys 1071245447 29146
 sys/src/9/pc/vgamga2164w.c - 664 sys sys 1015014527 5654
 sys/src/9/pc/vgamga2164w.c - 664 sys sys 1015014527 5654
 sys/src/9/pc/vgamga4xx.c - 664 sys sys 1015014527 11122
 sys/src/9/pc/vgamga4xx.c - 664 sys sys 1015014527 11122
-sys/src/9/pc/vganeomagic.c - 664 sys sys 1032375144 10693
+sys/src/9/pc/vganeomagic.c - 664 sys sys 1071245447 10719
 sys/src/9/pc/vganvidia.c - 664 sys sys 1060269772 6545
 sys/src/9/pc/vganvidia.c - 664 sys sys 1060269772 6545
 sys/src/9/pc/vgargb524.c - 664 sys sys 1015014527 4235
 sys/src/9/pc/vgargb524.c - 664 sys sys 1015014527 4235
 sys/src/9/pc/vgas3.c - 664 sys sys 1068129423 12143
 sys/src/9/pc/vgas3.c - 664 sys sys 1068129423 12143
@@ -5409,7 +5409,7 @@ sys/src/9/port/devpnp.c - 664 sys sys 1055688361 13021
 sys/src/9/port/devproc.c - 664 sys sys 1068393158 28387
 sys/src/9/port/devproc.c - 664 sys sys 1068393158 28387
 sys/src/9/port/devrealtime.c - 664 sys sys 1055688366 16209
 sys/src/9/port/devrealtime.c - 664 sys sys 1055688366 16209
 sys/src/9/port/devroot.c - 664 sys sys 1067722764 4254
 sys/src/9/port/devroot.c - 664 sys sys 1067722764 4254
-sys/src/9/port/devsd.c - 664 sys sys 1055688396 28669
+sys/src/9/port/devsd.c - 664 sys sys 1071245428 28564
 sys/src/9/port/devsdp.c - 664 sys sys 1057323393 44800
 sys/src/9/port/devsdp.c - 664 sys sys 1057323393 44800
 sys/src/9/port/devsegment.c - 664 sys sys 1017679394 9600
 sys/src/9/port/devsegment.c - 664 sys sys 1017679394 9600
 sys/src/9/port/devsrv.c - 664 sys sys 1063856594 5197
 sys/src/9/port/devsrv.c - 664 sys sys 1063856594 5197
@@ -5445,11 +5445,11 @@ sys/src/9/port/page.c - 664 sys sys 1055688510 8107
 sys/src/9/port/parse.c - 664 sys sys 1014931177 2026
 sys/src/9/port/parse.c - 664 sys sys 1014931177 2026
 sys/src/9/port/pgrp.c - 664 sys sys 1067722718 3944
 sys/src/9/port/pgrp.c - 664 sys sys 1067722718 3944
 sys/src/9/port/portclock.c - 664 sys sys 1068135508 4305
 sys/src/9/port/portclock.c - 664 sys sys 1068135508 4305
-sys/src/9/port/portdat.h - 664 sys sys 1067722763 22621
+sys/src/9/port/portdat.h - 664 sys sys 1071247312 22639
 sys/src/9/port/portfns.h - 664 sys sys 1068215525 11376
 sys/src/9/port/portfns.h - 664 sys sys 1068215525 11376
 sys/src/9/port/portmkfile - 664 sys sys 1067722766 2098
 sys/src/9/port/portmkfile - 664 sys sys 1067722766 2098
 sys/src/9/port/print.c - 664 sys sys 1014931178 227
 sys/src/9/port/print.c - 664 sys sys 1014931178 227
-sys/src/9/port/proc.c - 664 sys sys 1068393121 24882
+sys/src/9/port/proc.c - 664 sys sys 1071247309 28305
 sys/src/9/port/qio.c - 664 sys sys 1070287837 23562
 sys/src/9/port/qio.c - 664 sys sys 1070287837 23562
 sys/src/9/port/qlock.c - 664 sys sys 1067722765 3196
 sys/src/9/port/qlock.c - 664 sys sys 1067722765 3196
 sys/src/9/port/rdb.c - 664 sys sys 1018721202 1698
 sys/src/9/port/rdb.c - 664 sys sys 1018721202 1698
@@ -5472,7 +5472,7 @@ sys/src/9/ppc/blast - 664 sys sys 1067722850 659
 sys/src/9/ppc/blast.c - 664 sys sys 1059490750 1422
 sys/src/9/ppc/blast.c - 664 sys sys 1059490750 1422
 sys/src/9/ppc/blast.h - 664 sys sys 1059490750 3109
 sys/src/9/ppc/blast.h - 664 sys sys 1059490750 3109
 sys/src/9/ppc/clock.c - 664 sys sys 1068135488 1032
 sys/src/9/ppc/clock.c - 664 sys sys 1068135488 1032
-sys/src/9/ppc/dat.h - 664 sys sys 1067723142 4676
+sys/src/9/ppc/dat.h - 664 sys sys 1071245549 4727
 sys/src/9/ppc/devether.c - 664 sys sys 1059490750 9264
 sys/src/9/ppc/devether.c - 664 sys sys 1059490750 9264
 sys/src/9/ppc/devflash.c - 664 sys sys 1059490750 19885
 sys/src/9/ppc/devflash.c - 664 sys sys 1059490750 19885
 sys/src/9/ppc/devirq.c - 664 sys sys 1067722849 6057
 sys/src/9/ppc/devirq.c - 664 sys sys 1067722849 6057
@@ -6200,7 +6200,7 @@ sys/src/ape/lib/ap/stdio/sopenw.c - 664 sys sys 1014921982 287
 sys/src/ape/lib/ap/stdio/sprintf.c - 664 sys sys 1014921982 305
 sys/src/ape/lib/ap/stdio/sprintf.c - 664 sys sys 1014921982 305
 sys/src/ape/lib/ap/stdio/sscanf.c - 664 sys sys 1014921982 238
 sys/src/ape/lib/ap/stdio/sscanf.c - 664 sys sys 1014921982 238
 sys/src/ape/lib/ap/stdio/stdio.c - 664 sys sys 1014921982 209
 sys/src/ape/lib/ap/stdio/stdio.c - 664 sys sys 1014921982 209
-sys/src/ape/lib/ap/stdio/strerror.c - 664 sys sys 1014921982 1754
+sys/src/ape/lib/ap/stdio/strerror.c - 664 sys sys 1071245622 1816
 sys/src/ape/lib/ap/stdio/strtod.c - 664 sys sys 1014921983 14375
 sys/src/ape/lib/ap/stdio/strtod.c - 664 sys sys 1014921983 14375
 sys/src/ape/lib/ap/stdio/tmpfile.c - 664 sys sys 1014921982 706
 sys/src/ape/lib/ap/stdio/tmpfile.c - 664 sys sys 1014921982 706
 sys/src/ape/lib/ap/stdio/tmpnam.c - 664 sys sys 1014921982 314
 sys/src/ape/lib/ap/stdio/tmpnam.c - 664 sys sys 1014921982 314
@@ -6751,7 +6751,7 @@ sys/src/cmd/9nfs/xfile.c - 664 sys sys 1017337816 1847
 sys/src/cmd/aan.c - 664 sys sys 1019856827 9758
 sys/src/cmd/aan.c - 664 sys sys 1019856827 9758
 sys/src/cmd/acid - 20000000775 sys sys 944960739 0
 sys/src/cmd/acid - 20000000775 sys sys 944960739 0
 sys/src/cmd/acid/acid.h - 664 sys sys 1046198958 4354
 sys/src/cmd/acid/acid.h - 664 sys sys 1046198958 4354
-sys/src/cmd/acid/builtin.c - 664 sys sys 1063859225 19980
+sys/src/cmd/acid/builtin.c - 664 sys sys 1071247428 19979
 sys/src/cmd/acid/dbg.y - 664 sys sys 1046198962 5450
 sys/src/cmd/acid/dbg.y - 664 sys sys 1046198962 5450
 sys/src/cmd/acid/dot.c - 664 sys sys 944960739 2161
 sys/src/cmd/acid/dot.c - 664 sys sys 944960739 2161
 sys/src/cmd/acid/exec.c - 664 sys sys 1016833876 8187
 sys/src/cmd/acid/exec.c - 664 sys sys 1016833876 8187
@@ -6838,7 +6838,7 @@ sys/src/cmd/auth/debug.c - 664 sys sys 1044839697 7324
 sys/src/cmd/auth/disable - 775 sys sys 1015008431 146
 sys/src/cmd/auth/disable - 775 sys sys 1015008431 146
 sys/src/cmd/auth/enable - 775 sys sys 1015008430 134
 sys/src/cmd/auth/enable - 775 sys sys 1015008430 134
 sys/src/cmd/auth/factotum - 20000000775 sys sys 1017165894 0
 sys/src/cmd/auth/factotum - 20000000775 sys sys 1017165894 0
-sys/src/cmd/auth/factotum/apop.c - 664 sys sys 1048614971 5995
+sys/src/cmd/auth/factotum/apop.c - 664 sys sys 1071260312 6074
 sys/src/cmd/auth/factotum/chap.c - 664 sys sys 1044829586 5324
 sys/src/cmd/auth/factotum/chap.c - 664 sys sys 1044829586 5324
 sys/src/cmd/auth/factotum/confirm.c - 664 sys sys 1044829586 3103
 sys/src/cmd/auth/factotum/confirm.c - 664 sys sys 1044829586 3103
 sys/src/cmd/auth/factotum/dat.h - 664 sys sys 1048614970 4773
 sys/src/cmd/auth/factotum/dat.h - 664 sys sys 1048614970 4773
@@ -7048,7 +7048,7 @@ sys/src/cmd/aux/na/mkfile - 664 sys sys 955036627 121
 sys/src/cmd/aux/na/na.h - 775 sys sys 955036627 267
 sys/src/cmd/aux/na/na.h - 775 sys sys 955036627 267
 sys/src/cmd/aux/na/na.y - 775 sys sys 1015008889 25158
 sys/src/cmd/aux/na/na.y - 775 sys sys 1015008889 25158
 sys/src/cmd/aux/nfsmount.c - 664 sys sys 1045589268 6202
 sys/src/cmd/aux/nfsmount.c - 664 sys sys 1045589268 6202
-sys/src/cmd/aux/olefs.c - 664 sys sys 1065963681 9630
+sys/src/cmd/aux/olefs.c - 664 sys sys 1071245775 9853
 sys/src/cmd/aux/pcmcia.c - 664 sys sys 1065397225 8366
 sys/src/cmd/aux/pcmcia.c - 664 sys sys 1065397225 8366
 sys/src/cmd/aux/portmap.c - 664 sys sys 1049776133 3617
 sys/src/cmd/aux/portmap.c - 664 sys sys 1049776133 3617
 sys/src/cmd/aux/rdwr.c - 664 sys sys 1016833876 811
 sys/src/cmd/aux/rdwr.c - 664 sys sys 1016833876 811
@@ -9352,7 +9352,7 @@ sys/src/cmd/gzip/unzip.c - 664 sys sys 1050689595 13603
 sys/src/cmd/gzip/zip.c - 664 sys sys 1033183074 7054
 sys/src/cmd/gzip/zip.c - 664 sys sys 1033183074 7054
 sys/src/cmd/gzip/zip.h - 664 sys sys 954778719 1428
 sys/src/cmd/gzip/zip.h - 664 sys sys 954778719 1428
 sys/src/cmd/hget.c - 664 sys sys 1070286807 22715
 sys/src/cmd/hget.c - 664 sys sys 1070286807 22715
-sys/src/cmd/history.c - 664 sys sys 1044909166 5810
+sys/src/cmd/history.c - 664 sys sys 1071245583 5726
 sys/src/cmd/hoc - 20000000775 sys sys 954036932 0
 sys/src/cmd/hoc - 20000000775 sys sys 954036932 0
 sys/src/cmd/hoc/code.c - 664 sys sys 944961000 10041
 sys/src/cmd/hoc/code.c - 664 sys sys 944961000 10041
 sys/src/cmd/hoc/hoc.h - 664 sys sys 944960999 2358
 sys/src/cmd/hoc/hoc.h - 664 sys sys 944960999 2358
@@ -10124,7 +10124,7 @@ sys/src/cmd/ql/optab.c - 664 sys sys 944961082 12648
 sys/src/cmd/ql/pass.c - 664 sys sys 1045503973 8914
 sys/src/cmd/ql/pass.c - 664 sys sys 1045503973 8914
 sys/src/cmd/ql/sched.c - 664 sys sys 944961082 10778
 sys/src/cmd/ql/sched.c - 664 sys sys 944961082 10778
 sys/src/cmd/ql/span.c - 664 sys sys 1045503974 14051
 sys/src/cmd/ql/span.c - 664 sys sys 1045503974 14051
-sys/src/cmd/ramfs.c - 664 sys sys 1062759940 15377
+sys/src/cmd/ramfs.c - 664 sys sys 1071247349 15377
 sys/src/cmd/ratfs - 20000000775 sys sys 1016943965 0
 sys/src/cmd/ratfs - 20000000775 sys sys 1016943965 0
 sys/src/cmd/ratfs/ctlfiles.c - 664 sys sys 1016943964 6694
 sys/src/cmd/ratfs/ctlfiles.c - 664 sys sys 1016943964 6694
 sys/src/cmd/ratfs/main.c - 664 sys sys 1016943964 6516
 sys/src/cmd/ratfs/main.c - 664 sys sys 1016943964 6516
@@ -10898,7 +10898,7 @@ sys/src/cmd/va/l.s - 664 sys sys 944961340 12696
 sys/src/cmd/va/lex.c - 664 sys sys 1067725163 11825
 sys/src/cmd/va/lex.c - 664 sys sys 1067725163 11825
 sys/src/cmd/va/mkfile - 664 sys sys 944961340 215
 sys/src/cmd/va/mkfile - 664 sys sys 944961340 215
 sys/src/cmd/vac - 20000000775 sys sys 1019678788 0
 sys/src/cmd/vac - 20000000775 sys sys 1019678788 0
-sys/src/cmd/vac/cache.c - 664 sys sys 1039797583 15878
+sys/src/cmd/vac/cache.c - 664 sys sys 1071245791 15806
 sys/src/cmd/vac/dat.h - 664 sys sys 1036006061 3997
 sys/src/cmd/vac/dat.h - 664 sys sys 1036006061 3997
 sys/src/cmd/vac/error.c - 664 sys sys 1036006057 633
 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/error.h - 664 sys sys 1036024048 327
@@ -11589,7 +11589,7 @@ sys/src/libc/port/cistrstr.c - 664 sys sys 1014927395 357
 sys/src/libc/port/cleanname.c - 664 sys sys 1014927395 1199
 sys/src/libc/port/cleanname.c - 664 sys sys 1014927395 1199
 sys/src/libc/port/crypt.c - 664 sys sys 1014927396 1045
 sys/src/libc/port/crypt.c - 664 sys sys 1014927396 1045
 sys/src/libc/port/ctype.c - 664 sys sys 1014927396 834
 sys/src/libc/port/ctype.c - 664 sys sys 1014927396 834
-sys/src/libc/port/encodefmt.c - 664 sys sys 1044430909 986
+sys/src/libc/port/encodefmt.c - 664 sys sys 1071289162 1100
 sys/src/libc/port/execl.c - 664 sys sys 1014927396 86
 sys/src/libc/port/execl.c - 664 sys sys 1014927396 86
 sys/src/libc/port/exp.c - 664 sys sys 1014927396 912
 sys/src/libc/port/exp.c - 664 sys sys 1014927396 912
 sys/src/libc/port/fabs.c - 664 sys sys 1014927396 104
 sys/src/libc/port/fabs.c - 664 sys sys 1014927396 104
@@ -12016,7 +12016,7 @@ sys/src/libmp/port/mpdigdiv.c - 664 sys sys 950104711 732
 sys/src/libmp/port/mpdiv.c - 664 sys sys 964540764 2423
 sys/src/libmp/port/mpdiv.c - 664 sys sys 964540764 2423
 sys/src/libmp/port/mpeuclid.c - 664 sys sys 1063853795 1293
 sys/src/libmp/port/mpeuclid.c - 664 sys sys 1063853795 1293
 sys/src/libmp/port/mpexp.c - 664 sys sys 1055700261 1269
 sys/src/libmp/port/mpexp.c - 664 sys sys 1055700261 1269
-sys/src/libmp/port/mpextendedgcd.c - 664 sys sys 1014930533 1613
+sys/src/libmp/port/mpextendedgcd.c - 664 sys sys 1071238908 1739
 sys/src/libmp/port/mpfmt.c - 664 sys sys 1045502186 2729
 sys/src/libmp/port/mpfmt.c - 664 sys sys 1045502186 2729
 sys/src/libmp/port/mpinvert.c - 664 sys sys 956526244 394
 sys/src/libmp/port/mpinvert.c - 664 sys sys 956526244 394
 sys/src/libmp/port/mpleft.c - 664 sys sys 1055700262 906
 sys/src/libmp/port/mpleft.c - 664 sys sys 1055700262 906

+ 137 - 0
dist/replica/plan9.log

@@ -12973,3 +12973,140 @@
 1071180165 0 c 386/bin/fossil/fossil - 775 sys sys 1071179084 345532
 1071180165 0 c 386/bin/fossil/fossil - 775 sys sys 1071179084 345532
 1071180165 1 c sys/src/ape/lib/ap/plan9/_buf.c - 664 sys sys 1071178644 9850
 1071180165 1 c sys/src/ape/lib/ap/plan9/_buf.c - 664 sys sys 1071178644 9850
 1071180165 2 c sys/src/cmd/fossil/9user.c - 664 sys sys 1071179088 17260
 1071180165 2 c sys/src/cmd/fossil/9user.c - 664 sys sys 1071179088 17260
+1071239429 0 c sys/man/2/mp - 664 sys sys 1071238964 10690
+1071239429 1 c sys/src/libmp/port/mpextendedgcd.c - 664 sys sys 1071238908 1739
+1071246630 0 c 386/bin/acme - 775 sys sys 1071245279 417811
+1071246630 1 c 386/bin/awk - 775 sys sys 1071245297 320327
+1071246630 2 c 386/bin/bitsy/keyboard - 775 sys sys 1071245298 302036
+1071246630 3 c 386/bin/bitsy/pencal - 775 sys sys 1071245299 115667
+1071246630 4 c 386/bin/bitsy/prompter - 775 sys sys 1071245300 284220
+1071246630 5 c 386/bin/clock - 775 sys sys 1071245300 155729
+1071246630 6 c 386/bin/colors - 775 sys sys 1071245301 147903
+1071246630 7 c 386/bin/eqn - 775 sys sys 1071245302 244127
+1071246630 8 c 386/bin/faces - 775 sys sys 1071245303 191093
+1071246630 9 c 386/bin/hget - 775 sys sys 1071245335 222506
+1071246630 10 c 386/bin/png - 775 sys sys 1071245342 160006
+1071246630 11 c 386/bin/rtstats - 775 sys sys 1071245345 177818
+1071246630 12 c 386/bin/vncv - 775 sys sys 1071245371 271560
+1071246630 13 c 386/bin/file - 775 sys sys 1071245303 117452
+1071246630 14 c 386/bin/fmt - 775 sys sys 1071245303 63683
+1071246630 15 c 386/bin/gif - 775 sys sys 1071245307 156729
+1071246630 16 c 386/bin/grap - 775 sys sys 1071245308 279167
+1071246630 17 c 386/bin/gs - 775 sys sys 1071245334 11134067
+1071246630 18 c 386/bin/jpg - 775 sys sys 1071245337 173422
+1071246630 19 c 386/bin/lens - 775 sys sys 1071245338 122873
+1071246630 20 c 386/bin/mc - 775 sys sys 1071245338 129548
+1071246630 21 c 386/bin/page - 775 sys sys 1071245340 216518
+1071246630 22 c 386/bin/pic - 775 sys sys 1071245341 304118
+1071246630 23 c 386/bin/plot - 775 sys sys 1071245342 220129
+1071246630 24 c 386/bin/ppm - 775 sys sys 1071245343 147780
+1071246630 25 c 386/bin/proof - 775 sys sys 1071245344 176279
+1071246630 26 c 386/bin/rio - 775 sys sys 1071245344 303330
+1071246630 27 c 386/bin/rx - 775 sys sys 1071245345 80158
+1071246630 28 c 386/bin/scat - 775 sys sys 1071245346 282545
+1071246630 29 c 386/bin/spin - 775 sys sys 1071245348 654328
+1071246630 30 c 386/bin/srv - 775 sys sys 1071245348 80563
+1071246630 31 c 386/bin/ssh - 775 sys sys 1071245349 210501
+1071246630 32 c 386/bin/stats - 775 sys sys 1071245355 188617
+1071246630 33 c 386/bin/winwatch - 775 sys sys 1071245372 141560
+1071246630 34 c 386/bin/ape/basename - 775 sys sys 1071245280 133877
+1071246630 35 c 386/bin/ape/diff - 775 sys sys 1071245281 348833
+1071246630 36 c 386/bin/ape/diff3 - 775 sys sys 1071245282 186855
+1071246630 37 c 386/bin/ape/dirname - 775 sys sys 1071245282 133656
+1071246630 38 c 386/bin/ape/expr - 775 sys sys 1071245283 143297
+1071246630 39 c 386/bin/ape/kill - 775 sys sys 1071245283 139225
+1071246630 40 c 386/bin/ape/make - 775 sys sys 1071245284 207848
+1071246630 41 c 386/bin/ape/patch - 775 sys sys 1071245285 301457
+1071246630 42 c 386/bin/ape/sed - 775 sys sys 1071245286 159351
+1071246630 43 c 386/bin/ape/sh - 775 sys sys 1071245287 476439
+1071246630 44 c 386/bin/ape/uname - 775 sys sys 1071245288 133706
+1071246630 45 c 386/bin/auth/fgui - 775 sys sys 1071245288 212496
+1071246630 46 c 386/bin/aux/download - 775 sys sys 1071245289 177517
+1071246630 47 c 386/bin/aux/lpdaemon - 775 sys sys 1071245290 166954
+1071246630 48 c 386/bin/aux/lpdsend - 775 sys sys 1071245290 155010
+1071246630 49 c 386/bin/aux/mnihongo - 775 sys sys 1071245291 136933
+1071246630 50 c 386/bin/aux/pcmcia - 775 sys sys 1071245291 46548
+1071246630 51 c 386/bin/aux/postgif - 775 sys sys 1071245292 176711
+1071246630 52 c 386/bin/aux/postprint - 775 sys sys 1071245292 161360
+1071246630 53 c 386/bin/aux/postreverse - 775 sys sys 1071245293 166125
+1071246630 54 c 386/bin/aux/posttek - 775 sys sys 1071245294 164558
+1071246630 55 c 386/bin/aux/samterm - 775 sys sys 1071245295 245329
+1071246630 56 c 386/bin/aux/tcpostio - 775 sys sys 1071245296 199664
+1071246630 57 c 386/bin/disk/mkext - 775 sys sys 1071245301 77957
+1071246630 58 c 386/bin/fossil/flchk - 775 sys sys 1071245304 232757
+1071246630 59 c 386/bin/fossil/flfmt - 775 sys sys 1071245305 230722
+1071246630 60 c 386/bin/fossil/fossil - 775 sys sys 1071245306 345532
+1071246630 61 c 386/bin/ip/gping - 775 sys sys 1071245335 180170
+1071246630 62 c 386/bin/ip/httpd/webls - 775 sys sys 1071245336 129484
+1071246630 63 c 386/bin/ip/imap4d - 775 sys sys 1071245337 236964
+1071246630 64 c 386/bin/ndb/cs - 775 sys sys 1071245339 144581
+1071246630 65 c 386/bin/sshnet - 775 sys sys 1071245354 284821
+1071246630 66 c 386/bin/test - 775 sys sys 1071245355 68512
+1071246630 67 c 386/bin/togif - 775 sys sys 1071245356 189681
+1071246630 68 c 386/bin/toppm - 775 sys sys 1071245357 165019
+1071246630 69 c 386/bin/troff - 775 sys sys 1071245358 356719
+1071246630 70 c 386/bin/tweak - 775 sys sys 1071245359 190836
+1071246630 71 c 386/bin/upas/aliasmail - 775 sys sys 1071245360 101743
+1071246630 72 c 386/bin/upas/deliver - 775 sys sys 1071245360 98274
+1071246630 73 c 386/bin/upas/filter - 775 sys sys 1071245361 146352
+1071246630 74 c 386/bin/upas/fs - 775 sys sys 1071245362 334765
+1071246630 75 c 386/bin/upas/marshal - 775 sys sys 1071245362 129531
+1071246630 76 c 386/bin/upas/ml - 775 sys sys 1071245363 120511
+1071246630 77 c 386/bin/upas/mlmgr - 775 sys sys 1071245363 101109
+1071246630 78 c 386/bin/upas/nedmail - 775 sys sys 1071245364 150211
+1071246630 79 c 386/bin/upas/pop3 - 775 sys sys 1071245365 257708
+1071246630 80 c 386/bin/upas/qer - 775 sys sys 1071245365 98655
+1071246630 81 c 386/bin/upas/ratfs - 775 sys sys 1071245366 112106
+1071246630 82 c 386/bin/upas/runq - 775 sys sys 1071245366 111469
+1071246630 83 c 386/bin/upas/scanmail - 775 sys sys 1071245367 127754
+1071246630 84 c 386/bin/upas/send - 775 sys sys 1071245368 190512
+1071246630 85 c 386/bin/upas/smtp - 775 sys sys 1071245369 271129
+1071246630 86 c 386/bin/upas/smtpd - 775 sys sys 1071245370 320529
+1071246630 87 c 386/bin/vt - 775 sys sys 1071245372 171391
+1071246630 88 c 386/bin/yuv - 775 sys sys 1071245373 148328
+1071246630 89 c 386/lib/ape/libap.a - 664 sys sys 1071245376 815548
+1071246630 90 c 386/lib/ape/libdraw.a - 664 sys sys 1071245377 574556
+1071246630 91 c 386/lib/libdraw.a - 664 sys sys 1071245378 373032
+1071246630 92 c sys/man/8/mkfs - 664 sys sys 1071245592 3420
+1071246630 93 c sys/src/9/alphapc/dat.h - 664 sys sys 1071245535 5215
+1071246630 94 c sys/src/9/alphapc/mkfile - 664 sys sys 1071245505 2014
+1071246630 95 c sys/src/9/bitsy/dat.h - 664 sys sys 1071245535 5792
+1071246630 96 c sys/src/9/bitsy/devpcmcia.c - 664 sys sys 1071245513 12963
+1071246630 97 c sys/src/9/bitsy/devuda1341.c - 664 sys sys 1071245420 30346
+1071246630 98 c sys/src/9/bitsy/etherwavelan.c - 664 sys sys 1071245513 870
+1071246630 99 c sys/src/9/bitsy/mkfile - 664 sys sys 1071245512 2450
+1071246630 100 c sys/src/9/mtx/dat.h - 664 sys sys 1071245548 3849
+1071246630 101 c sys/src/9/mtx/devether.c - 664 sys sys 1071245412 9281
+1071246630 102 c sys/src/9/mtx/mkfile - 664 sys sys 1071245412 1504
+1071246630 103 c sys/src/9/pc/dat.h - 664 sys sys 1071245548 6177
+1071246630 104 c sys/src/9/pc/devpccard.c - 664 sys sys 1071245415 40055
+1071246630 105 c sys/src/9/pc/devtv.c - 664 sys sys 1071245470 45750
+1071246630 106 c sys/src/9/pc/ether79c970.c - 664 sys sys 1071245466 14094
+1071246630 107 c sys/src/9/pc/ether8139.c - 664 sys sys 1071245462 18026
+1071246630 108 c sys/src/9/pc/ether8390.c - 664 sys sys 1071245462 17557
+1071246630 109 c sys/src/9/pc/etherigbe.c - 664 sys sys 1071245461 42444
+1071246630 110 c sys/src/9/pc/ethersmc.c - 664 sys sys 1071245461 15103
+1071246630 111 c sys/src/9/pc/i8253.c - 664 sys sys 1071245560 6251
+1071246630 112 c sys/src/9/pc/memory.c - 664 sys sys 1071245460 13028
+1071246630 113 c sys/src/9/pc/pci.c - 664 sys sys 1071245502 24015
+1071246630 114 c sys/src/9/pc/sdmylex.c - 664 sys sys 1071245460 27812
+1071246630 115 c sys/src/9/pc/vgaclgd546x.c - 664 sys sys 1071245447 4770
+1071246630 116 c sys/src/9/pc/vgamach64xx.c - 664 sys sys 1071245447 29146
+1071246630 117 c sys/src/9/pc/vganeomagic.c - 664 sys sys 1071245447 10719
+1071246630 118 c sys/src/9/port/devsd.c - 664 sys sys 1071245428 28564
+1071246630 119 c sys/src/9/ppc/dat.h - 664 sys sys 1071245549 4727
+1071246630 120 c sys/src/ape/lib/ap/stdio/strerror.c - 664 sys sys 1071245622 1816
+1071246630 121 c sys/src/cmd/aux/olefs.c - 664 sys sys 1071245775 9853
+1071246630 122 c sys/src/cmd/history.c - 664 sys sys 1071245583 5726
+1071246630 123 c sys/src/cmd/vac/cache.c - 664 sys sys 1071245791 15806
+1071248430 0 c sys/games/lib/fortunes - 664 sys sys 1071247330 247127
+1071248430 1 c sys/man/1/page - 664 sys sys 1071247418 4870
+1071248430 2 c sys/src/9/pc/sdata.c - 664 sys sys 1071247345 50401
+1071248430 3 c sys/src/9/pc/vga3dfx.c - 664 sys sys 1071247360 4867
+1071248430 4 c sys/src/9/port/portdat.h - 664 sys sys 1071247312 22639
+1071248430 5 c sys/src/9/port/proc.c - 664 sys sys 1071247309 28305
+1071248430 6 c sys/src/cmd/acid/builtin.c - 664 sys sys 1071247428 19979
+1071248430 7 c sys/src/cmd/ramfs.c - 664 sys sys 1071247349 15377
+1071261032 0 c sys/src/cmd/auth/factotum/apop.c - 664 sys sys 1071260312 6074
+1071289835 0 c sys/man/2/encode - 664 sys sys 1071289168 1572
+1071289835 1 c sys/src/libc/port/encodefmt.c - 664 sys sys 1071289162 1100

+ 1 - 0
sys/games/lib/fortunes

@@ -3993,3 +3993,4 @@ As complicated as the semantics of virtual inheritance may seem, its support wit
 Who needs hallucinatory drugs when we've got quantum physics?
 Who needs hallucinatory drugs when we've got quantum physics?
 The essence of XML is this: the problem it solves is not hard, and it does not solve the problem well.  - Phil Wadler, POPL 2003
 The essence of XML is this: the problem it solves is not hard, and it does not solve the problem well.  - Phil Wadler, POPL 2003
 tcp_extensions="YES".  really i wanted "MAYBE" or "GOODQUESTION" or "YOUTELLME" or "YOU'RETHECOMPUTER!"  - forsyth
 tcp_extensions="YES".  really i wanted "MAYBE" or "GOODQUESTION" or "YOUTELLME" or "YOU'RETHECOMPUTER!"  - forsyth
+int parse_url(unsigned char *url, int *prlen, unsigned char **user, int *uslen, unsigned char **pass, int *palen, unsigned char **host, int *holen, unsigned char **port, int *polen, unsigned char **data, int *dalen, unsigned char **post)

+ 2 - 2
sys/man/1/page

@@ -2,8 +2,8 @@
 .SH NAME
 .SH NAME
 page \- view 
 page \- view 
 FAX, 
 FAX, 
-image, graphic, PostScript, PDF,
-and typesetter output
+image, graphic, PostScript, PDF, and
+typesetter output
 files
 files
 .SH SYNOPSIS
 .SH SYNOPSIS
 .B page
 .B page

+ 4 - 1
sys/man/2/encode

@@ -56,7 +56,10 @@ to print encoded representations of byte arrays.
 The verbs are
 The verbs are
 .TP
 .TP
 .B H
 .B H
-base 16 (i.e. hexadecimal)
+base 16 (i.e. hexadecimal). The default encoding is
+in upper case.  The
+.B l
+flag forces lower case.
 .TP
 .TP
 .B <
 .B <
 base 32
 base 32

+ 7 - 0
sys/man/2/mp

@@ -464,6 +464,13 @@ and
 .I y
 .I y
 such that
 such that
 .BR "a*x + b*y = d" .
 .BR "a*x + b*y = d" .
+Both
+.I a
+and
+.I b
+are required to be positive.
+If called with negative arguments, it will
+return a gcd of 0.
 .PP
 .PP
 .I Mpinverse
 .I Mpinverse
 computes the multiplicative inverse of
 computes the multiplicative inverse of

+ 20 - 17
sys/man/8/mkfs

@@ -23,6 +23,7 @@ mkfs, mkext \- archive or update a file system
 .RB [ -h ]
 .RB [ -h ]
 .RB [ -v ]
 .RB [ -v ]
 .RB [ -x ]
 .RB [ -x ]
+.RB [ -T ]
 .I file ...
 .I file ...
 .SH DESCRIPTION
 .SH DESCRIPTION
 .I Mkfs
 .I Mkfs
@@ -136,19 +137,6 @@ unpacks archive files made by the
 .B -a
 .B -a
 option of
 option of
 .IR mkfs .
 .IR mkfs .
-The
-.B -d
-option specifies a directory (default
-.BR / )
-to serve as the root of the unpacked file system.
-The
-.B -u
-option, to be used only when initializing a new
-.IR fs (4)
-file system, sets the owners of the files created to correspond to
-those in the archive and restores the modification times of the files.
-(This is only permitted at the initial load of the files into a file
-system.)
 Each file on the command line is unpacked in one pass through the archive.
 Each file on the command line is unpacked in one pass through the archive.
 If the file is a directory,
 If the file is a directory,
 all files and subdirectories of that directory are also unpacked.
 all files and subdirectories of that directory are also unpacked.
@@ -156,12 +144,27 @@ When a file is unpacked, the entire path is created if it
 does not exist.
 does not exist.
 If no files are specified, the entire archive is unpacked;
 If no files are specified, the entire archive is unpacked;
 in this case, missing intermediate directories are not created.
 in this case, missing intermediate directories are not created.
-The
-.B -v
-option prints the names and sizes of files as they are extracted;
-.B -h
+The options are:
+.TP
+.B d
+specifies a directory (default
+.BR / )
+to serve as the root of the unpacked file system.
+.TP
+.B u
+sets the owners of the files created to correspond to
+those in the archive and restores the modification times of the files.
+.TP
+.B T
+restores only the modification times of the files.
+.TP
+.B v
+prints the names and sizes of files as they are extracted.
+.TP
+.B h
 prints headers for the files on standard output
 prints headers for the files on standard output
 instead of unpacking the files.
 instead of unpacking the files.
+.PD
 .SH EXAMPLES
 .SH EXAMPLES
 .PP
 .PP
 Make an archive to establish a new file system:
 Make an archive to establish a new file system:

+ 4 - 3
sys/src/9/alphapc/dat.h

@@ -145,7 +145,8 @@ struct Mach
 	void	*alarm;			/* alarms bound to this clock */
 	void	*alarm;			/* alarms bound to this clock */
 	int	inclockintr;
 	int	inclockintr;
 
 
-	ulong	fairness;		/* for runproc */
+	Proc*	readied;		/* for runproc */
+	ulong	schedticks;	/* next forced context switch */
 
 
 	vlong	cpuhz;			/* hwrpb->cfreq */
 	vlong	cpuhz;			/* hwrpb->cfreq */
 	uvlong	cyclefreq;		/* Frequency of user readable cycle counter */
 	uvlong	cyclefreq;		/* Frequency of user readable cycle counter */
@@ -244,12 +245,12 @@ extern register Proc	*up;
 typedef struct {
 typedef struct {
 	ulong	port;	
 	ulong	port;	
 	int	size;
 	int	size;
-} port_t;
+} Devport;
 
 
 struct DevConf
 struct DevConf
 {
 {
 	ulong	intnum;	/* interrupt number */
 	ulong	intnum;	/* interrupt number */
 	char	*type;	/* card type, malloced */
 	char	*type;	/* card type, malloced */
 	int	nports;	/* Number of ports */
 	int	nports;	/* Number of ports */
-	port_t	*ports;	/* The ports themselves */
+	Devport	*ports;	/* The ports themselves */
 };
 };

+ 0 - 1
sys/src/9/alphapc/mkfile

@@ -19,7 +19,6 @@ PORT=\
 	latin1.$O\
 	latin1.$O\
 	log.$O\
 	log.$O\
 	edf.$O\
 	edf.$O\
-	mul64fract.$O\
 	page.$O\
 	page.$O\
 	parse.$O\
 	parse.$O\
 	pgrp.$O\
 	pgrp.$O\

+ 4 - 3
sys/src/9/bitsy/dat.h

@@ -122,7 +122,8 @@ struct Mach
 	void*	alarm;			/* alarms bound to this clock */
 	void*	alarm;			/* alarms bound to this clock */
 	int	inclockintr;
 	int	inclockintr;
 
 
-	ulong	fairness;		/* for runproc */
+	Proc*	readied;		/* for runproc */
+	ulong	schedticks;	/* next forced context switch */
 
 
 	/* stats */
 	/* stats */
 	int	tlbfault;
 	int	tlbfault;
@@ -261,13 +262,13 @@ struct PCMslot
 typedef struct {
 typedef struct {
 	ulong	port;	
 	ulong	port;	
 	int	size;
 	int	size;
-} port_t;
+} Devport;
 
 
 struct DevConf
 struct DevConf
 {
 {
 	RWlock;			/* write: configure/unconfigure/suspend; read: normal access */
 	RWlock;			/* write: configure/unconfigure/suspend; read: normal access */
 	ulong	mem;		/* mapped memory address */
 	ulong	mem;		/* mapped memory address */
-	port_t	*ports;		/* ports[0]: mapped i/o regs, access size */
+	Devport	*ports;		/* ports[0]: mapped i/o regs, access size */
 	int	nports;		/* always 1 for the bitsy */
 	int	nports;		/* always 1 for the bitsy */
 	int	itype;		/* type of interrupt */
 	int	itype;		/* type of interrupt */
 	ulong	intnum;		/* interrupt number */
 	ulong	intnum;		/* interrupt number */

+ 1 - 1
sys/src/9/bitsy/devpcmcia.c

@@ -355,7 +355,7 @@ pcmctlwrite(char *p, long n, ulong, PCMslot *sp)
 	int index, i, dtx;
 	int index, i, dtx;
 	Rune r;
 	Rune r;
 	DevConf cf;
 	DevConf cf;
-	port_t port;
+	Devport port;
 
 
 	cmd = parsecmd(p, n);
 	cmd = parsecmd(p, n);
 	if(strcmp(cmd->f[0], "configure") == 0){
 	if(strcmp(cmd->f[0], "configure") == 0){

+ 4 - 3
sys/src/9/bitsy/devuda1341.c

@@ -198,18 +198,19 @@ static	struct
 
 
 int	zerodma;	/* dma buffer used for sending zero */
 int	zerodma;	/* dma buffer used for sending zero */
 
 
-typedef struct {
+typedef struct Iostats Iostats;
+struct Iostats {
 	ulong	totaldma;
 	ulong	totaldma;
 	ulong	idledma;
 	ulong	idledma;
 	ulong	faildma;
 	ulong	faildma;
 	ulong	samedma;
 	ulong	samedma;
 	ulong	empties;
 	ulong	empties;
-} iostats_t;
+};
 
 
 static struct
 static struct
 {
 {
 	ulong	bytes;
 	ulong	bytes;
-	iostats_t	rx, tx;
+	Iostats	rx, tx;
 } iostats;
 } iostats;
 
 
 static void setaudio(int in, int out, int left, int right, int value);
 static void setaudio(int in, int out, int left, int right, int value);

+ 1 - 1
sys/src/9/bitsy/etherwavelan.c

@@ -23,7 +23,7 @@ wavelanpcmciareset(Ether *ether)
 	ctlr->ctlrno = ether->ctlrno;
 	ctlr->ctlrno = ether->ctlrno;
 
 
 	if (ether->ports == nil){
 	if (ether->ports == nil){
-		ether->ports = malloc(sizeof(port_t));
+		ether->ports = malloc(sizeof(Devport));
 		ether->ports[0].port = 0;
 		ether->ports[0].port = 0;
 		ether->ports[0].size = 0;
 		ether->ports[0].size = 0;
 		ether->nports= 1;
 		ether->nports= 1;

+ 0 - 1
sys/src/9/bitsy/mkfile

@@ -18,7 +18,6 @@ PORT=\
 	edf.$O\
 	edf.$O\
 	fault.$O\
 	fault.$O\
 	latin1.$O\
 	latin1.$O\
-	mul64fract.$O\
 	rebootcmd.$O\
 	rebootcmd.$O\
 	page.$O\
 	page.$O\
 	parse.$O\
 	parse.$O\

+ 2 - 1
sys/src/9/mtx/dat.h

@@ -132,7 +132,8 @@ struct Mach
 	int	cputype;
 	int	cputype;
 	ulong	loopconst;
 	ulong	loopconst;
 
 
-	ulong	fairness;		/* for runproc */
+	Proc*	readied;		/* for runproc */
+	ulong	schedticks;	/* next forced context switch */
 
 
 	vlong	cpuhz;
 	vlong	cpuhz;
 	ulong	bushz;
 	ulong	bushz;

+ 1 - 1
sys/src/9/mtx/devether.c

@@ -249,7 +249,7 @@ etherwrite(Chan* chan, void* buf, long n, vlong)
 
 
 		if(n == sizeof("nonblocking")-1 && strncmp((char*)buf, "nonblocking", n) == 0){
 		if(n == sizeof("nonblocking")-1 && strncmp((char*)buf, "nonblocking", n) == 0){
 			qnoblock(ether->oq, 1);
 			qnoblock(ether->oq, 1);
-			return;
+			return n;
 		}
 		}
 
 
 		if(ether->ctl!=nil)
 		if(ether->ctl!=nil)

+ 0 - 1
sys/src/9/mtx/mkfile

@@ -19,7 +19,6 @@ PORT=\
 	fault.$O\
 	fault.$O\
 	latin1.$O\
 	latin1.$O\
 	log.$O\
 	log.$O\
-	mul64fract.$O\
 	rebootcmd.$O\
 	rebootcmd.$O\
 	page.$O\
 	page.$O\
 	parse.$O\
 	parse.$O\

+ 4 - 3
sys/src/9/pc/dat.h

@@ -170,7 +170,8 @@ struct Mach
 	void*	alarm;			/* alarms bound to this clock */
 	void*	alarm;			/* alarms bound to this clock */
 	int	inclockintr;
 	int	inclockintr;
 
 
-	ulong	fairness;		/* for runproc */
+	Proc*	readied;		/* for runproc */
+	ulong	schedticks;	/* next forced context switch */
 
 
 	int	tlbfault;
 	int	tlbfault;
 	int	tlbpurge;
 	int	tlbpurge;
@@ -284,12 +285,12 @@ extern Mach	*m;
 typedef struct {
 typedef struct {
 	ulong	port;	
 	ulong	port;	
 	int	size;
 	int	size;
-} port_t;
+} Devport;
 
 
 struct DevConf
 struct DevConf
 {
 {
 	ulong	intnum;			/* interrupt number */
 	ulong	intnum;			/* interrupt number */
 	char	*type;			/* card type, malloced */
 	char	*type;			/* card type, malloced */
 	int	nports;			/* Number of ports */
 	int	nports;			/* Number of ports */
-	port_t	*ports;			/* The ports themselves */
+	Devport	*ports;			/* The ports themselves */
 };
 };

+ 28 - 23
sys/src/9/pc/devpccard.c

@@ -45,11 +45,12 @@ enum {
 	TI1131xDC = 0x92,		// device control
 	TI1131xDC = 0x92,		// device control
 };
 };
 
 
-typedef struct {
-	ushort	r_vid;
-	ushort	r_did;
-	char		*r_name;
-} Variant;
+typedef struct Variant Variant;
+struct Variant {
+	ushort	vid;
+	ushort	did;
+	char		*name;
+};
 
 
 static Variant variant[] = {
 static Variant variant[] = {
 {	Ricoh_vid,	Ricoh_476_did,	"Ricoh 476 PCI/Cardbus bridge",	},
 {	Ricoh_vid,	Ricoh_476_did,	"Ricoh 476 PCI/Cardbus bridge",	},
@@ -196,14 +197,16 @@ enum
  *  important parameters like power
  *  important parameters like power
  */
  */
 /* cis memory walking */
 /* cis memory walking */
-typedef struct Cisdat {
+typedef struct Cisdat Cisdat;
+struct Cisdat {
 	uchar		*cisbase;
 	uchar		*cisbase;
 	int			cispos;
 	int			cispos;
 	int			cisskip;
 	int			cisskip;
 	int			cislen;
 	int			cislen;
-} Cisdat;
+};
 
 
-typedef struct {
+typedef struct Pcminfo Pcminfo;
+struct Pcminfo {
 	char			verstr[512];		/* Version string */
 	char			verstr[512];		/* Version string */
 	PCMmap		mmap[4];		/* maps, last is always for the kernel */
 	PCMmap		mmap[4];		/* maps, last is always for the kernel */
 	ulong		conf_addr;		/* Config address */
 	ulong		conf_addr;		/* Config address */
@@ -214,9 +217,10 @@ typedef struct {
 
 
 	int			port;			/* Actual port usage */
 	int			port;			/* Actual port usage */
 	int			irq;			/* Actual IRQ usage */
 	int			irq;			/* Actual IRQ usage */
-} Pcminfo;
+};
 
 
-typedef struct {
+typedef struct Cardbus Cardbus;
+struct Cardbus {
 	Lock;
 	Lock;
 	Variant		*variant;		/* Which CardBus chipset */
 	Variant		*variant;		/* Which CardBus chipset */
 	Pcidev		*pci;			/* The bridge itself */
 	Pcidev		*pci;			/* The bridge itself */
@@ -234,7 +238,7 @@ typedef struct {
 
 
 	int			refs;			/* Number of refs to slot */
 	int			refs;			/* Number of refs to slot */
 	Lock		refslock;		/* inc/dev ref lock */
 	Lock		refslock;		/* inc/dev ref lock */
-} Cardbus;
+};
 
 
 static int managerstarted;
 static int managerstarted;
 
 
@@ -408,13 +412,14 @@ qengine(Cardbus *cb, int message)
 	unlock(cb);
 	unlock(cb);
 }
 }
 
 
-typedef struct {
-	Cardbus	*e_cb;
-	int	e_message;
-} events_t;
+typedef struct Events Events;
+struct Events {
+	Cardbus	*cb;
+	int	message;
+};
 
 
 static Lock levents;
 static Lock levents;
-static events_t events[NUMEVENTS];
+static Events events[NUMEVENTS];
 static Rendez revents;
 static Rendez revents;
 static int nevents;
 static int nevents;
 
 
@@ -426,8 +431,8 @@ iengine(Cardbus *cb, int message)
 		return;
 		return;
 	}
 	}
 	ilock(&levents);
 	ilock(&levents);
-	events[nevents].e_cb = cb;
-	events[nevents].e_message = message;
+	events[nevents].cb = cb;
+	events[nevents].message = message;
 	nevents++;
 	nevents++;
 	iunlock(&levents);
 	iunlock(&levents);
 	wakeup(&revents);
 	wakeup(&revents);
@@ -452,11 +457,11 @@ processevents(void *)
 		message = 0;
 		message = 0;
 		ilock(&levents);
 		ilock(&levents);
 		if (nevents > 0) {
 		if (nevents > 0) {
-			cb = events[0].e_cb;
-			message = events[0].e_message;
+			cb = events[0].cb;
+			message = events[0].message;
 			nevents--;
 			nevents--;
 			if (nevents > 0)
 			if (nevents > 0)
-				memmove(events, &events[1], nevents * sizeof(events_t));
+				memmove(events, &events[1], nevents * sizeof(Events));
 		}
 		}
 		iunlock(&levents);
 		iunlock(&levents);
 
 
@@ -533,7 +538,7 @@ devpccardlink(void)
 		uchar pin;
 		uchar pin;
 
 
 		for (i = 0; i != nelem(variant); i++)
 		for (i = 0; i != nelem(variant); i++)
-			if (pci->vid == variant[i].r_vid && pci->did == variant[i].r_did)
+			if (pci->vid == variant[i].vid && pci->did == variant[i].did)
 				break;
 				break;
 		if (i == nelem(variant))
 		if (i == nelem(variant))
 			continue;
 			continue;
@@ -630,7 +635,7 @@ devpccardlink(void)
 		i82365probe(cb, LegacyAddr, LegacyAddr + 1);
 		i82365probe(cb, LegacyAddr, LegacyAddr + 1);
 
 
 		print("#Y%ld: %s, %.8ulX intl %d\n", cb - cbslots, 
 		print("#Y%ld: %s, %.8ulX intl %d\n", cb - cbslots, 
-			 variant[i].r_name, baddr, pci->intl);
+			 variant[i].name, baddr, pci->intl);
 	}
 	}
 
 
 	if (nslots == 0){
 	if (nslots == 0){

+ 15 - 10
sys/src/9/pc/devtv.c

@@ -245,13 +245,15 @@ enum {
 
 
 };
 };
 
 
-typedef struct {
+typedef struct Variant Variant;
+struct Variant {
 	ushort		vid;
 	ushort		vid;
 	ushort		did;
 	ushort		did;
 	char			*name;
 	char			*name;
-} Variant;
+};
 
 
-typedef struct {
+typedef struct Bt848 Bt848;
+struct Bt848 {
 	ulong	devstat;		// 000
 	ulong	devstat;		// 000
 	ulong	iform;		// 004
 	ulong	iform;		// 004
 	ulong	tdec;			// 008
 	ulong	tdec;			// 008
@@ -320,11 +322,12 @@ typedef struct {
 	ulong	risccount;		// 120
 	ulong	risccount;		// 120
 	ulong	pad8[55];		// 124-1FC	
 	ulong	pad8[55];		// 124-1FC	
 	ulong	gpiodata[64];	// 200-2FC
 	ulong	gpiodata[64];	// 200-2FC
-} Bt848;
+};
 
 
 #define packetlen	i2c
 #define packetlen	i2c
 
 
-typedef struct {
+typedef struct Tuner Tuner;
+struct Tuner {
 	char		*name;
 	char		*name;
   	ushort	freq_vhfh;	// Start frequency
   	ushort	freq_vhfh;	// Start frequency
 	ushort	freq_uhf;  
 	ushort	freq_uhf;  
@@ -333,15 +336,17 @@ typedef struct {
 	uchar	UHF;
 	uchar	UHF;
 	uchar	cfg; 
 	uchar	cfg; 
 	ushort	offs;
 	ushort	offs;
-} Tuner;
+};
 
 
-typedef struct {
+typedef struct Frame Frame;
+struct Frame {
 	ulong	*fstart;
 	ulong	*fstart;
 	ulong	*fjmp;
 	ulong	*fjmp;
 	uchar	*fbase;
 	uchar	*fbase;
-} Frame;
+};
 
 
-typedef struct {
+typedef struct Tv Tv;
+struct Tv {
 	Lock;
 	Lock;
 	Rendez;
 	Rendez;
 	Bt848	*bt848;
 	Bt848	*bt848;
@@ -377,7 +382,7 @@ typedef struct {
 	uchar	aleft, aright;		// Left and right audio volume
 	uchar	aleft, aright;		// Left and right audio volume
 	ulong	kfirclock;
 	ulong	kfirclock;
 	Ref		aref;				// Copying audio?
 	Ref		aref;				// Copying audio?
-} Tv;
+};
 
 
 enum {
 enum {
 	TemicPAL = 0,
 	TemicPAL = 0,

+ 6 - 4
sys/src/9/pc/ether79c970.c

@@ -66,7 +66,8 @@ enum {					/* CSR15 */
 	Prom		= 0x8000,	/* promiscuous mode */
 	Prom		= 0x8000,	/* promiscuous mode */
 };
 };
 
 
-typedef struct {			/* Initialisation Block */
+typedef struct Iblock Iblock;
+struct Iblock {			/* Initialisation Block */
 	ushort	mode;
 	ushort	mode;
 	uchar	rlen;			/* upper 4 bits */
 	uchar	rlen;			/* upper 4 bits */
 	uchar	tlen;			/* upper 4 bits */
 	uchar	tlen;			/* upper 4 bits */
@@ -75,14 +76,15 @@ typedef struct {			/* Initialisation Block */
 	uchar	ladr[8];
 	uchar	ladr[8];
 	ulong	rdra;
 	ulong	rdra;
 	ulong	tdra;
 	ulong	tdra;
-} Iblock;
+};
 
 
-typedef struct {			/* descriptor ring entry */
+typedef struct Dre Dre;
+struct Dre {			/* descriptor ring entry */
 	ulong	addr;
 	ulong	addr;
 	ulong	md1;			/* status|bcnt */
 	ulong	md1;			/* status|bcnt */
 	ulong	md2;			/* rcc|rpc|mcnt */
 	ulong	md2;			/* rcc|rpc|mcnt */
 	Block*	bp;
 	Block*	bp;
-} Dre;
+};
 
 
 enum {					/* md1 */
 enum {					/* md1 */
 	Enp		= 0x01000000,	/* end of packet */
 	Enp		= 0x01000000,	/* end of packet */

+ 3 - 2
sys/src/9/pc/ether8139.c

@@ -145,12 +145,13 @@ enum {					/* Media Status Register */
 	Txfce		= 0x80,		/* Transmit Flow Control Enable */
 	Txfce		= 0x80,		/* Transmit Flow Control Enable */
 };
 };
 
 
-typedef struct {			/* Soft Transmit Descriptor */
+typedef struct Td Td;
+struct Td {			/* Soft Transmit Descriptor */
 	int	tsd;
 	int	tsd;
 	int	tsad;
 	int	tsad;
 	uchar*	data;
 	uchar*	data;
 	Block*	bp;
 	Block*	bp;
-} Td;
+};
 
 
 enum {					/* Tsd0 */
 enum {					/* Tsd0 */
 	SizeSHIFT	= 0,		/* Descriptor Size */
 	SizeSHIFT	= 0,		/* Descriptor Size */

+ 3 - 2
sys/src/9/pc/ether8390.c

@@ -138,12 +138,13 @@ enum {					/* Rsr */
 	Dfr		= 0x80,		/* deferring */
 	Dfr		= 0x80,		/* deferring */
 };
 };
 
 
-typedef struct {
+typedef struct Hdr Hdr;
+struct Hdr {
 	uchar	status;
 	uchar	status;
 	uchar	next;
 	uchar	next;
 	uchar	len0;
 	uchar	len0;
 	uchar	len1;
 	uchar	len1;
-} Hdr;
+};
 
 
 void
 void
 dp8390getea(Ether* ether, uchar* ea)
 dp8390getea(Ether* ether, uchar* ea)

+ 3 - 2
sys/src/9/pc/etherigbe.c

@@ -359,7 +359,8 @@ enum {					/* Rd errors */
 	Rxe		= 0x80,		/* RX Data Error */
 	Rxe		= 0x80,		/* RX Data Error */
 };
 };
 
 
-typedef struct {			/* Transmit Descriptor */
+typedef struct Td Td;
+struct Td {			/* Transmit Descriptor */
 	union {
 	union {
 		uint	addr[2];	/* Data */
 		uint	addr[2];	/* Data */
 		struct {		/* Context */
 		struct {		/* Context */
@@ -373,7 +374,7 @@ typedef struct {			/* Transmit Descriptor */
 	};
 	};
 	uint	control;
 	uint	control;
 	uint	status;
 	uint	status;
-} Td;
+};
 
 
 enum {					/* Td control */
 enum {					/* Td control */
 	LenMASK		= 0x000FFFFF,	/* Data/Packet Length Field */
 	LenMASK		= 0x000FFFFF,	/* Data/Packet Length Field */

+ 3 - 2
sys/src/9/pc/ethersmc.c

@@ -210,7 +210,8 @@ enum {
 	PageSize	= 256,		/* page length */
 	PageSize	= 256,		/* page length */
 };
 };
 
 
-typedef struct {
+typedef struct Smc91xx Smc91xx;
+struct Smc91xx {
 	Lock;
 	Lock;
 	ushort rev;
 	ushort rev;
 	int attached;
 	int attached;
@@ -224,7 +225,7 @@ typedef struct {
 	ulong mcol;
 	ulong mcol;
 	ulong lcol;
 	ulong lcol;
 	ulong dfr;
 	ulong dfr;
-} Smc91xx;
+};
 
 
 #define SELECT_BANK(x) outs(port + BankSelect, x)
 #define SELECT_BANK(x) outs(port + BankSelect, x)
 
 

+ 4 - 3
sys/src/9/pc/i8253.c

@@ -57,7 +57,8 @@ enum
 	MinPeriod=Freq/(100*HZ),
 	MinPeriod=Freq/(100*HZ),
 };
 };
 
 
-static struct
+typedef struct I8253 I8253;
+struct I8253
 {
 {
 	Lock;
 	Lock;
 	ulong	period;		/* current clock period */
 	ulong	period;		/* current clock period */
@@ -68,7 +69,8 @@ static struct
 	uvlong	ticks;		/* cumulative ticks of counter 1 */
 	uvlong	ticks;		/* cumulative ticks of counter 1 */
 
 
 	ulong	periodset;
 	ulong	periodset;
-}i8253;
+};
+I8253 i8253;
 
 
 
 
 void
 void
@@ -165,7 +167,6 @@ guesscpuhz(int aalcycles)
 	m->loopconst = (cpufreq/1000)/aalcycles;	/* AAM+LOOP's for 1 ms */
 	m->loopconst = (cpufreq/1000)/aalcycles;	/* AAM+LOOP's for 1 ms */
 
 
 	if(m->havetsc){
 	if(m->havetsc){
-
 		/* counter goes up by 2*Freq */
 		/* counter goes up by 2*Freq */
 		b = (b-a)<<1;
 		b = (b-a)<<1;
 		b *= Freq;
 		b *= Freq;

+ 6 - 4
sys/src/9/pc/memory.c

@@ -25,18 +25,20 @@ enum {
 	NMemBase	= 10,
 	NMemBase	= 10,
 };
 };
 
 
-typedef struct {
+typedef struct Map Map;
+struct Map {
 	int	size;
 	int	size;
 	ulong	addr;
 	ulong	addr;
-} Map;
+};
 
 
-typedef struct {
+typedef struct RMap RMap;
+struct RMap {
 	char*	name;
 	char*	name;
 	Map*	map;
 	Map*	map;
 	Map*	mapend;
 	Map*	mapend;
 
 
 	Lock;
 	Lock;
-} RMap;
+};
 
 
 static Map mapupa[16];
 static Map mapupa[16];
 static RMap rmapupa = {
 static RMap rmapupa = {

+ 68 - 65
sys/src/9/pc/pci.c

@@ -505,7 +505,7 @@ pciscan(int bno, Pcidev **list)
 }
 }
 
 
 static uchar 
 static uchar 
-pIIx_get(Pcidev *router, uchar link)
+pIIxget(Pcidev *router, uchar link)
 {
 {
 	uchar pirq;
 	uchar pirq;
 
 
@@ -515,13 +515,13 @@ pIIx_get(Pcidev *router, uchar link)
 }
 }
 
 
 static void 
 static void 
-pIIx_set(Pcidev *router, uchar link, uchar irq)
+pIIxset(Pcidev *router, uchar link, uchar irq)
 {
 {
 	pcicfgw8(router, link, irq);
 	pcicfgw8(router, link, irq);
 }
 }
 
 
 static uchar 
 static uchar 
-via_get(Pcidev *router, uchar link)
+viaget(Pcidev *router, uchar link)
 {
 {
 	uchar pirq;
 	uchar pirq;
 
 
@@ -532,7 +532,7 @@ via_get(Pcidev *router, uchar link)
 }
 }
 
 
 static void 
 static void 
-via_set(Pcidev *router, uchar link, uchar irq)
+viaset(Pcidev *router, uchar link, uchar irq)
 {
 {
 	uchar pirq;
 	uchar pirq;
 
 
@@ -543,7 +543,7 @@ via_set(Pcidev *router, uchar link, uchar irq)
 }
 }
 
 
 static uchar 
 static uchar 
-opti_get(Pcidev *router, uchar link)
+optiget(Pcidev *router, uchar link)
 {
 {
 	uchar pirq = 0;
 	uchar pirq = 0;
 
 
@@ -554,7 +554,7 @@ opti_get(Pcidev *router, uchar link)
 }
 }
 
 
 static void 
 static void 
-opti_set(Pcidev *router, uchar link, uchar irq)
+optiset(Pcidev *router, uchar link, uchar irq)
 {
 {
 	uchar pirq;
 	uchar pirq;
 
 
@@ -565,7 +565,7 @@ opti_set(Pcidev *router, uchar link, uchar irq)
 }
 }
 
 
 static uchar 
 static uchar 
-ali_get(Pcidev *router, uchar link)
+aliget(Pcidev *router, uchar link)
 {
 {
 	/* No, you're not dreaming */
 	/* No, you're not dreaming */
 	static const uchar map[] = { 0, 9, 3, 10, 4, 5, 7, 6, 1, 11, 0, 12, 0, 14, 0, 15 };
 	static const uchar map[] = { 0, 9, 3, 10, 4, 5, 7, 6, 1, 11, 0, 12, 0, 14, 0, 15 };
@@ -577,9 +577,9 @@ ali_get(Pcidev *router, uchar link)
 }
 }
 
 
 static void 
 static void 
-ali_set(Pcidev *router, uchar link, uchar irq)
+aliset(Pcidev *router, uchar link, uchar irq)
 {
 {
-	/* Inverse of map in ali_get */
+	/* Inverse of map in aliget */
 	static const uchar map[] = { 0, 8, 0, 2, 4, 5, 7, 6, 0, 1, 3, 9, 11, 0, 13, 15 };
 	static const uchar map[] = { 0, 8, 0, 2, 4, 5, 7, 6, 0, 1, 3, 9, 11, 0, 13, 15 };
 	uchar pirq;
 	uchar pirq;
 
 
@@ -590,7 +590,7 @@ ali_set(Pcidev *router, uchar link, uchar irq)
 }
 }
 
 
 static uchar 
 static uchar 
-cyrix_get(Pcidev *router, uchar link)
+cyrixget(Pcidev *router, uchar link)
 {
 {
 	uchar pirq;
 	uchar pirq;
 
 
@@ -600,7 +600,7 @@ cyrix_get(Pcidev *router, uchar link)
 }
 }
 
 
 static void 
 static void 
-cyrix_set(Pcidev *router, uchar link, uchar irq)
+cyrixset(Pcidev *router, uchar link, uchar irq)
 {
 {
 	uchar pirq;
 	uchar pirq;
 
 
@@ -610,63 +610,66 @@ cyrix_set(Pcidev *router, uchar link, uchar irq)
 	pcicfgw8(router, 0x5c + (link>>1), pirq);
 	pcicfgw8(router, 0x5c + (link>>1), pirq);
 }
 }
 
 
-typedef struct
+typedef struct Bridge Bridge;
+struct Bridge
 {
 {
 	ushort	vid;
 	ushort	vid;
 	ushort	did;
 	ushort	did;
 	uchar	(*get)(Pcidev *, uchar);
 	uchar	(*get)(Pcidev *, uchar);
 	void	(*set)(Pcidev *, uchar, uchar);	
 	void	(*set)(Pcidev *, uchar, uchar);	
-} bridge_t;
-
-static bridge_t southbridges[] = {
-	{ 0x8086, 0x122e, pIIx_get, pIIx_set },	// Intel 82371FB
-	{ 0x8086, 0x1234, pIIx_get, pIIx_set },	// Intel 82371MX
-	{ 0x8086, 0x7000, pIIx_get, pIIx_set },	// Intel 82371SB
-	{ 0x8086, 0x7110, pIIx_get, pIIx_set },	// Intel 82371AB
-	{ 0x8086, 0x7198, pIIx_get, pIIx_set },	// Intel 82443MX (fn 1)
-	{ 0x8086, 0x2410, pIIx_get, pIIx_set },	// Intel 82801AA
-	{ 0x8086, 0x2420, pIIx_get, pIIx_set },	// Intel 82801AB
-	{ 0x8086, 0x2440, pIIx_get, pIIx_set },	// Intel 82801BA
-	{ 0x8086, 0x244c, pIIx_get, pIIx_set },	// Intel 82801BAM
-	{ 0x1106, 0x0586, via_get, via_set },	// Viatech 82C586
-	{ 0x1106, 0x0596, via_get, via_set },	// Viatech 82C596
-	{ 0x1106, 0x0686, via_get, via_set },	// Viatech 82C686
-	{ 0x1045, 0xc700, opti_get, opti_set },	// Opti 82C700
-	{ 0x10b9, 0x1533, ali_get, ali_set },	// Al M1533
-	{ 0x1039, 0x0008, pIIx_get, pIIx_set },	// SI 503
-	{ 0x1039, 0x0496, pIIx_get, pIIx_set },	// SI 496
-	{ 0x1078, 0x0100, cyrix_get, cyrix_set }	// Cyrix 5530 Legacy
 };
 };
 
 
-typedef struct {
-	uchar	e_bus;			// Pci bus number
-	uchar	e_dev;			// Pci device number
-	uchar	e_maps[12];		// Avoid structs!  Link and mask.
-	uchar	e_slot;			// Add-in/built-in slot
-	uchar	e_reserved;
-} slot_t;
-
-typedef struct {
-	uchar	rt_signature[4];	// Routing table signature
-	uchar	rt_version[2];		// Version number
-	uchar	rt_size[2];			// Total table size
-	uchar	rt_bus;			// Interrupt router bus number
-	uchar	rt_devfn;			// Router's devfunc
-	uchar	rt_pciirqs[2];		// Exclusive PCI irqs
-	uchar	rt_compat[4];		// Compatible PCI interrupt router
-	uchar	rt_miniport[4];		// Miniport data
-	uchar	rt_reserved[11];
-	uchar	rt_checksum;
-} router_t;
+static Bridge southbridges[] = {
+	{ 0x8086, 0x122e, pIIxget, pIIxset },	// Intel 82371FB
+	{ 0x8086, 0x1234, pIIxget, pIIxset },	// Intel 82371MX
+	{ 0x8086, 0x7000, pIIxget, pIIxset },	// Intel 82371SB
+	{ 0x8086, 0x7110, pIIxget, pIIxset },	// Intel 82371AB
+	{ 0x8086, 0x7198, pIIxget, pIIxset },	// Intel 82443MX (fn 1)
+	{ 0x8086, 0x2410, pIIxget, pIIxset },	// Intel 82801AA
+	{ 0x8086, 0x2420, pIIxget, pIIxset },	// Intel 82801AB
+	{ 0x8086, 0x2440, pIIxget, pIIxset },	// Intel 82801BA
+	{ 0x8086, 0x244c, pIIxget, pIIxset },	// Intel 82801BAM
+	{ 0x1106, 0x0586, viaget, viaset },	// Viatech 82C586
+	{ 0x1106, 0x0596, viaget, viaset },	// Viatech 82C596
+	{ 0x1106, 0x0686, viaget, viaset },	// Viatech 82C686
+	{ 0x1045, 0xc700, optiget, optiset },	// Opti 82C700
+	{ 0x10b9, 0x1533, aliget, aliset },	// Al M1533
+	{ 0x1039, 0x0008, pIIxget, pIIxset },	// SI 503
+	{ 0x1039, 0x0496, pIIxget, pIIxset },	// SI 496
+	{ 0x1078, 0x0100, cyrixget, cyrixset }	// Cyrix 5530 Legacy
+};
+
+typedef struct Slot Slot;
+struct Slot {
+	uchar	bus;			// Pci bus number
+	uchar	dev;			// Pci device number
+	uchar	maps[12];		// Avoid structs!  Link and mask.
+	uchar	slot;			// Add-in/built-in slot
+	uchar	reserved;
+};
+
+typedef struct Router Router;
+struct Router {
+	uchar	signature[4];	// Routing table signature
+	uchar	version[2];		// Version number
+	uchar	size[2];			// Total table size
+	uchar	bus;			// Interrupt router bus number
+	uchar	devfn;			// Router's devfunc
+	uchar	pciirqs[2];		// Exclusive PCI irqs
+	uchar	compat[4];		// Compatible PCI interrupt router
+	uchar	miniport[4];		// Miniport data
+	uchar	reserved[11];
+	uchar	checksum;
+};
 
 
 static ushort pciirqs;			// Exclusive PCI irqs
 static ushort pciirqs;			// Exclusive PCI irqs
-static bridge_t *southbridge;	// Which southbridge to use.
+static Bridge *southbridge;	// Which southbridge to use.
 
 
 static void
 static void
 pcirouting(void)
 pcirouting(void)
 {
 {
-	slot_t *e;
-	router_t *r;
+	Slot *e;
+	Router *r;
 	int size, i, fn, tbdf;
 	int size, i, fn, tbdf;
 	Pcidev *sbpci, *pci;
 	Pcidev *sbpci, *pci;
 	uchar *p, *m, pin, irq, link;
 	uchar *p, *m, pin, irq, link;
@@ -679,12 +682,12 @@ pcirouting(void)
 	if(p >= (uchar *)KADDR(0xfffff))
 	if(p >= (uchar *)KADDR(0xfffff))
 		return;
 		return;
 
 
-	r = (router_t *)p;
+	r = (Router *)p;
 
 
 	// print("PCI interrupt routing table version %d.%d at %.6uX\n",
 	// print("PCI interrupt routing table version %d.%d at %.6uX\n",
-	// 	r->rt_version[0], r->rt_version[1], (ulong)r & 0xfffff);
+	// 	r->version[0], r->version[1], (ulong)r & 0xfffff);
 
 
-	tbdf = (BusPCI << 24)|(r->rt_bus << 16)|(r->rt_devfn << 8);
+	tbdf = (BusPCI << 24)|(r->bus << 16)|(r->devfn << 8);
 	sbpci = pcimatchtbdf(tbdf);
 	sbpci = pcimatchtbdf(tbdf);
 	if(sbpci == nil) {
 	if(sbpci == nil) {
 		print("pcirouting: Cannot find south bridge %T\n", tbdf);
 		print("pcirouting: Cannot find south bridge %T\n", tbdf);
@@ -701,20 +704,20 @@ pcirouting(void)
 	}
 	}
 	southbridge = &southbridges[i];
 	southbridge = &southbridges[i];
 
 
-	pciirqs = (r->rt_pciirqs[1] << 8)|r->rt_pciirqs[0];
+	pciirqs = (r->pciirqs[1] << 8)|r->pciirqs[0];
 
 
-	size = (r->rt_size[1] << 8)|r->rt_size[0];
-	for(e = (slot_t *)&r[1]; (uchar *)e < p + size; e++) {
-		// print("%.2uX/%.2uX %.2uX: ", e->e_bus, e->e_dev, e->e_slot);
+	size = (r->size[1] << 8)|r->size[0];
+	for(e = (Slot *)&r[1]; (uchar *)e < p + size; e++) {
+		// print("%.2uX/%.2uX %.2uX: ", e->bus, e->dev, e->slot);
 		// for (i = 0; i != 4; i++) {
 		// for (i = 0; i != 4; i++) {
-		// 	uchar *m = &e->e_maps[i * 3];
+		// 	uchar *m = &e->maps[i * 3];
 		// 	print("[%d] %.2uX %.4uX ",
 		// 	print("[%d] %.2uX %.4uX ",
 		// 		i, m[0], (m[2] << 8)|m[1]);
 		// 		i, m[0], (m[2] << 8)|m[1]);
 		// }
 		// }
 		// print("\n");
 		// print("\n");
 
 
 		for(fn = 0; fn != 8; fn++) {
 		for(fn = 0; fn != 8; fn++) {
-			tbdf = (BusPCI << 24)|(e->e_bus << 16)|((e->e_dev | fn) << 8);
+			tbdf = (BusPCI << 24)|(e->bus << 16)|((e->dev | fn) << 8);
 			pci = pcimatchtbdf(tbdf);
 			pci = pcimatchtbdf(tbdf);
 			if(pci == nil)
 			if(pci == nil)
 				continue;
 				continue;
@@ -722,7 +725,7 @@ pcirouting(void)
 			if(pin == 0 || pin == 0xff) 
 			if(pin == 0 || pin == 0xff) 
 				continue;
 				continue;
 
 
-			m = &e->e_maps[(pin - 1) * 3];
+			m = &e->maps[(pin - 1) * 3];
 			link = m[0];
 			link = m[0];
 			irq = southbridge->get(sbpci, link);
 			irq = southbridge->get(sbpci, link);
 			if(irq == 0 || irq == pci->intl)
 			if(irq == 0 || irq == pci->intl)

+ 4 - 1
sys/src/9/pc/sdata.c

@@ -1821,7 +1821,9 @@ atapnp(void)
 		 * 2) put 0 in the programming interface byte (probably
 		 * 2) put 0 in the programming interface byte (probably
 		 *    as a consequence of 1) above).
 		 *    as a consequence of 1) above).
 		 */
 		 */
-		if(p->ccrb != 0x01 || (p->ccru != 0x01 && p->ccru != 0x80))
+		if(p->ccrb != 0x01)
+			continue;
+		if(p->ccru != 0x01 && p->ccru != 0x04 && p->ccru != 0x80)
 			continue;
 			continue;
 		pi = p->ccrp;
 		pi = p->ccrp;
 		ispc87415 = 0;
 		ispc87415 = 0;
@@ -1852,6 +1854,7 @@ atapnp(void)
 		case (0x4D30<<16)|0x105A:	/* Promise PDC202xx */
 		case (0x4D30<<16)|0x105A:	/* Promise PDC202xx */
 		case (0x4D68<<16)|0x105A:	/* Promise PDC20268 */
 		case (0x4D68<<16)|0x105A:	/* Promise PDC20268 */
 		case (0x3373<<16)|0x105A:	/* Promise 20378 RAID */
 		case (0x3373<<16)|0x105A:	/* Promise 20378 RAID */
+		case (0x3149<<16)|0x1106:	/* VIA 8237 */
 			pi = 0x85;
 			pi = 0x85;
 			break;
 			break;
 		case (0x0004<<16)|0x1103:	/* HighPoint HPT-370 */
 		case (0x0004<<16)|0x1103:	/* HighPoint HPT-370 */

+ 9 - 6
sys/src/9/pc/sdmylex.c

@@ -72,18 +72,20 @@ enum {					/* Rinterrupt */
 	Intv		= 0x80,		/* Interrupt Valid */
 	Intv		= 0x80,		/* Interrupt Valid */
 };
 };
 
 
-typedef struct {
+typedef struct Mbox24 Mbox24;
+struct Mbox24 {
 	uchar	code;			/* action/completion code */
 	uchar	code;			/* action/completion code */
 	uchar	ccb[3];			/* CCB pointer (MSB, ..., LSB) */
 	uchar	ccb[3];			/* CCB pointer (MSB, ..., LSB) */
-} Mbox24;
+};
 
 
-typedef struct {
+typedef struct Mbox32 Mbox32;
+struct Mbox32 {
 	uchar	ccb[4];			/* CCB pointer (LSB, ..., MSB) */
 	uchar	ccb[4];			/* CCB pointer (LSB, ..., MSB) */
 	uchar	btstat;			/* BT-7[45]7[SD] status */
 	uchar	btstat;			/* BT-7[45]7[SD] status */
 	uchar	sdstat;			/* SCSI device status */
 	uchar	sdstat;			/* SCSI device status */
 	uchar	pad;
 	uchar	pad;
 	uchar	code;			/* action/completion code */
 	uchar	code;			/* action/completion code */
-} Mbox32;
+};
 
 
 enum {					/* mailbox commands */
 enum {					/* mailbox commands */
 	Mbfree		= 0x00,		/* Mailbox not in use */
 	Mbfree		= 0x00,		/* Mailbox not in use */
@@ -185,7 +187,8 @@ enum {					/* CCB control */
 	NoIntr		= 0x80,		/* No Interrupts */
 	NoIntr		= 0x80,		/* No Interrupts */
 };
 };
 
 
-typedef struct {
+typedef struct Ctlr Ctlr;
+struct Ctlr {
 	int	port;			/* I/O port */
 	int	port;			/* I/O port */
 	int	id;			/* adapter SCSI id */
 	int	id;			/* adapter SCSI id */
 	int	bus;			/* 24 or 32 -bit */
 	int	bus;			/* 24 or 32 -bit */
@@ -209,7 +212,7 @@ typedef struct {
 	Lock	cachelock;
 	Lock	cachelock;
 	Ccb*	ccb;			/* list of free Ccb's */
 	Ccb*	ccb;			/* list of free Ccb's */
 	Ccb**	cache;			/* last completed Ccb */
 	Ccb**	cache;			/* last completed Ccb */
-} Ctlr;
+};
 
 
 /*
 /*
  * The number of mailboxes should be a multiple of 8 (4 for Mbox32)
  * The number of mailboxes should be a multiple of 8 (4 for Mbox32)

+ 3 - 2
sys/src/9/pc/vga3dfx.c

@@ -12,13 +12,14 @@
 #include <cursor.h>
 #include <cursor.h>
 #include "screen.h"
 #include "screen.h"
 
 
-typedef struct {
+typedef struct Cursor3dfx Cursor3dfx;
+struct Cursor3dfx {
 	int	vidProcCfg;
 	int	vidProcCfg;
 	int	hwCurPatAddr;
 	int	hwCurPatAddr;
 	int	hwCurLoc;
 	int	hwCurLoc;
 	int	hwCurC0;
 	int	hwCurC0;
 	int	hwCurC1;
 	int	hwCurC1;
-} Cursor3dfx;
+};
 
 
 enum {
 enum {
 	dramInit0	= 0x18,
 	dramInit0	= 0x18,

+ 3 - 2
sys/src/9/pc/vgaclgd546x.c

@@ -12,13 +12,14 @@
 #include <cursor.h>
 #include <cursor.h>
 #include "screen.h"
 #include "screen.h"
 
 
-typedef struct {
+typedef struct Cursor546x Cursor546x;
+struct Cursor546x {
 	ushort	x;
 	ushort	x;
 	ushort	y;
 	ushort	y;
 	ushort	preset;
 	ushort	preset;
 	ushort	enable;
 	ushort	enable;
 	ushort	addr;
 	ushort	addr;
-} Cursor546x;
+};
 
 
 enum {
 enum {
 	PaletteState	= 0xB0,
 	PaletteState	= 0xB0,

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

@@ -105,19 +105,20 @@ enum {
 /*
 /*
  * ATI Mach64(CT|ET|G*|V*|L*).
  * ATI Mach64(CT|ET|G*|V*|L*).
  */
  */
-typedef struct {
+typedef struct Mach64types Mach64types;
+struct Mach64types {
 	ushort 	m64_id;			/* Chip ID */
 	ushort 	m64_id;			/* Chip ID */
 	int 		m64_vtgt;		/* Is this a VT or GT chipset? */
 	int 		m64_vtgt;		/* Is this a VT or GT chipset? */
 	ulong	m64_ovlclock;		/* Max. overlay clock frequency */
 	ulong	m64_ovlclock;		/* Max. overlay clock frequency */
 	int		m64_pro;			/* Is this a PRO? */
 	int		m64_pro;			/* Is this a PRO? */
-} mach64types;
+};
 
 
 static ulong mach64refclock;
 static ulong mach64refclock;
-static mach64types *mach64type;
+static Mach64types *mach64type;
 static int mach64revb;			/* Revision B or greater? */
 static int mach64revb;			/* Revision B or greater? */
 static ulong mach64overlay;		/* Overlay buffer */
 static ulong mach64overlay;		/* Overlay buffer */
 
 
-static mach64types mach64s[] = {
+static Mach64types mach64s[] = {
 	('C'<<8)|'T',	0,	1350000, /*?*/	0,	/* 4354: CT */
 	('C'<<8)|'T',	0,	1350000, /*?*/	0,	/* 4354: CT */
 	('E'<<8)|'T',	0,	1350000, /*?*/	0,	/* 4554: ET */
 	('E'<<8)|'T',	0,	1350000, /*?*/	0,	/* 4554: ET */
 	('G'<<8)|'B',	1,	1250000,		1, 	/* 4742: 264GT PRO */
 	('G'<<8)|'B',	1,	1250000,		1, 	/* 4742: 264GT PRO */
@@ -658,6 +659,7 @@ static void
 waitforfifo(VGAscr *scr, int entries)
 waitforfifo(VGAscr *scr, int entries)
 {
 {
 	int x;
 	int x;
+
 	x = 0;
 	x = 0;
 	while((ior32(scr, FifoStat)&0xFF) > (0x8000>>entries) && x++ < 1000000)
 	while((ior32(scr, FifoStat)&0xFF) > (0x8000>>entries) && x++ < 1000000)
 		;
 		;
@@ -669,6 +671,7 @@ static void
 waitforidle(VGAscr *scr)
 waitforidle(VGAscr *scr)
 {
 {
 	int x;
 	int x;
+
 	waitforfifo(scr, 16);
 	waitforfifo(scr, 16);
 	x = 0;
 	x = 0;
 	while((ior32(scr, GuiStat)&1) && x++ < 1000000)
 	while((ior32(scr, GuiStat)&1) && x++ < 1000000)

+ 3 - 2
sys/src/9/pc/vganeomagic.c

@@ -12,14 +12,15 @@
 #include <cursor.h>
 #include <cursor.h>
 #include "screen.h"
 #include "screen.h"
 
 
-typedef struct {
+typedef struct CursorNM CursorNM;
+struct CursorNM {
 	int	enable;
 	int	enable;
 	int	x;
 	int	x;
 	int	y;
 	int	y;
 	int	colour1;
 	int	colour1;
 	int	colour2;
 	int	colour2;
 	int	addr;
 	int	addr;
-} CursorNM;
+};
 
 
 static ulong
 static ulong
 neomagiclinear(VGAscr* scr, int* size, int* align)
 neomagiclinear(VGAscr* scr, int* size, int* align)

+ 79 - 78
sys/src/9/port/devsd.c

@@ -15,12 +15,12 @@
 extern Dev sddevtab;
 extern Dev sddevtab;
 extern SDifc* sdifc[];
 extern SDifc* sdifc[];
 
 
-typedef struct {
-	SDev*	dt_dev;
-	int	dt_nunits;		/* num units in dev */
-} dev_t;
+typedef struct SDevgrp {
+	SDev*	dev;
+	int	nunits;		/* num units in dev */
+} SDevgrp;
 
 
-static dev_t* devs;			/* all devices */
+static SDevgrp* devs;			/* all devices */
 static QLock devslock;			/* insertion and removal of devices */
 static QLock devslock;			/* insertion and removal of devices */
 static int ndevs;			/* total number of devices in the system */
 static int ndevs;			/* total number of devices in the system */
 
 
@@ -229,13 +229,13 @@ sdgetdev(int idno)
 
 
 	qlock(&devslock);
 	qlock(&devslock);
 	for(i = 0; i != ndevs; i++)
 	for(i = 0; i != ndevs; i++)
-		if(devs[i].dt_dev->idno == idno)
+		if(devs[i].dev->idno == idno)
 			break;
 			break;
 	
 	
 	if(i == ndevs)
 	if(i == ndevs)
 		sdev = nil;
 		sdev = nil;
 	else{
 	else{
-		sdev = devs[i].dt_dev;
+		sdev = devs[i].dev;
 		incref(&sdev->r);
 		incref(&sdev->r);
 	}
 	}
 	qunlock(&devslock);
 	qunlock(&devslock);
@@ -359,14 +359,14 @@ sdreset(void)
 	  * The IDs have been set, unlink the sdlist and copy the spec to
 	  * The IDs have been set, unlink the sdlist and copy the spec to
 	  * the devtab.
 	  * the devtab.
 	  */
 	  */
-	devs = (dev_t*)malloc(ndevs * sizeof(dev_t));
-	memset(devs, 0, ndevs * sizeof(dev_t));
+	devs = (SDevgrp*)malloc(ndevs * sizeof(SDevgrp));
+	memset(devs, 0, ndevs * sizeof(SDevgrp));
 	i = 0;
 	i = 0;
 	while(sdlist != nil){
 	while(sdlist != nil){
-		devs[i].dt_dev = sdlist;
-		devs[i].dt_nunits = sdlist->nunit;
+		devs[i].dev = sdlist;
+		devs[i].nunits = sdlist->nunit;
 		sdlist = sdlist->next;
 		sdlist = sdlist->next;
-		devs[i].dt_dev->next = nil;
+		devs[i].dev->next = nil;
 		i++;
 		i++;
 	}
 	}
 }
 }
@@ -471,9 +471,9 @@ sdgen(Chan* c, char*, Dirtab*, int, int s, Dir* dp)
 
 
 		qlock(&devslock);
 		qlock(&devslock);
 		for(i = 0; i != ndevs; i++){
 		for(i = 0; i != ndevs; i++){
-			if(s < devs[i].dt_nunits)
+			if(s < devs[i].nunits)
 				break;
 				break;
-			s -= devs[i].dt_nunits;
+			s -= devs[i].nunits;
 		}
 		}
 		
 		
 		if(i == ndevs){
 		if(i == ndevs){
@@ -482,7 +482,7 @@ sdgen(Chan* c, char*, Dirtab*, int, int s, Dir* dp)
 			return -1;
 			return -1;
 		}
 		}
 
 
-		if((sdev = devs[i].dt_dev) == nil){
+		if((sdev = devs[i].dev) == nil){
 			qunlock(&devslock);
 			qunlock(&devslock);
 			return 0;
 			return 0;
 		}
 		}
@@ -604,7 +604,7 @@ sdattach(char* spec)
 
 
 	qlock(&devslock);
 	qlock(&devslock);
 	for (sdev = nil, i = 0; i != ndevs; i++)
 	for (sdev = nil, i = 0; i != ndevs; i++)
-		if((sdev = devs[i].dt_dev) != nil && sdev->idno == idno)
+		if((sdev = devs[i].dev) != nil && sdev->idno == idno)
 			break;
 			break;
 
 
 	if(i == ndevs || subno >= sdev->nunit || sdgetunit(sdev, subno) == nil){
 	if(i == ndevs || subno >= sdev->nunit || sdgetunit(sdev, subno) == nil){
@@ -887,7 +887,7 @@ sdread(Chan *c, void *a, long n, vlong off)
 		e = p + READSTR;
 		e = p + READSTR;
 		qlock(&devslock);
 		qlock(&devslock);
 		for(i = 0; i != ndevs; i++){
 		for(i = 0; i != ndevs; i++){
-			SDev *sdev = devs[i].dt_dev;
+			SDev *sdev = devs[i].dev;
 
 
 			if(sdev->ifc->stat)
 			if(sdev->ifc->stat)
 				p = sdev->ifc->stat(sdev, p, e);
 				p = sdev->ifc->stat(sdev, p, e);
@@ -978,39 +978,40 @@ sdread(Chan *c, void *a, long n, vlong off)
 	return 0;
 	return 0;
 }
 }
 
 
-typedef struct {
-	int	o_on;
-	char*	o_spec;
-	DevConf	o_cf;
-} confdata_t;
+typedef struct Confdata Confdata;
+struct Confdata {
+	int	on;
+	char*	spec;
+	DevConf	cf;
+};
 
 
 static void
 static void
-parse_switch(confdata_t* cd, char* option)
+parseswitch(Confdata* cd, char* option)
 {
 {
 	if(!strcmp("on", option))
 	if(!strcmp("on", option))
-		cd->o_on = 1;
+		cd->on = 1;
 	else if(!strcmp("off", option))
 	else if(!strcmp("off", option))
-		cd->o_on = 0;
+		cd->on = 0;
 	else
 	else
 		error(Ebadarg);
 		error(Ebadarg);
 }
 }
 
 
 static void
 static void
-parse_spec(confdata_t* cd, char* option)
+parsespec(Confdata* cd, char* option)
 {
 {
 	if(strlen(option) > 1) 
 	if(strlen(option) > 1) 
 		error(Ebadarg);
 		error(Ebadarg);
-	cd->o_spec = option;
+	cd->spec = option;
 }
 }
 
 
-static port_t*
+static Devport*
 getnewport(DevConf* dc)
 getnewport(DevConf* dc)
 {
 {
-	port_t *p;
+	Devport *p;
 
 
-	p = (port_t *)malloc((dc->nports + 1) * sizeof(port_t));
+	p = (Devport *)malloc((dc->nports + 1) * sizeof(Devport));
 	if(dc->nports > 0){
 	if(dc->nports > 0){
-		memmove(p, dc->ports, dc->nports * sizeof(port_t));
+		memmove(p, dc->ports, dc->nports * sizeof(Devport));
 		free(dc->ports);
 		free(dc->ports);
 	}
 	}
 	dc->ports = p;
 	dc->ports = p;
@@ -1021,61 +1022,61 @@ getnewport(DevConf* dc)
 }
 }
 
 
 static void
 static void
-parse_port(confdata_t* cd, char* option)
+parseport(Confdata* cd, char* option)
 {
 {
 	char *e;
 	char *e;
-	port_t *p;
+	Devport *p;
 
 
-	if(cd->o_cf.nports == 0 || cd->o_cf.ports[cd->o_cf.nports-1].port != (ulong)-1)
-		p = getnewport(&cd->o_cf);
+	if(cd->cf.nports == 0 || cd->cf.ports[cd->cf.nports-1].port != (ulong)-1)
+		p = getnewport(&cd->cf);
 	else
 	else
-		p = &cd->o_cf.ports[cd->o_cf.nports-1];
+		p = &cd->cf.ports[cd->cf.nports-1];
 	p->port = strtol(option, &e, 0);
 	p->port = strtol(option, &e, 0);
 	if(e == nil || *e != '\0')
 	if(e == nil || *e != '\0')
 		error(Ebadarg);
 		error(Ebadarg);
 }
 }
 
 
 static void
 static void
-parse_size(confdata_t* cd, char* option)
+parsesize(Confdata* cd, char* option)
 {
 {
 	char *e;
 	char *e;
-	port_t *p;
+	Devport *p;
 
 
-	if(cd->o_cf.nports == 0 || cd->o_cf.ports[cd->o_cf.nports-1].size != -1)
-		p = getnewport(&cd->o_cf);
+	if(cd->cf.nports == 0 || cd->cf.ports[cd->cf.nports-1].size != -1)
+		p = getnewport(&cd->cf);
 	else
 	else
-		p = &cd->o_cf.ports[cd->o_cf.nports-1];
+		p = &cd->cf.ports[cd->cf.nports-1];
 	p->size = (int)strtol(option, &e, 0);
 	p->size = (int)strtol(option, &e, 0);
 	if(e == nil || *e != '\0')
 	if(e == nil || *e != '\0')
 		error(Ebadarg);
 		error(Ebadarg);
 }
 }
 
 
 static void
 static void
-parse_irq(confdata_t* cd, char* option)
+parseirq(Confdata* cd, char* option)
 {
 {
 	char *e;
 	char *e;
 
 
-	cd->o_cf.intnum = strtoul(option, &e, 0);
+	cd->cf.intnum = strtoul(option, &e, 0);
 	if(e == nil || *e != '\0')
 	if(e == nil || *e != '\0')
 		error(Ebadarg);
 		error(Ebadarg);
 }
 }
 
 
 static void
 static void
-parse_type(confdata_t* cd, char* option)
+parsetype(Confdata* cd, char* option)
 {
 {
-	cd->o_cf.type = option;
+	cd->cf.type = option;
 }
 }
 
 
 static struct {
 static struct {
 	char	*option;
 	char	*option;
-	void	(*parse)(confdata_t*, char*);
+	void	(*parse)(Confdata*, char*);
 } options[] = {
 } options[] = {
-	{ 	"switch",	parse_switch,	},
-	{	"spec",		parse_spec,	},
-	{	"port",		parse_port,	},
-	{	"size",		parse_size,	},
-	{	"irq",		parse_irq,	},
-	{	"type",		parse_type,	},
+	{ 	"switch",	parseswitch,	},
+	{	"spec",		parsespec,	},
+	{	"port",		parseport,	},
+	{	"size",		parsesize,	},
+	{	"irq",		parseirq,	},
+	{	"type",		parsetype,	},
 };
 };
 
 
 static long
 static long
@@ -1091,18 +1092,18 @@ sdwrite(Chan* c, void* a, long n, vlong off)
 	default:
 	default:
 		error(Eperm);
 		error(Eperm);
 	case Qtopctl: {
 	case Qtopctl: {
-		confdata_t cd;
+		Confdata cd;
 		char buf[256], *field[Ncmd];
 		char buf[256], *field[Ncmd];
 		int nf, i, j;
 		int nf, i, j;
 
 
-		memset(&cd, 0, sizeof(confdata_t));
+		memset(&cd, 0, sizeof(Confdata));
 		if(n > sizeof(buf)-1) n = sizeof(buf)-1;
 		if(n > sizeof(buf)-1) n = sizeof(buf)-1;
 		memmove(buf, a, n);
 		memmove(buf, a, n);
 		buf[n] = '\0';
 		buf[n] = '\0';
 
 
-		cd.o_on = -1;
-		cd.o_spec = '\0';
-		memset(&cd.o_cf, 0, sizeof(DevConf));
+		cd.on = -1;
+		cd.spec = '\0';
+		memset(&cd.cf, 0, sizeof(DevConf));
 
 
 		nf = tokenize(buf, field, Ncmd);
 		nf = tokenize(buf, field, Ncmd);
 		for(i = 0; i < nf; i++){
 		for(i = 0; i < nf; i++){
@@ -1118,22 +1119,22 @@ sdwrite(Chan* c, void* a, long n, vlong off)
 			options[j].parse(&cd, field[i]);
 			options[j].parse(&cd, field[i]);
 		}
 		}
 
 
-		if(cd.o_on < 0) 
+		if(cd.on < 0) 
 			error(Ebadarg);
 			error(Ebadarg);
 
 
-		if(cd.o_on){
-			if(cd.o_spec == '\0' || cd.o_cf.nports == 0 || 
-			     cd.o_cf.intnum == 0 || cd.o_cf.type == nil)
+		if(cd.on){
+			if(cd.spec == '\0' || cd.cf.nports == 0 || 
+			     cd.cf.intnum == 0 || cd.cf.type == nil)
 				error(Ebadarg);
 				error(Ebadarg);
 		}
 		}
 		else{
 		else{
-			if(cd.o_spec == '\0')
+			if(cd.spec == '\0')
 				error(Ebadarg);
 				error(Ebadarg);
 		}
 		}
 
 
 		if(sddevtab.config == nil)
 		if(sddevtab.config == nil)
 			error("No configuration function");
 			error("No configuration function");
-		sddevtab.config(cd.o_on, cd.o_spec, &cd.o_cf);
+		sddevtab.config(cd.on, cd.spec, &cd.cf);
 		break;
 		break;
 	}
 	}
 	case Qctl:
 	case Qctl:
@@ -1300,7 +1301,7 @@ getspec(char base)
 		SDev *sdev;
 		SDev *sdev;
 
 
 		for(i = 0; i != ndevs; i++)
 		for(i = 0; i != ndevs; i++)
-			if((sdev = devs[i].dt_dev) != nil && (char)sdev->idno == base)
+			if((sdev = devs[i].dev) != nil && (char)sdev->idno == base)
 				break;
 				break;
 
 
 		if(i == ndevs)
 		if(i == ndevs)
@@ -1314,10 +1315,10 @@ static int
 configure(char* spec, DevConf* cf)
 configure(char* spec, DevConf* cf)
 {
 {
 	ISAConf isa;
 	ISAConf isa;
-	dev_t *_devs;
+	SDevgrp *tmpdevs;
 	SDev *tail, *sdev, *(*probe)(DevConf*);
 	SDev *tail, *sdev, *(*probe)(DevConf*);
 	char *p, name[32];
 	char *p, name[32];
-	int i, added_devs;
+	int i, nnew;
 
 
 	if((p = strchr(cf->type, '/')) != nil)
 	if((p = strchr(cf->type, '/')) != nil)
 		*p++ = '\0';
 		*p++ = '\0';
@@ -1350,7 +1351,7 @@ configure(char* spec, DevConf* cf)
 	}
 	}
 	
 	
 	for(i = 0; i != ndevs; i++)
 	for(i = 0; i != ndevs; i++)
-		if((sdev = devs[i].dt_dev) != nil && sdev->idno == *spec)
+		if((sdev = devs[i].dev) != nil && sdev->idno == *spec)
 			break;
 			break;
 	if(i != ndevs)
 	if(i != ndevs)
 		error(Eexist);
 		error(Eexist);
@@ -1359,17 +1360,17 @@ configure(char* spec, DevConf* cf)
 		error("Cannot probe controller");
 		error("Cannot probe controller");
 	poperror();
 	poperror();
 
 
-	added_devs = 0;
+	nnew = 0;
 	tail = sdev;
 	tail = sdev;
 	while(tail){
 	while(tail){
-		added_devs++;
+		nnew++;
 		tail = tail->next;
 		tail = tail->next;
 	}
 	}
 	
 	
-	_devs = (dev_t*)malloc((ndevs + added_devs) * sizeof(dev_t));
-	memmove(_devs, devs, ndevs * sizeof(dev_t));
+	tmpdevs = (SDevgrp*)malloc((ndevs + nnew) * sizeof(SDevgrp));
+	memmove(tmpdevs, devs, ndevs * sizeof(SDevgrp));
 	free(devs);
 	free(devs);
-	devs = _devs;
+	devs = tmpdevs;
 
 
 	while(sdev){
 	while(sdev){
 		/* Assign `spec' to the device */
 		/* Assign `spec' to the device */
@@ -1381,10 +1382,10 @@ configure(char* spec, DevConf* cf)
 		sdev->unitflg = (int *)malloc(sdev->nunit * sizeof(int));
 		sdev->unitflg = (int *)malloc(sdev->nunit * sizeof(int));
 		assert(sdev->unit && sdev->unitflg);
 		assert(sdev->unit && sdev->unitflg);
 
 
-		devs[ndevs].dt_dev = sdev;
-		devs[ndevs].dt_nunits = sdev->nunit;
+		devs[ndevs].dev = sdev;
+		devs[ndevs].nunits = sdev->nunit;
 		sdev = sdev->next;
 		sdev = sdev->next;
-		devs[ndevs].dt_dev->next = nil;
+		devs[ndevs].dev->next = nil;
 		ndevs++;
 		ndevs++;
 	}
 	}
 
 
@@ -1406,7 +1407,7 @@ unconfigure(char* spec)
 
 
 	sdev = nil;
 	sdev = nil;
 	for(i = 0; i != ndevs; i++)
 	for(i = 0; i != ndevs; i++)
-		if((sdev = devs[i].dt_dev) != nil && sdev->idno == *spec)
+		if((sdev = devs[i].dev) != nil && sdev->idno == *spec)
 			break;
 			break;
 
 
 	if(i == ndevs)
 	if(i == ndevs)
@@ -1420,8 +1421,8 @@ unconfigure(char* spec)
 		sdev->ifc->disable(sdev);
 		sdev->ifc->disable(sdev);
 
 
 	/* we're alone and the device tab is locked; make the device unavailable */
 	/* we're alone and the device tab is locked; make the device unavailable */
-	memmove(&devs[i], &devs[ndevs - 1], sizeof(dev_t));
-	memset(&devs[ndevs - 1], 0, sizeof(dev_t));
+	memmove(&devs[i], &devs[ndevs - 1], sizeof(SDevgrp));
+	memset(&devs[ndevs - 1], 0, sizeof(SDevgrp));
 	ndevs--;
 	ndevs--;
 
 
 	qunlock(&devslock);
 	qunlock(&devslock);

+ 2 - 1
sys/src/9/port/portdat.h

@@ -710,7 +710,8 @@ struct Proc
 	ulong	priority;	/* priority level */
 	ulong	priority;	/* priority level */
 	ulong	basepri;	/* base priority level */
 	ulong	basepri;	/* base priority level */
 	uchar	fixedpri;	/* priority level deson't change */
 	uchar	fixedpri;	/* priority level deson't change */
-	int	quanta;		/* quanta left */
+	ulong	cpu;		/* cpu average */
+	ulong	lastupdate;
 	uchar	yield;		/* non-zero if the process just did a sleep(0) */
 	uchar	yield;		/* non-zero if the process just did a sleep(0) */
 	ulong	readytime;	/* time process came ready */
 	ulong	readytime;	/* time process came ready */
 	ulong	movetime;	/* last time process switched processors */
 	ulong	movetime;	/* last time process switched processors */

+ 218 - 79
sys/src/9/port/proc.c

@@ -7,10 +7,17 @@
 #include	"edf.h"
 #include	"edf.h"
 #include	<trace.h>
 #include	<trace.h>
 
 
+int	coopsched = 1;
 int	nrdy;
 int	nrdy;
 Ref	noteidalloc;
 Ref	noteidalloc;
 
 
+void updatecpu(Proc*);
+int reprioritize(Proc*);
+
 long	delayedscheds;	/* statistics */
 long	delayedscheds;	/* statistics */
+long skipscheds;
+long preempts;
+ulong load;
 
 
 static Ref	pidalloc;
 static Ref	pidalloc;
 
 
@@ -24,8 +31,8 @@ static struct Procalloc
 
 
 enum
 enum
 {
 {
-	Q=(HZ/20)*4,
-	DQ=((HZ-Q)/40)*2,
+	Q=10,
+	DQ=4,
 };
 };
 
 
 Schedq	runq[Nrq];
 Schedq	runq[Nrq];
@@ -58,6 +65,7 @@ char *statename[] =
 
 
 static void pidhash(Proc*);
 static void pidhash(Proc*);
 static void pidunhash(Proc*);
 static void pidunhash(Proc*);
+static void rebalance(void);
 
 
 /*
 /*
  * Always splhi()'ed.
  * Always splhi()'ed.
@@ -97,7 +105,8 @@ schedinit(void)		/* never returns */
 			unlock(&procalloc);
 			unlock(&procalloc);
 			break;
 			break;
 		}
 		}
-		up->mach = 0;
+		up->mach = nil;
+		updatecpu(up);
 		up = nil;
 		up = nil;
 	}
 	}
 	sched();
 	sched();
@@ -111,6 +120,7 @@ void
 sched(void)
 sched(void)
 {
 {
 	int x[1];
 	int x[1];
+	Proc *p;
 
 
 	if(m->ilockdepth)
 	if(m->ilockdepth)
 		panic("ilockdepth %d, last lock 0x%p at 0x%lux, sched called from 0x%lux",
 		panic("ilockdepth %d, last lock 0x%p at 0x%lux, sched called from 0x%lux",
@@ -138,7 +148,14 @@ sched(void)
 		}
 		}
 		gotolabel(&m->sched);
 		gotolabel(&m->sched);
 	}
 	}
-	up = runproc();
+	p = runproc();
+	if(!p->edf){
+		updatecpu(p);
+		p->priority = reprioritize(p);
+	}
+	if(p != m->readied)
+		m->schedticks = m->ticks + HZ/10;
+	up = p;
 	up->state = Running;
 	up->state = Running;
 	up->mach = MACHP(m->machno);
 	up->mach = MACHP(m->machno);
 	m->proc = up;
 	m->proc = up;
@@ -164,11 +181,14 @@ anyhigher(void)
 void
 void
 hzsched(void)
 hzsched(void)
 {
 {
-	/* another cycle, another quantum */
-	up->quanta--;
+	/* once a second, rebalance will reprioritize ready procs */
+	if(m->machno == 0)
+		rebalance();
 
 
-	/* don't bother unless someone is elegible */
-	if(anyhigher() || (!up->fixedpri && anyready())){
+	/* unless preempted, get to run for at least 100ms */
+	if(anyhigher()
+	|| (!up->fixedpri && m->ticks > m->schedticks && anyready())){
+		m->readied = nil;	/* avoid cooperative scheduling */
 		sched();
 		sched();
 		splhi();
 		splhi();
 	}
 	}
@@ -185,6 +205,7 @@ preempted(void)
 	if(up->preempted == 0)
 	if(up->preempted == 0)
 	if(anyhigher())
 	if(anyhigher())
 	if(!active.exiting){
 	if(!active.exiting){
+		m->readied = nil;	/* avoid cooperative scheduling */
 		up->preempted = 1;
 		up->preempted = 1;
 		sched();
 		sched();
 		splhi();
 		splhi();
@@ -195,57 +216,122 @@ preempted(void)
 }
 }
 
 
 /*
 /*
- *  ready(p) picks a new priority for a process and sticks it in the
- *  runq for that priority.
+ * Update the cpu time average for this particular process,
+ * which is about to change from up -> not up or vice versa.
+ * p->lastupdate is the last time an updatecpu happened.
+ *
+ * The cpu time average is a decaying average that lasts
+ * about D clock ticks.  D is chosen to be approximately
+ * the cpu time of a cpu-intensive "quick job".  A job has to run
+ * for approximately D clock ticks before we home in on its 
+ * actual cpu usage.  Thus if you manage to get in and get out
+ * quickly, you won't be penalized during your burst.  Once you
+ * start using your share of the cpu for more than about D
+ * clock ticks though, your p->cpu hits 1000 (1.0) and you end up 
+ * below all the other quick jobs.  Interactive tasks, because
+ * they basically always use less than their fair share of cpu,
+ * will be rewarded.
+ *
+ * If the process has not been running, then we want to
+ * apply the filter
+ *
+ *	cpu = cpu * (D-1)/D
+ *
+ * n times, yielding 
+ * 
+ *	cpu = cpu * ((D-1)/D)^n
+ *
+ * but D is big enough that this is approximately 
+ *
+ * 	cpu = cpu * (D-n)/D
  *
  *
- *  - fixed priority processes never move
- *  - a process that uses all its quanta before blocking goes down a
- *    priority level
- *  - a process that uses less than half its quanta before blocking
- *    goes up a priority level
- *  - a process that blocks after using up half or more of it's quanta
- *    stays at the same level
+ * so we use that instead.
+ * 
+ * If the process has been running, we apply the filter to
+ * 1 - cpu, yielding a similar equation.  Note that cpu is 
+ * stored in fixed point (* 1000).
  *
  *
- *  new quanta are assigned each time a process blocks or changes level
+ * Updatecpu must be called before changing up, in order
+ * to maintain accurate cpu usage statistics.  It can be called
+ * at any time to bring the stats for a given proc up-to-date.
  */
  */
 void
 void
-ready(Proc *p)
+updatecpu(Proc *p)
 {
 {
-	int s, pri;
-	Schedq *rq;
-	void (*pt)(Proc*, int, vlong);
+	int n, t, ocpu;
+	enum { D = 30*HZ };
 
 
-	s = splhi();
+	if(p->edf)
+		return;
 
 
-	if(edfready(p)){
-		splx(s);
+	t = MACHP(0)->ticks;
+	n = t - p->lastupdate;
+	p->lastupdate = t;
+
+	if(n == 0)
 		return;
 		return;
+	if(n > D)
+		n = D;
+
+	ocpu = p->cpu;
+	if(p != up)
+		p->cpu = (ocpu*(D-n))/D;
+	else{
+		t = 1000 - ocpu;
+		t = (t*(D-n))/D;
+		p->cpu = 1000 - t;
 	}
 	}
 
 
-	pri = p->priority;
-
-	if(p->fixedpri){
-		pri = p->basepri;
-		p->quanta = HZ;
-	} else if(p->state == Running){
-		if(p->quanta <= 0){
-			/* degrade priority of anyone that used their whole quanta */
-			if(pri > 0)
-				pri--;
-			p->quanta = quanta[pri];
-		}
-	} else {
-		if(p->quanta > quanta[pri]/2){
-			/* blocked before using half its quanta, go up */
-			if(++pri > p->basepri)
-				pri = p->basepri;
-		}
-		p->quanta = quanta[pri];
-	}
+//iprint("pid %d %s for %d cpu %d -> %d\n", p->pid,p==up?"active":"inactive",n, ocpu,p->cpu);
+}
 
 
-	rq = &runq[pri];
-	p->priority = pri;
+/*
+ * On average, p has used p->cpu of a cpu recently.
+ * Its fair share is conf.nmach/m->load of a cpu.  If it has been getting
+ * too much, penalize it.  If it has been getting not enough, reward it.
+ * I don't think you can get much more than your fair share that 
+ * often, so most of the queues are for using less.  Having a priority
+ * of 3 means you're just right.  Having a higher priority (up to p->basepri) 
+ * means you're not using as much as you could.
+ */
+int
+reprioritize(Proc *p)
+{
+	int fairshare, n, load, ratio;
+
+	load = MACHP(0)->load;
+	if(load == 0)
+		return p->basepri;
+
+	/*
+	 *  fairshare = 1.000 * conf.nproc * 1.000/load,
+	 * except the decimal point is moved three places
+	 * on both load and fairshare.
+	 */
+	fairshare = (conf.nmach*1000*1000)/load;
+	n = p->cpu;
+	if(n == 0)
+		n = 1;
+	ratio = (fairshare+n/2) / n;
+	if(ratio > p->basepri)
+		ratio = p->basepri;
+	if(ratio < 0)
+		panic("reprioritize");
+//iprint("pid %d cpu %d load %d fair %d pri %d\n", p->pid, p->cpu, load, fairshare, ratio);
+	return ratio;
+}
+
+/*
+ * add a process to a scheduling queue
+ */
+void
+queueproc(Schedq *rq, Proc *p)
+{
+	int pri;
+
+	pri = rq - runq;
 	lock(runq);
 	lock(runq);
+	p->priority = pri;
 	p->rnext = 0;
 	p->rnext = 0;
 	if(rq->tail)
 	if(rq->tail)
 		rq->tail->rnext = p;
 		rq->tail->rnext = p;
@@ -255,17 +341,11 @@ ready(Proc *p)
 	rq->n++;
 	rq->n++;
 	nrdy++;
 	nrdy++;
 	runvec |= 1<<pri;
 	runvec |= 1<<pri;
-	p->readytime = m->ticks;
-	p->state = Ready;
-	pt = proctrace;
-	if(pt)
-		pt(p, SReady, 0);
 	unlock(runq);
 	unlock(runq);
-	splx(s);
 }
 }
 
 
 /*
 /*
- *  remove a process from a scheduling queue (called splhi)
+ *  try to remove a process from a scheduling queue (called splhi)
  */
  */
 Proc*
 Proc*
 dequeueproc(Schedq *rq, Proc *tp)
 dequeueproc(Schedq *rq, Proc *tp)
@@ -310,6 +390,38 @@ dequeueproc(Schedq *rq, Proc *tp)
 	return p;
 	return p;
 }
 }
 
 
+/*
+ *  ready(p) picks a new priority for a process and sticks it in the
+ *  runq for that priority.
+ */
+void
+ready(Proc *p)
+{
+	int s, pri;
+	Schedq *rq;
+	void (*pt)(Proc*, int, vlong);
+
+	s = splhi();
+	if(edfready(p)){
+		splx(s);
+		return;
+	}
+
+	if(up != p)
+		m->readied = p;	/* group scheduling */
+
+	updatecpu(p);
+	pri = reprioritize(p);
+	p->priority = pri;
+	rq = &runq[pri];
+	p->state = Ready;
+	queueproc(rq, p);
+	pt = proctrace;
+	if(pt)
+		pt(p, SReady, 0);
+	splx(s);
+}
+
 /*
 /*
  *  yield the processor and drop our priority
  *  yield the processor and drop our priority
  */
  */
@@ -317,42 +429,53 @@ void
 yield(void)
 yield(void)
 {
 {
 	if(anyready()){
 	if(anyready()){
-		up->quanta = 0;	/* act like you used them all up */
+		/* pretend we just used 10ms */
+		up->lastupdate -= HZ/100;
 		sched();
 		sched();
 	}
 	}
 }
 }
 
 
 /*
 /*
- *  move up any process waiting more than its quanta
+ * move up any process waiting more than its quanta
+ * called once per clock tick on processor 0.
+ * we reduce this to once per second via blaancetime.
  */
  */
+ulong balancetime;
+
 static void
 static void
 rebalance(void)
 rebalance(void)
 {
 {
+	int pri, npri, t;
 	Schedq *rq;
 	Schedq *rq;
 	Proc *p;
 	Proc *p;
 
 
-	for(rq = runq; rq < &runq[Npriq]; rq++){
+	t = m->ticks;
+	if(t - balancetime < HZ)
+		return;
+	balancetime = t;
+
+	for(pri=0, rq=runq; pri<Npriq; pri++, rq++){
+another:
 		p = rq->head;
 		p = rq->head;
 		if(p == nil)
 		if(p == nil)
 			continue;
 			continue;
 		if(p->mp != MACHP(m->machno))
 		if(p->mp != MACHP(m->machno))
 			continue;
 			continue;
-		if(p->priority == p->basepri)
-			continue;
-
-		/* this comparison is too arbitrary - need a better one */
-		/* presotto */
-		if(m->ticks - p->readytime < quanta[p->priority]/4)
+		if(pri == p->basepri)
 			continue;
 			continue;
-		splhi();
-		p = dequeueproc(rq, p);
-		spllo();
-		if(p == nil)
-			continue;
-		p->quanta = quanta[p->priority];	/* act like we used none */
-		ready(p);
+		updatecpu(p);
+		npri = reprioritize(p);
+		if(npri != pri){
+			splhi();
+			p = dequeueproc(rq, p);
+			if(p)
+				queueproc(&runq[npri], p);
+			spllo();
+			goto another;
+		}
 	}
 	}
 }
 }
+	
 
 
 /*
 /*
  *  pick a process to run
  *  pick a process to run
@@ -368,13 +491,16 @@ runproc(void)
 
 
 	start = perfticks();
 	start = perfticks();
 
 
-	/* 10 is completely arbitrary - it interacts with the comparison in rebalance */
-	/* presotto */
-	if(m->fairness++ == 10){
-		m->fairness = 0;
-		rebalance();
+	/* cooperative scheduling until the clock ticks */
+	if(coopsched && (p=m->readied) && p->mach==0 && p->state==Ready
+	&& runq[Nrq-1].head == nil && runq[Nrq-2].head == nil){
+		skipscheds++;
+		rq = &runq[p->priority];
+		goto found;
 	}
 	}
 
 
+	preempts++;
+
 loop:
 loop:
 	/*
 	/*
 	 *  find a process that last ran on this processor (affinity),
 	 *  find a process that last ran on this processor (affinity),
@@ -506,6 +632,11 @@ newproc(void)
 	p->wired = 0;
 	p->wired = 0;
 	procpriority(p, PriNormal, 0);
 	procpriority(p, PriNormal, 0);
 
 
+	/* a priori, somewhere below interactive but above the cpu hogs */
+	p->cpu = 1000000/(5*MACHP(0)->load+1);
+	if(p->cpu > 1000)
+		p->cpu = 1000;
+	p->priority = reprioritize(p);
 	p->edf = nil;
 	p->edf = nil;
 
 
 	return p;
 	return p;
@@ -555,10 +686,10 @@ procpriority(Proc *p, int pri, int fixed)
 	p->basepri = pri;
 	p->basepri = pri;
 	p->priority = pri;
 	p->priority = pri;
 	if(fixed){
 	if(fixed){
-		p->quanta = 0xfffff;
+		// p->quanta = 0xfffff;
 		p->fixedpri = 1;
 		p->fixedpri = 1;
 	} else {
 	} else {
-		p->quanta = quanta[pri];
+		// p->quanta = quanta[pri];
 		p->fixedpri = 0;
 		p->fixedpri = 0;
 	}
 	}
 }
 }
@@ -1414,11 +1545,19 @@ accounttime(void)
 	if(m->machno != 0)
 	if(m->machno != 0)
 		return;
 		return;
 
 
-	/* calculate decaying load average */
+	/*
+	 * calculate decaying load average.
+	 * if we decay by (n-1)/n then it takes
+	 * n clock ticks to go from load L to .36 L once
+	 * things quiet down.  it takes about 5 n clock
+	 * ticks to go to zero.  so using HZ means this is
+	 * approximately the load over the last second,
+	 * with a tail lasting about 5 seconds.
+	 */
 	n = nrun;
 	n = nrun;
 	nrun = 0;
 	nrun = 0;
 	n = (nrdy+n)*1000;
 	n = (nrdy+n)*1000;
-	m->load = (m->load*19+n)/20;
+	m->load = (m->load*(HZ-1)+n)/HZ;
 }
 }
 
 
 static void
 static void

+ 2 - 1
sys/src/9/ppc/dat.h

@@ -145,7 +145,8 @@ struct Mach
 	ulong	loopconst;
 	ulong	loopconst;
 	Perf	perf;				/* performance counters */
 	Perf	perf;				/* performance counters */
 
 
-	ulong	fairness;		/* for runproc */
+	Proc*	readied;		/* for runproc */
+	ulong	schedticks;	/* next forced context switch */
 
 
 	ulong	clkin;		/* basic clock frequency */
 	ulong	clkin;		/* basic clock frequency */
 	ulong	vco_out;
 	ulong	vco_out;

+ 3 - 0
sys/src/ape/lib/ap/stdio/strerror.c

@@ -73,8 +73,11 @@ char *sys_errlist[] = {
 };
 };
 #define	_IO_nerr	(sizeof sys_errlist/sizeof sys_errlist[0])
 #define	_IO_nerr	(sizeof sys_errlist/sizeof sys_errlist[0])
 int sys_nerr = _IO_nerr;
 int sys_nerr = _IO_nerr;
+extern char _plan9err[];
 
 
 char *strerror(int n){
 char *strerror(int n){
+	if(n == EPLAN9)
+		return _plan9err;
 	if(n >= 0 && n < _IO_nerr)
 	if(n >= 0 && n < _IO_nerr)
 		return sys_errlist[n];
 		return sys_errlist[n];
 	if(n == EDOM)
 	if(n == EDOM)

+ 1 - 1
sys/src/cmd/acid/builtin.c

@@ -933,7 +933,7 @@ patom(char type, Store *res)
 		Bprint(bout, "%s", buf);
 		Bprint(bout, "%s", buf);
 		break;
 		break;
 	case 'b':
 	case 'b':
-		Bprint(bout, "%#.2x", (int)res->ival&0xff);
+		Bprint(bout, "%.2x", (int)res->ival&0xff);
 		break;
 		break;
 	case 'X':
 	case 'X':
 		Bprint(bout, "%.8lux", (ulong)res->ival);
 		Bprint(bout, "%.8lux", (ulong)res->ival);

+ 4 - 2
sys/src/cmd/auth/factotum/apop.c

@@ -92,7 +92,7 @@ static int
 apopwrite(Fsstate *fss, void *va, uint n)
 apopwrite(Fsstate *fss, void *va, uint n)
 {
 {
 	char *a, *v;
 	char *a, *v;
-	int ret;
+	int i, ret;
 	uchar digest[MD5dlen];
 	uchar digest[MD5dlen];
 	DigestState *ds;
 	DigestState *ds;
 	Key *k;
 	Key *k;
@@ -118,13 +118,15 @@ apopwrite(Fsstate *fss, void *va, uint n)
 		case AuthCram:
 		case AuthCram:
 			hmac_md5((uchar*)a, n, (uchar*)v, strlen(v),
 			hmac_md5((uchar*)a, n, (uchar*)v, strlen(v),
 				digest, nil);
 				digest, nil);
+			sprint(s->resp, "%.*H", MD5dlen, digest);
 			break;
 			break;
 		case AuthApop:
 		case AuthApop:
 			ds = md5((uchar*)a, n, nil, nil);
 			ds = md5((uchar*)a, n, nil, nil);
 			md5((uchar*)v, strlen(v), digest, ds);
 			md5((uchar*)v, strlen(v), digest, ds);
+			for(i=0; i<MD5dlen; i++)
+				sprint(&s->resp[2*i], "%2.2x", digest[i]);
 			break;
 			break;
 		}
 		}
-		sprint(s->resp, "%.*H", MD5dlen, digest);
 		closekey(k);
 		closekey(k);
 		fss->phase = CHaveResp;
 		fss->phase = CHaveResp;
 		return RpcOk;
 		return RpcOk;

+ 18 - 6
sys/src/cmd/aux/olefs.c

@@ -111,13 +111,17 @@ convM2OD(Odir *f, void *buf, int nbuf)
 int
 int
 oreadblock(Ofile *f, int block, ulong off, char *buf, int nbuf)
 oreadblock(Ofile *f, int block, ulong off, char *buf, int nbuf)
 {
 {
+	int n;
+
 	if(block < 0 || block >= f->nblock) {
 	if(block < 0 || block >= f->nblock) {
 		werrstr("attempt to read %x/%lux\n", block, f->nblock);
 		werrstr("attempt to read %x/%lux\n", block, f->nblock);
 		return -1;
 		return -1;
 	}
 	}
 
 
-	if(off >= Blocksize)
+	if(off >= Blocksize){
+		print("offset too far into block\n");
 		return 0;
 		return 0;
+	}
 
 
 	if(off+nbuf > Blocksize)
 	if(off+nbuf > Blocksize)
 		nbuf = Blocksize-off;
 		nbuf = Blocksize-off;
@@ -125,10 +129,15 @@ oreadblock(Ofile *f, int block, ulong off, char *buf, int nbuf)
 	/* blocks start numbering at -1 [sic] */
 	/* blocks start numbering at -1 [sic] */
 	off += (block+1)*Blocksize;
 	off += (block+1)*Blocksize;
 
 
-	if(Bseek(f->b, off, 0) != off)
+	if(Bseek(f->b, off, 0) != off){
+		print("seek failed\n");
 		return -1;
 		return -1;
+	}
 
 
-	return Bread(f->b, buf, nbuf);
+	n = Bread(f->b, buf, nbuf);
+	if(n < 0)
+		print("Bread failed: %r");
+	return n;
 }
 }
 
 
 int
 int
@@ -238,8 +247,8 @@ oleopen(char *fn)
 	/* the first bytes are magic */
 	/* the first bytes are magic */
 	if(Bread(b, buf, sizeof magic) != sizeof magic
 	if(Bread(b, buf, sizeof magic) != sizeof magic
 	|| memcmp(buf, magic, sizeof magic) != 0) {
 	|| memcmp(buf, magic, sizeof magic) != 0) {
-		werrstr("bad magic: not OLE file");
 		Bterm(b);
 		Bterm(b);
+		werrstr("bad magic: not OLE file");
 		return nil;
 		return nil;
 	}
 	}
 
 
@@ -255,6 +264,7 @@ oleopen(char *fn)
 	if(Bread(b, buf, Blocksize) != Blocksize) {
 	if(Bread(b, buf, Blocksize) != Blocksize) {
 		Bterm(b);
 		Bterm(b);
 		free(f);
 		free(f);
+		print("short read\n");
 		return nil;
 		return nil;
 	}
 	}
 
 
@@ -334,8 +344,10 @@ oleopen(char *fn)
 	}
 	}
 Break2:;
 Break2:;
 
 
-	if(oreaddir(f, 0, &rootdir) <= 0)
+	if(oreaddir(f, 0, &rootdir) <= 0){
+		print("oreaddir could not read root\n");
 		goto Die;
 		goto Die;
+	}
 
 
 	f->smapblock = rootdir.start;
 	f->smapblock = rootdir.start;
 	return f;
 	return f;
@@ -483,7 +495,7 @@ main(int argc, char **argv)
 
 
 	f = oleopen(argv[0]);
 	f = oleopen(argv[0]);
 	if(f == nil) {
 	if(f == nil) {
-		print("error: %r\n");
+		print("error opening %s: %r\n", argv[0]);
 		exits("open");
 		exits("open");
 	}
 	}
 
 

+ 19 - 22
sys/src/cmd/history.c

@@ -77,22 +77,30 @@ ysearch(char *file, char *ndump)
 	ulong otime, dt;
 	ulong otime, dt;
 	int toggle, started, missing;
 	int toggle, started, missing;
 
 
-	if(ndump == nil){
-		if(slashnhack && memcmp(file, "/n/", 3) == 0){
-			p = strchr(file+3, '/');
-			if(p == nil)
-				p = file+strlen(file);
-			if(p-file >= sizeof nbuf-10){
-				fprint(2, "%s: dump name too long", file);
+	fil[0] = 0;
+	if(file[0] != '/') {
+		getwd(strchr(fil, 0), 100);
+		strcat(fil, "/");
+	}
+	strcat(fil, file);
+	if(slashnhack && memcmp(fil, "/n/", 3) == 0){
+		p = strchr(fil+3, '/');
+		if(p == nil)
+			p = fil+strlen(fil);
+		if(ndump == nil){
+			if(p-fil >= sizeof nbuf-10){
+				fprint(2, "%s: dump name too long", fil);
 				return;
 				return;
 			}
 			}
-			memmove(nbuf, file+3, p-(file+3));
-			nbuf[p-(file+3)] = 0;
+			memmove(nbuf, fil+3, p-(fil+3));
+			nbuf[p-(fil+3)] = 0;
 			strcat(nbuf, "dump");
 			strcat(nbuf, "dump");
 			ndump = nbuf;
 			ndump = nbuf;
-		}else
-			ndump = "dump";
+		}
+		memmove(fil, p, strlen(p)+1);
 	}
 	}
+	if(ndump == nil)
+		ndump = "dump";
 
 
 	tm = localtime(time(0));
 	tm = localtime(time(0));
 	sprint(buf, "/n/%s/%.4d/", ndump, tm->year+1900);
 	sprint(buf, "/n/%s/%.4d/", ndump, tm->year+1900);
@@ -125,17 +133,6 @@ ysearch(char *file, char *ndump)
 		strcpy(pair[1], file);
 		strcpy(pair[1], file);
 	}
 	}
 	free(dir);
 	free(dir);
-	fil[0] = 0;
-	if(file[0] != '/') {
-		getwd(strchr(fil, 0), 100);
-		strcat(fil, "/");
-	}
-	strcat(fil, file);
-	if(slashnhack && memcmp(fil, "/n/", 3) == 0){
-		p = strchr(fil+3, '/');
-		if(p)
-			memmove(fil, p, strlen(p)+1);
-	}
 	otime = starttime(sflag);
 	otime = starttime(sflag);
 	toggle = 0;
 	toggle = 0;
 	for(;;) {
 	for(;;) {

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

@@ -301,7 +301,7 @@ rwalk(Fid *f)
 	err = nil;
 	err = nil;
 	nf = nil;
 	nf = nil;
 	rhdr.nwqid = 0;
 	rhdr.nwqid = 0;
-	if(rhdr.newfid != rhdr.fid){
+	if(thdr.newfid != thdr.fid){
 		err = clone(f, &nf);
 		err = clone(f, &nf);
 		if(err)
 		if(err)
 			return err;
 			return err;

+ 0 - 2
sys/src/cmd/vac/cache.c

@@ -448,8 +448,6 @@ found:
 	
 	
 	n = vtRead(c->z, score, type, b->data, size);
 	n = vtRead(c->z, score, type, b->data, size);
 	if(n < 0) {
 	if(n < 0) {
-fprint(2, "vtRead failed: %V %d %d: %R\n", score, type, size);
-abort();
 		lumpDecRef(b, 1);
 		lumpDecRef(b, 1);
 		return nil;
 		return nil;
 	}
 	}

+ 5 - 0
sys/src/libc/port/encodefmt.c

@@ -1,5 +1,6 @@
 #include <u.h>
 #include <u.h>
 #include <libc.h>
 #include <libc.h>
+#include <ctype.h>
 
 
 int
 int
 encodefmt(Fmt *f)
 encodefmt(Fmt *f)
@@ -10,6 +11,7 @@ encodefmt(Fmt *f)
 	int ilen;
 	int ilen;
 	int rv;
 	int rv;
 	uchar *b;
 	uchar *b;
+	char *p;
 	char obuf[64];	// rsc optimization
 	char obuf[64];	// rsc optimization
 
 
 	if(!(f->flags&FmtPrec) || f->prec < 1)
 	if(!(f->flags&FmtPrec) || f->prec < 1)
@@ -54,6 +56,9 @@ encodefmt(Fmt *f)
 		break;
 		break;
 	case 'H':
 	case 'H':
 		rv = enc16(out, len, b, ilen);
 		rv = enc16(out, len, b, ilen);
+		if(rv >= 0 && (f->flags & FmtLong))
+			for(p = buf; *p; p++)
+				*p = tolower(*p);
 		break;
 		break;
 	default:
 	default:
 		rv = -1;
 		rv = -1;

+ 9 - 0
sys/src/libmp/port/mpextendedgcd.c

@@ -15,6 +15,13 @@ mpextendedgcd(mpint *a, mpint *b, mpint *v, mpint *x, mpint *y)
 	mpint *u, *A, *B, *C, *D;
 	mpint *u, *A, *B, *C, *D;
 	int g;
 	int g;
 
 
+	if(a->sign < 0 || b->sign < 0){
+		mpassign(mpzero, v);
+		mpassign(mpzero, y);
+		mpassign(mpzero, x);
+		return;
+	}
+
 	if(a->top == 0){
 	if(a->top == 0){
 		mpassign(b, v);
 		mpassign(b, v);
 		mpassign(mpone, y);
 		mpassign(mpone, y);
@@ -94,4 +101,6 @@ mpextendedgcd(mpint *a, mpint *b, mpint *v, mpint *x, mpint *y)
 	mpfree(u);
 	mpfree(u);
 	mpfree(a);
 	mpfree(a);
 	mpfree(b);
 	mpfree(b);
+
+	return;
 }
 }