Browse Source

Plan 9 from Bell Labs Fourth Edition 2006-01-29

David du Colombier 18 years ago
parent
commit
2cca75a1b2
88 changed files with 1688 additions and 830 deletions
  1. 167 164
      dist/replica/_plan9.db
  2. 167 164
      dist/replica/plan9.db
  3. 180 0
      dist/replica/plan9.log
  4. 4 0
      rc/bin/replica/defs
  5. 9 0
      rc/bin/troff2png
  6. 3 2
      sys/doc/8½/mkfile
  7. 1 1
      sys/doc/acme/mkfile
  8. 2 1
      sys/doc/fs/mkfile
  9. 2 1
      sys/doc/il/mkfile
  10. 13 12
      sys/doc/lp.ms
  11. 5 0
      sys/doc/mkdirlist
  12. 5 0
      sys/doc/mkfilelist
  13. 2 1
      sys/doc/net/mkfile
  14. 2 1
      sys/doc/sam/mkfile
  15. 3 2
      sys/include/mach.h
  16. 1 0
      sys/include/thread.h
  17. 2 2
      sys/include/trace.h
  18. 20 0
      sys/lib/acid/386
  19. 39 2
      sys/man/1/ms2html
  20. 46 9
      sys/man/1/replica
  21. 7 1
      sys/man/3/proc
  22. 2 2
      sys/man/6/htmlroff
  23. 1 1
      sys/man/6/mhtml
  24. 23 1
      sys/man/8/fossilcons
  25. 4 2
      sys/man/8/prep
  26. 14 5
      sys/man/8/replica
  27. 1 0
      sys/man/8/snoopy
  28. 5 0
      sys/src/9/bitsy/dat.h
  29. 1 1
      sys/src/9/bitsy/devflash.c
  30. 1 0
      sys/src/9/port/alloc.c
  31. 77 0
      sys/src/9/port/chan.c
  32. 2 2
      sys/src/9/port/devloopback.c
  33. 14 6
      sys/src/9/port/devproc.c
  34. 7 2
      sys/src/9/port/devsd.c
  35. 112 60
      sys/src/9/port/edf.c
  36. 18 17
      sys/src/9/port/edf.h
  37. 1 1
      sys/src/9/port/fault.c
  38. 0 3
      sys/src/9/port/master
  39. 40 1
      sys/src/9/port/pgrp.c
  40. 3 14
      sys/src/9/port/portclock.c
  41. 2 1
      sys/src/9/port/portdat.h
  42. 4 1
      sys/src/9/port/portfns.h
  43. 4 1
      sys/src/9/port/proc.c
  44. 29 3
      sys/src/9/port/tod.c
  45. 1 1
      sys/src/9/ppc/devflash.c
  46. 3 1
      sys/src/9/ppc/trap.c
  47. 15 30
      sys/src/cmd/8c/txt.c
  48. 4 1
      sys/src/cmd/aux/statusbar.c
  49. 20 13
      sys/src/cmd/cc/scon.c
  50. 1 1
      sys/src/cmd/cc/sub.c
  51. 10 5
      sys/src/cmd/fossil/9.h
  52. 14 2
      sys/src/cmd/fossil/9auth.c
  53. 16 10
      sys/src/cmd/fossil/9lstn.c
  54. 53 8
      sys/src/cmd/fossil/9p.c
  55. 27 6
      sys/src/cmd/fossil/9proc.c
  56. 16 12
      sys/src/cmd/fossil/9srv.c
  57. 1 1
      sys/src/cmd/fossil/Ccmd.c
  58. 1 1
      sys/src/cmd/htmlroff/util.c
  59. 2 14
      sys/src/cmd/ip/snoopy/dhcp.c
  60. 1 7
      sys/src/cmd/ip/snoopy/dump.c
  61. 21 11
      sys/src/cmd/ip/snoopy/filter.y
  62. 1 2
      sys/src/cmd/ip/snoopy/il.c
  63. 8 2
      sys/src/cmd/ip/snoopy/main.c
  64. 2 0
      sys/src/cmd/ip/snoopy/mkfile
  65. 2 14
      sys/src/cmd/ip/snoopy/ninep.c
  66. 4 16
      sys/src/cmd/ip/snoopy/ospf.c
  67. 2 15
      sys/src/cmd/ip/snoopy/rtcp.c
  68. 2 15
      sys/src/cmd/ip/snoopy/rtp.c
  69. 194 39
      sys/src/cmd/replica/applylog.c
  70. 10 4
      sys/src/cmd/tbl/tc.c
  71. 9 0
      sys/src/cmd/unix/drawterm/README
  72. 13 13
      sys/src/cmd/venti/config.c
  73. 1 1
      sys/src/cmd/venti/fmtindex.c
  74. 69 8
      sys/src/games/music/jukebox/music.c
  75. 1 1
      sys/src/games/music/playlistfs/boilerplate.c
  76. 1 0
      sys/src/libauthsrv/readnvram.c
  77. 1 1
      sys/src/libc/power/getcallerpc.s
  78. 1 1
      sys/src/libmach/2.c
  79. 1 1
      sys/src/libmach/5.c
  80. 1 1
      sys/src/libmach/6.c
  81. 1 1
      sys/src/libmach/7.c
  82. 1 1
      sys/src/libmach/8.c
  83. 86 78
      sys/src/libmach/executable.c
  84. 1 1
      sys/src/libmach/k.c
  85. 1 1
      sys/src/libmach/sym.c
  86. 1 1
      sys/src/libmach/u.c
  87. 19 2
      sys/src/libthread/sched.c
  88. 4 0
      usr/glenda/bin/rc/pull

+ 167 - 164
dist/replica/_plan9.db

@@ -15,12 +15,12 @@
 386/_9pcdisk.gz - 664 sys sys 1039764191 695837
 386/bin - 20000000775 sys sys 1018897690 0
 386/bin/8a - 775 sys sys 1135570766 116009
-386/bin/8c - 775 sys sys 1135570766 362140
+386/bin/8c - 775 sys sys 1138464441 361964
 386/bin/8l - 775 sys sys 1130384229 115712
 386/bin/9660srv - 775 sys sys 1135570766 104023
-386/bin/aan - 775 sys sys 1135570767 130761
-386/bin/acid - 775 sys sys 1136346850 400912
-386/bin/acme - 775 sys sys 1136087521 429186
+386/bin/aan - 775 sys sys 1138500151 131061
+386/bin/acid - 775 sys sys 1138500164 400525
+386/bin/acme - 775 sys sys 1138500184 429460
 386/bin/ape - 20000000775 sys sys 1016944144 0
 386/bin/ape/basename - 775 sys sys 1136656314 132873
 386/bin/ape/cc - 775 sys sys 1135570769 70399
@@ -37,27 +37,27 @@
 386/bin/ape/stty - 775 sys sys 1130384232 41057
 386/bin/ape/tar - 775 sys sys 1135570769 61941
 386/bin/ape/uname - 775 sys sys 1136656327 132702
-386/bin/aquarela - 775 sys sys 1136656329 331912
+386/bin/aquarela - 775 sys sys 1138500199 332204
 386/bin/ar - 775 sys sys 1135570769 111942
 386/bin/archfs - 775 sys sys 1135570769 146849
 386/bin/ascii - 775 sys sys 1135570770 64641
 386/bin/astro - 775 sys sys 1130384233 138837
 386/bin/auth - 20000000775 sys sys 1016920815 0
-386/bin/auth/aescbc - 775 sys sys 1135570770 140764
+386/bin/auth/aescbc - 775 sys sys 1138500222 140815
 386/bin/auth/asn12rsa - 775 sys sys 1135570770 120433
 386/bin/auth/authsrv - 775 sys sys 1135570771 165460
 386/bin/auth/changeuser - 775 sys sys 1135570771 97011
-386/bin/auth/convkeys - 775 sys sys 1135570771 87436
-386/bin/auth/convkeys2 - 775 sys sys 1135570771 87487
+386/bin/auth/convkeys - 775 sys sys 1138500239 87487
+386/bin/auth/convkeys2 - 775 sys sys 1138500253 87538
 386/bin/auth/cron - 775 sys sys 1135570772 143956
 386/bin/auth/debug - 775 sys sys 1135570772 101051
 386/bin/auth/disable - 775 sys sys 1020319057 146
 386/bin/auth/enable - 775 sys sys 1020319057 134
-386/bin/auth/factotum - 775 sys sys 1135570773 318316
-386/bin/auth/fgui - 775 sys sys 1135570773 218329
+386/bin/auth/factotum - 775 sys sys 1138500268 318365
+386/bin/auth/fgui - 775 sys sys 1138500284 218624
 386/bin/auth/guard.srv - 775 sys sys 1135570774 142833
 386/bin/auth/iam - 775 sys sys 1085076981 50791
-386/bin/auth/keyfs - 775 sys sys 1135570774 115579
+386/bin/auth/keyfs - 775 sys sys 1138500299 115630
 386/bin/auth/login - 775 sys sys 1135570774 104481
 386/bin/auth/newns - 775 sys sys 1135570774 89719
 386/bin/auth/none - 775 sys sys 1135570775 89007
@@ -71,13 +71,13 @@
 386/bin/auth/rsafill - 775 sys sys 1135570777 143608
 386/bin/auth/rsagen - 775 sys sys 1135570778 153242
 386/bin/auth/secretpem - 775 sys sys 1045537944 118526
-386/bin/auth/secstore - 775 sys sys 1135570778 195447
+386/bin/auth/secstore - 775 sys sys 1138500327 195492
 386/bin/auth/secstored - 775 sys sys 1135570779 197002
 386/bin/auth/secuser - 775 sys sys 1135570779 152936
 386/bin/auth/status - 775 sys sys 1020319060 738
 386/bin/auth/uniq - 775 sys sys 1135570779 63055
 386/bin/auth/warning - 775 sys sys 1135570779 100633
-386/bin/auth/wrkey - 775 sys sys 1135570779 75197
+386/bin/auth/wrkey - 775 sys sys 1138500378 75242
 386/bin/aux - 20000000775 sys sys 1016920817 0
 386/bin/aux/9pcon - 775 sys sys 1135570780 94910
 386/bin/aux/LOCK - 775 sys sys 1135570780 59902
@@ -85,15 +85,15 @@
 386/bin/aux/accupoint - 775 sys sys 1130384245 40077
 386/bin/aux/acidleak - 775 sys sys 1135570780 69430
 386/bin/aux/antiword - 775 sys sys 1070288096 511478
-386/bin/aux/apm - 775 sys sys 1135570781 180009
+386/bin/aux/apm - 775 sys sys 1138500391 180310
 386/bin/aux/astarld - 775 sys sys 1135570781 64675
 386/bin/aux/cddb - 775 sys sys 1135570781 72214
 386/bin/aux/clog - 775 sys sys 1135570782 66431
-386/bin/aux/consolefs - 775 sys sys 1135570782 153921
+386/bin/aux/consolefs - 775 sys sys 1138464441 153937
 386/bin/aux/conswdir - 775 sys sys 1062080411 38855
 386/bin/aux/cropmarks - 775 sys sys 1020319062 1808
 386/bin/aux/data2s - 775 sys sys 1135570782 60518
-386/bin/aux/depend - 775 sys sys 1135570782 145569
+386/bin/aux/depend - 775 sys sys 1138500404 145864
 386/bin/aux/disksim - 775 sys sys 1135570783 150431
 386/bin/aux/download - 775 sys sys 1087442506 176016
 386/bin/aux/faxreceive - 775 sys sys 1135570783 83923
@@ -102,7 +102,7 @@
 386/bin/aux/g3p9bit - 775 sys sys 1104121976 67278
 386/bin/aux/getflags - 775 sys sys 1130384250 43835
 386/bin/aux/gpsevermore - 775 sys sys 1135570784 71477
-386/bin/aux/gpsfs - 775 sys sys 1135570784 182265
+386/bin/aux/gpsfs - 775 sys sys 1138500417 182563
 386/bin/aux/grabit - 775 sys sys 1020319063 1244
 386/bin/aux/hardcopy - 775 sys sys 1020319063 1699
 386/bin/aux/isvmware - 775 sys sys 1032486791 23997
@@ -117,17 +117,17 @@
 386/bin/aux/mklatinkbd - 775 sys sys 1135570786 64164
 386/bin/aux/mnihongo - 775 sys sys 1135570786 139629
 386/bin/aux/mouse - 775 sys sys 1130384253 44044
-386/bin/aux/ms2 - 775 sys sys 1135570786 87426
+386/bin/aux/ms2 - 775 sys sys 1138500429 87049
 386/bin/aux/msexceltables - 775 sys sys 1138075017 81356
 386/bin/aux/mswordstrings - 775 sys sys 1135570787 65298
 386/bin/aux/na - 775 sys sys 1135570787 154182
-386/bin/aux/nfsmount - 775 sys sys 1135570787 234147
+386/bin/aux/nfsmount - 775 sys sys 1138500443 234446
 386/bin/aux/nfsserver - 775 sys sys 1135570788 185407
 386/bin/aux/olefs - 775 sys sys 1135570788 149329
 386/bin/aux/p9bitpost - 775 sys sys 1104121982 127974
 386/bin/aux/pcmcia - 775 sys sys 1130384255 46923
 386/bin/aux/pcnfsd - 775 sys sys 1135570789 129333
-386/bin/aux/portmap - 775 sys sys 1135570789 143667
+386/bin/aux/portmap - 775 sys sys 1138500456 143966
 386/bin/aux/portmapper - 775 sys sys 1135570789 128221
 386/bin/aux/postgif - 775 sys sys 1087442507 175380
 386/bin/aux/postprint - 775 sys sys 1087442507 160041
@@ -140,7 +140,7 @@
 386/bin/aux/sprog - 775 sys sys 1130594714 79372
 386/bin/aux/ssh_genkey - 775 sys sys 1045537957 194629
 386/bin/aux/sshserve - 775 sys sys 1132506841 252850
-386/bin/aux/statusbar - 775 sys sys 1135570790 151780
+386/bin/aux/statusbar - 775 sys sys 1138464442 151846
 386/bin/aux/stub - 775 sys sys 1135570791 140900
 386/bin/aux/tcpostio - 775 sys sys 1094040084 200808
 386/bin/aux/text2post - 775 sys sys 1104121986 78336
@@ -161,11 +161,11 @@
 386/bin/bind - 775 sys sys 1135570793 59562
 386/bin/bitsy - 20000000775 sys sys 1018721039 0
 386/bin/bitsy/bitsyload - 775 sys sys 1135570793 63359
-386/bin/bitsy/keyboard - 775 sys sys 1135570794 306153
+386/bin/bitsy/keyboard - 775 sys sys 1138500470 306442
 386/bin/bitsy/light - 775 sys sys 1020319072 242
 386/bin/bitsy/params - 775 sys sys 1135570794 58772
 386/bin/bitsy/pencal - 775 sys sys 1135570794 117257
-386/bin/bitsy/prompter - 775 sys sys 1135570795 286441
+386/bin/bitsy/prompter - 775 sys sys 1138500486 286731
 386/bin/bmp - 775 sys sys 1135570796 157659
 386/bin/bunzip2 - 775 sys sys 1135570796 97484
 386/bin/bzip2 - 775 sys sys 1135570796 114019
@@ -177,10 +177,10 @@
 386/bin/cfs - 775 sys sys 1135570797 128025
 386/bin/chgrp - 775 sys sys 1135570798 59279
 386/bin/chmod - 775 sys sys 1135570798 62275
-386/bin/cifscmd - 775 sys sys 1136656333 342747
+386/bin/cifscmd - 775 sys sys 1138500512 343031
 386/bin/cleanname - 775 sys sys 1135570798 58298
 386/bin/clock - 775 sys sys 1135570798 158281
-386/bin/cmp - 775 sys sys 1130384270 40583
+386/bin/cmp - 775 sys sys 1138500523 40602
 386/bin/colors - 775 sys sys 1135570799 150575
 386/bin/comm - 775 sys sys 1135570799 61343
 386/bin/con - 775 sys sys 1135570799 78243
@@ -189,7 +189,7 @@
 386/bin/cpu - 775 sys sys 1135570800 139202
 386/bin/crop - 775 sys sys 1135570800 116024
 386/bin/date - 775 sys sys 1130384272 43279
-386/bin/db - 775 sys sys 1136346851 345745
+386/bin/db - 775 sys sys 1138500534 345355
 386/bin/dc - 775 sys sys 1135570801 99015
 386/bin/dd - 775 sys sys 1130384273 45416
 386/bin/deroff - 775 sys sys 1135570802 74231
@@ -205,7 +205,7 @@
 386/bin/disk/exsort - 775 sys sys 1135570803 60212
 386/bin/disk/fdisk - 775 sys sys 1135570804 103852
 386/bin/disk/format - 775 sys sys 1135570804 89520
-386/bin/disk/kfs - 775 sys sys 1135570804 249003
+386/bin/disk/kfs - 775 sys sys 1138500552 249042
 386/bin/disk/kfscmd - 775 sys sys 1130384277 38240
 386/bin/disk/ksync - 775 sys sys 1020319074 302
 386/bin/disk/mbr - 775 sys sys 1135570805 73675
@@ -220,20 +220,20 @@
 386/bin/echo - 775 sys sys 1135570806 57349
 386/bin/ed - 775 sys sys 1135570807 93021
 386/bin/eqn - 775 sys sys 1136656335 243034
-386/bin/execnet - 775 sys sys 1135570807 177748
+386/bin/execnet - 775 sys sys 1138500564 178046
 386/bin/exportfs - 775 sys sys 1135570807 162237
 386/bin/ext2srv - 775 sys sys 1135570808 179710
 386/bin/faces - 775 sys sys 1135570808 193982
 386/bin/factor - 775 sys sys 1135570809 61456
 386/bin/fcp - 775 sys sys 1136656336 82190
-386/bin/file - 775 sys sys 1135570809 120978
+386/bin/file - 775 sys sys 1138500574 120581
 386/bin/fmt - 775 sys sys 1137607040 65320
 386/bin/fortune - 775 sys sys 1135570810 67113
 386/bin/fossil - 20000000775 sys sys 1042005470 0
 386/bin/fossil/conf - 775 sys sys 1085077052 1506
 386/bin/fossil/flchk - 775 sys sys 1138211975 237734
 386/bin/fossil/flfmt - 775 sys sys 1138211976 245881
-386/bin/fossil/fossil - 775 sys sys 1138211977 360656
+386/bin/fossil/fossil - 775 sys sys 1138500586 362894
 386/bin/fossil/last - 775 sys sys 1135570812 63280
 386/bin/freq - 775 sys sys 1136397208 61797
 386/bin/fs - 20000000775 sys sys 954380769 0
@@ -273,7 +273,7 @@
 386/bin/hoc - 775 sys sys 1135570817 99860
 386/bin/html2ms - 775 sys sys 1135570817 66078
 386/bin/htmlfmt - 775 sys sys 1135570817 160781
-386/bin/htmlroff - 775 sys sys 1138406772 148065
+386/bin/htmlroff - 775 sys sys 1138464442 148089
 386/bin/ico - 775 sys sys 1135570818 161740
 386/bin/iconv - 775 sys sys 1135570818 113279
 386/bin/idiff - 775 sys sys 1135570818 76099
@@ -296,13 +296,13 @@
 386/bin/ip/httpd/save - 775 sys sys 1135570823 131200
 386/bin/ip/httpd/webls - 775 sys sys 1135570823 131299
 386/bin/ip/httpd/wikipost - 775 sys sys 1135570824 112661
-386/bin/ip/httpfile - 775 sys sys 1135570824 283624
+386/bin/ip/httpfile - 775 sys sys 1138500622 283922
 386/bin/ip/imap4d - 775 sys sys 1135570825 237651
 386/bin/ip/ipconfig - 775 sys sys 1135570825 137844
 386/bin/ip/ping - 775 sys sys 1135570826 76416
 386/bin/ip/ppp - 775 sys sys 1135570826 219950
 386/bin/ip/pppoe - 775 sys sys 1135570826 77544
-386/bin/ip/pptp - 775 sys sys 1135570826 126715
+386/bin/ip/pptp - 775 sys sys 1138500632 127014
 386/bin/ip/pptpd - 775 sys sys 1135570827 125862
 386/bin/ip/rarpd - 775 sys sys 1135570827 111558
 386/bin/ip/rexexec - 775 sys sys 1135570827 89967
@@ -315,8 +315,8 @@
 386/bin/join - 775 sys sys 1135570829 114087
 386/bin/jpg - 775 sys sys 1135570829 174592
 386/bin/kbmap - 775 sys sys 1135570829 143626
-386/bin/kprof - 775 sys sys 1135570830 105465
-386/bin/ktrace - 775 sys sys 1135570830 123137
+386/bin/kprof - 775 sys sys 1138500643 105075
+386/bin/ktrace - 775 sys sys 1138500657 122747
 386/bin/lens - 775 sys sys 1135570830 150725
 386/bin/lex - 775 sys sys 1136224362 99020
 386/bin/lnfs - 775 sys sys 1135570831 99434
@@ -347,8 +347,8 @@
 386/bin/netkey - 775 sys sys 1135570837 72347
 386/bin/netstat - 775 sys sys 1135570838 84660
 386/bin/news - 775 sys sys 1135570838 71700
-386/bin/nfs - 775 sys sys 1135570838 321082
-386/bin/nm - 775 sys sys 1135570839 125741
+386/bin/nfs - 775 sys sys 1138500672 321380
+386/bin/nm - 775 sys sys 1138500680 125351
 386/bin/nntpfs - 775 sys sys 1135570839 166509
 386/bin/ns - 775 sys sys 1135570839 65247
 386/bin/p - 775 sys sys 1135570839 64977
@@ -366,17 +366,17 @@
 386/bin/ppm - 775 sys sys 1135570841 149413
 386/bin/pr - 775 sys sys 1135570842 77459
 386/bin/primes - 775 sys sys 1135101636 38803
-386/bin/prof - 775 sys sys 1135570842 110928
+386/bin/prof - 775 sys sys 1138500694 110538
 386/bin/proof - 775 sys sys 1132506869 178756
 386/bin/ps - 775 sys sys 1135570842 67981
 386/bin/pwd - 775 sys sys 1130384323 36915
 386/bin/ramfs - 775 sys sys 1135570842 89784
 386/bin/rc - 775 sys sys 1135101637 143284
-386/bin/rdbfs - 775 sys sys 1135570843 174476
+386/bin/rdbfs - 775 sys sys 1138500707 174769
 386/bin/read - 775 sys sys 1135570843 58040
 386/bin/replica - 20000000775 sys sys 1018321168 0
 386/bin/replica/applychanges - 775 sys sys 1132506870 98629
-386/bin/replica/applylog - 775 sys sys 1130594777 116771
+386/bin/replica/applylog - 775 sys sys 1138500717 119437
 386/bin/replica/changes - 775 sys sys 1020319082 42
 386/bin/replica/compactdb - 775 sys sys 1130594777 78514
 386/bin/replica/pull - 775 sys sys 1020319083 39
@@ -395,12 +395,12 @@
 386/bin/sed - 775 sys sys 1135570844 89510
 386/bin/seq - 775 sys sys 1130384331 38414
 386/bin/sha1sum - 775 sys sys 1135570844 61123
-386/bin/size - 775 sys sys 1135570844 78748
+386/bin/size - 775 sys sys 1138500736 78357
 386/bin/sleep - 775 sys sys 1085077097 3413
 386/bin/snap - 775 sys sys 1136346852 313627
 386/bin/snapfs - 775 sys sys 1134389876 388292
 386/bin/sniffer - 775 sys sys 1038443185 99028
-386/bin/snoopy - 775 sys sys 1135570845 168197
+386/bin/snoopy - 775 sys sys 1138464443 168213
 386/bin/sort - 775 sys sys 1135570845 82270
 386/bin/spin - 775 sys sys 1134151359 758520
 386/bin/split - 775 sys sys 1135570845 75631
@@ -411,7 +411,7 @@
 386/bin/sshnet - 775 sys sys 1134389877 288327
 386/bin/stats - 775 sys sys 1135570846 190636
 386/bin/strings - 775 sys sys 1135570846 62107
-386/bin/strip - 775 sys sys 1135570846 80730
+386/bin/strip - 775 sys sys 1138500744 80339
 386/bin/sum - 775 sys sys 1130384338 39488
 386/bin/swap - 775 sys sys 1135570847 62130
 386/bin/syscall - 775 sys sys 1130594788 73568
@@ -431,9 +431,9 @@
 386/bin/topng - 775 sys sys 1135570850 138333
 386/bin/toppm - 775 sys sys 1135570850 165236
 386/bin/touch - 775 sys sys 1135570850 63751
-386/bin/tprof - 775 sys sys 1136346853 297508
+386/bin/tprof - 775 sys sys 1138500753 297118
 386/bin/tr - 775 sys sys 1135570851 61845
-386/bin/trace - 775 sys sys 1135570851 181182
+386/bin/trace - 775 sys sys 1138500766 181475
 386/bin/troff - 775 sys sys 1134151360 357941
 386/bin/troff2html - 775 sys sys 1132506877 85770
 386/bin/tweak - 775 sys sys 1135570852 192855
@@ -529,46 +529,46 @@
 386/lib - 20000000775 sys sys 1016826328 0
 386/lib/ape - 20000000775 sys sys 944969312 0
 386/lib/ape/lib9.a - 664 sys sys 1135531447 6906
-386/lib/ape/libap.a - 664 sys sys 1137468666 815826
-386/lib/ape/libbsd.a - 664 sys sys 1137468667 183166
-386/lib/ape/libdraw.a - 664 sys sys 1137468668 580920
-386/lib/ape/libfmt.a - 664 sys sys 1137468669 150952
+386/lib/ape/libap.a - 664 sys sys 1138500806 815698
+386/lib/ape/libbsd.a - 664 sys sys 1138500827 183176
+386/lib/ape/libdraw.a - 664 sys sys 1138500836 580882
+386/lib/ape/libfmt.a - 664 sys sys 1138500850 150976
 386/lib/ape/libl.a - 664 sys sys 1122001337 9420
-386/lib/ape/libnet.a - 664 sys sys 1137468669 16950
+386/lib/ape/libnet.a - 664 sys sys 1138500858 16950
 386/lib/ape/libregexp.a - 664 sys sys 1137468669 47670
 386/lib/ape/libutf.a - 664 sys sys 1137485201 84674
 386/lib/ape/libv.a - 664 sys sys 1137485201 19668
-386/lib/lib9p.a - 664 sys sys 1134389884 91124
+386/lib/lib9p.a - 664 sys sys 1138500863 91156
 386/lib/libString.a - 664 sys sys 1115950150 22184
-386/lib/libauth.a - 664 sys sys 1128568181 58648
-386/lib/libauthsrv.a - 664 sys sys 1117249746 34098
+386/lib/libauth.a - 664 sys sys 1138500895 58638
+386/lib/libauthsrv.a - 664 sys sys 1138500905 34210
 386/lib/libbin.a - 664 sys sys 1115950150 2534
-386/lib/libbio.a - 664 sys sys 1125346045 26064
-386/lib/libc.a - 664 sys sys 1135531448 502758
-386/lib/libcomplete.a - 664 sys sys 1115950151 6370
-386/lib/libcontrol.a - 664 sys sys 1131646654 274922
-386/lib/libdisk.a - 664 sys sys 1126321691 42236
-386/lib/libdraw.a - 664 sys sys 1135570858 374160
-386/lib/libflate.a - 664 sys sys 1115950153 76872
-386/lib/libframe.a - 664 sys sys 1136087523 66130
+386/lib/libbio.a - 664 sys sys 1138500914 26064
+386/lib/libc.a - 664 sys sys 1138500920 502724
+386/lib/libcomplete.a - 664 sys sys 1138500945 6372
+386/lib/libcontrol.a - 664 sys sys 1138500950 274924
+386/lib/libdisk.a - 664 sys sys 1138500973 42236
+386/lib/libdraw.a - 664 sys sys 1138500978 374124
+386/lib/libflate.a - 664 sys sys 1138500991 76832
+386/lib/libframe.a - 664 sys sys 1138500996 66116
 386/lib/libgeometry.a - 664 sys sys 1115950153 50470
 386/lib/libhtml.a - 664 sys sys 1128740945 220134
-386/lib/libhttpd.a - 664 sys sys 1127790504 99596
+386/lib/libhttpd.a - 664 sys sys 1138501008 99586
 386/lib/libip.a - 664 sys sys 1116126324 35602
 386/lib/libl.a - 664 sys sys 1115950154 5384
-386/lib/libmach.a - 664 sys sys 1136346854 783354
-386/lib/libmemdraw.a - 664 sys sys 1135447284 284166
+386/lib/libmach.a - 664 sys sys 1138501015 782466
+386/lib/libmemdraw.a - 664 sys sys 1138501040 284158
 386/lib/libmemlayer.a - 664 sys sys 1115950157 47360
-386/lib/libmp.a - 664 sys sys 1127360619 79944
-386/lib/libndb.a - 664 sys sys 1115950157 60666
-386/lib/libplumb.a - 664 sys sys 1133287407 19458
+386/lib/libmp.a - 664 sys sys 1138501044 79942
+386/lib/libndb.a - 664 sys sys 1138501050 60716
+386/lib/libplumb.a - 664 sys sys 1138501055 19408
 386/lib/libregexp.a - 664 sys sys 1115950157 37464
-386/lib/libscribble.a - 664 sys sys 1116815422 107282
-386/lib/libsec.a - 664 sys sys 1127360621 646908
-386/lib/libstdio.a - 664 sys sys 1115950159 126206
-386/lib/libsunrpc.a - 664 sys sys 1115950160 355994
-386/lib/libthread.a - 664 sys sys 1135531448 71308
-386/lib/libventi.a - 664 sys sys 1138211977 98048
+386/lib/libscribble.a - 664 sys sys 1138501058 107278
+386/lib/libsec.a - 664 sys sys 1138501064 646888
+386/lib/libstdio.a - 664 sys sys 1138501067 126186
+386/lib/libsunrpc.a - 664 sys sys 1138501070 355994
+386/lib/libthread.a - 664 sys sys 1138501077 71986
+386/lib/libventi.a - 664 sys sys 1138501085 98038
 386/mbr - 775 sys sys 1131317338 407
 386/mkfile - 664 sys sys 948141303 46
 386/pbs - 775 sys sys 1131317339 494
@@ -623,14 +623,14 @@ acme/acid/Acid - 775 sys sys 1015011246 86
 acme/acid/guide - 444 sys sys 1015011246 68
 acme/bin - 20000000775 sys sys 1017457907 0
 acme/bin/386 - 20000000775 sys sys 1015011570 0
-acme/bin/386/Mail - 775 sys sys 1135570855 179492
-acme/bin/386/News - 775 sys sys 1135570855 128861
-acme/bin/386/Wiki - 775 sys sys 1135570856 127437
+acme/bin/386/Mail - 775 sys sys 1138500774 179770
+acme/bin/386/News - 775 sys sys 1138500782 129160
+acme/bin/386/Wiki - 775 sys sys 1138500790 127736
 acme/bin/386/acd - 775 sys sys 1032232412 137068
 acme/bin/386/adict - 775 sys sys 1015011247 99806
 acme/bin/386/mkwnew - 775 sys sys 1130384395 38977
 acme/bin/386/spout - 775 sys sys 1135570856 61598
-acme/bin/386/win - 775 sys sys 1135570856 184737
+acme/bin/386/win - 775 sys sys 1138500797 185035
 acme/bin/Battery - 775 sys sys 1017457907 451
 acme/bin/Isspam - 775 sys sys 1063951165 235
 acme/bin/Mail - 775 sys sys 1114697798 201
@@ -5486,7 +5486,7 @@ rc/bin/psu - 775 sys sys 1019769762 333
 rc/bin/reboot - 775 sys sys 1112276658 39
 rc/bin/replica - 20000000775 sys sys 1018321122 0
 rc/bin/replica/changes - 775 sys sys 1022177304 276
-rc/bin/replica/defs - 664 sys sys 1103390458 778
+rc/bin/replica/defs - 664 sys sys 1138478589 843
 rc/bin/replica/pull - 775 sys sys 1110990531 1447
 rc/bin/replica/push - 775 sys sys 1043865725 361
 rc/bin/replica/scan - 775 sys sys 1089299188 472
@@ -5540,6 +5540,7 @@ rc/bin/thesaurus - 775 sys sys 1068054167 246
 rc/bin/tlsclienttunnel - 775 sys sys 1024375633 153
 rc/bin/tlssrvtunnel - 775 sys sys 1024375634 175
 rc/bin/troff2gif - 775 sys sys 1127410278 164
+rc/bin/troff2png - 775 sys sys 1138456827 228
 rc/bin/ups - 775 sys sys 1091021981 806
 rc/bin/uptime - 775 sys sys 1074730712 234
 rc/bin/usbstart - 775 sys sys 1044894155 81
@@ -5596,7 +5597,7 @@ sys/doc/8½ - 20000000775 sys sys 945616779 0
 sys/doc/8½/8½.ms - 664 sys sys 1138396551 31721
 sys/doc/8½/8½.ps - 664 sys sys 1020895860 797150
 sys/doc/8½/fig1.ps - 664 sys sys 1020895859 473747
-sys/doc/8½/mkfile - 664 sys sys 1020895860 215
+sys/doc/8½/mkfile - 664 sys sys 1138459303 214
 sys/doc/9.ms - 664 sys sys 1138396402 84662
 sys/doc/9.ps - 664 sys sys 960837924 508340
 sys/doc/acid.ms - 664 sys sys 1138396403 65160
@@ -5610,7 +5611,7 @@ sys/doc/acme/acme.ms - 664 sys sys 1138396552 50028
 sys/doc/acme/acme.pdf - 664 sys sys 1020384351 117006
 sys/doc/acme/acme.ps - 664 sys sys 960837907 611301
 sys/doc/acme/bs - 664 sys sys 944959634 556
-sys/doc/acme/mkfile - 664 sys sys 961259926 304
+sys/doc/acme/mkfile - 664 sys sys 1138459292 295
 sys/doc/ape.ms - 664 sys sys 1138396403 12637
 sys/doc/ape.ps - 664 sys sys 960837914 258779
 sys/doc/asm.ms - 664 sys sys 1138396403 31516
@@ -5633,7 +5634,7 @@ sys/doc/fossil.ps - 664 sys sys 1135487951 313552
 sys/doc/fs - 20000000775 sys sys 945616779 0
 sys/doc/fs/fs.pdf - 664 sys sys 1020384351 47177
 sys/doc/fs/fs.ps - 664 sys sys 960837905 276918
-sys/doc/fs/mkfile - 664 sys sys 961259926 282
+sys/doc/fs/mkfile - 664 sys sys 1138459286 273
 sys/doc/fs/p0 - 664 sys sys 1138396562 682
 sys/doc/fs/p1 - 664 sys sys 953844581 989
 sys/doc/fs/p2 - 664 sys sys 953844581 3749
@@ -5648,7 +5649,7 @@ sys/doc/il - 20000000775 sys sys 945616779 0
 sys/doc/il/il.ms - 664 sys sys 1138396552 11390
 sys/doc/il/il.pdf - 664 sys sys 1020384351 44630
 sys/doc/il/il.ps - 664 sys sys 960837905 258028
-sys/doc/il/mkfile - 664 sys sys 961259927 214
+sys/doc/il/mkfile - 664 sys sys 1138459279 206
 sys/doc/il/transition.art - 664 sys sys 944959591 4463
 sys/doc/il/transition.fig - 664 sys sys 944959591 15431
 sys/doc/il/transition.pic - 664 sys sys 944959591 11912
@@ -5658,17 +5659,19 @@ sys/doc/lexnames.ms - 664 sys sys 1138396406 34107
 sys/doc/lexnames.ps - 664 sys sys 960837909 335546
 sys/doc/libmach.ms - 664 sys sys 1138396406 24212
 sys/doc/libmach.ps - 664 sys sys 960837916 291283
-sys/doc/lp.ms - 664 sys sys 954614673 22366
+sys/doc/lp.ms - 664 sys sys 1138458212 22383
 sys/doc/lp.ps - 664 sys sys 960837917 294399
 sys/doc/mk.ms - 664 sys sys 1138396445 34456
 sys/doc/mk.ps - 664 sys sys 960837917 329779
+sys/doc/mkdirlist - 775 sys sys 1138498508 48
 sys/doc/mkfile - 664 sys sys 1138396461 2393
+sys/doc/mkfilelist - 775 sys sys 1138498508 50
 sys/doc/mkfiles.ms - 664 sys sys 1138396445 17910
 sys/doc/mkfiles.ps - 664 sys sys 960837918 269496
 sys/doc/names.ms - 664 sys sys 1138396445 22143
 sys/doc/names.ps - 664 sys sys 960837918 288716
 sys/doc/net - 20000000775 sys sys 954033300 0
-sys/doc/net/mkfile - 664 sys sys 961259927 345
+sys/doc/net/mkfile - 664 sys sys 1138459273 334
 sys/doc/net/net.ms - 664 sys sys 1138396534 41237
 sys/doc/net/net.pdf - 664 sys sys 1020384351 82603
 sys/doc/net/net.ps - 664 sys sys 960837908 350053
@@ -5703,7 +5706,7 @@ sys/doc/sam/fig4.ps - 664 sys sys 944959644 3429
 sys/doc/sam/fig5.pic - 464 sys sys 944959644 756
 sys/doc/sam/fig6.pic - 464 sys sys 944959644 1105
 sys/doc/sam/fig7.pic - 464 sys sys 944959644 258
-sys/doc/sam/mkfile - 664 sys sys 961259927 574
+sys/doc/sam/mkfile - 664 sys sys 1138459266 566
 sys/doc/sam/refs - 464 sys sys 944959644 2652
 sys/doc/sam/sam.ms - 464 sys sys 1138396552 94640
 sys/doc/sam/sam.pdf - 664 sys sys 1020384352 156123
@@ -6003,7 +6006,7 @@ sys/include/ip.h - 664 sys sys 1103554773 2989
 sys/include/keyboard.h - 664 sys sys 1131637696 865
 sys/include/libc.h - 664 sys sys 1135487938 19627
 sys/include/libsec.h - 664 sys sys 1124709121 9345
-sys/include/mach.h - 664 sys sys 1131289126 8586
+sys/include/mach.h - 664 sys sys 1138471011 8621
 sys/include/memdraw.h - 664 sys sys 1091904419 5645
 sys/include/memlayer.h - 664 sys sys 1051031022 1851
 sys/include/mouse.h - 664 sys sys 1035232010 1003
@@ -6018,13 +6021,13 @@ sys/include/regexp.h - 664 sys sys 1014929066 1308
 sys/include/scribble.h - 664 sys sys 1091904419 708
 sys/include/stdio.h - 664 sys sys 1121977155 4208
 sys/include/sunrpc.h - 664 sys sys 1046367129 7219
-sys/include/thread.h - 664 sys sys 1091904419 3594
+sys/include/thread.h - 664 sys sys 1138463280 3616
 sys/include/tos.h - 664 sys sys 1091904418 575
-sys/include/trace.h - 664 sys sys 1089299189 642
+sys/include/trace.h - 664 sys sys 1138460022 640
 sys/include/venti.h - 664 sys sys 1091904426 7150
 sys/lib - 20000000775 sys sys 1018580948 0
 sys/lib/acid - 20000000775 sys sys 1016926088 0
-sys/lib/acid/386 - 664 sys sys 1032058272 2588
+sys/lib/acid/386 - 664 sys sys 1138464088 3268
 sys/lib/acid/68020 - 664 sys sys 944955985 2487
 sys/lib/acid/acme - 664 sys sys 969499632 2291
 sys/lib/acid/alef - 664 sys sys 944955985 2293
@@ -7296,7 +7299,7 @@ sys/man/1/gzip - 664 sys sys 1124839836 3226
 sys/man/1/hget - 664 sys sys 1067722859 1483
 sys/man/1/history - 664 sys sys 1109685635 1709
 sys/man/1/hoc - 664 sys sys 1136378274 2357
-sys/man/1/htmlroff - 644 sys sys 1138396051 1831
+sys/man/1/htmlroff - 664 sys sys 1138396051 1831
 sys/man/1/idiff - 664 sys sys 1113743324 914
 sys/man/1/join - 664 sys sys 1113743324 2561
 sys/man/1/jpg - 664 sys sys 1113743325 4842
@@ -7316,7 +7319,7 @@ sys/man/1/mc - 664 sys sys 1113743326 552
 sys/man/1/mk - 664 sys sys 1113743328 13198
 sys/man/1/mkdir - 664 sys sys 1082593141 717
 sys/man/1/mlmgr - 664 sys sys 1116513886 2542
-sys/man/1/ms2html - 664 sys sys 960001562 856
+sys/man/1/ms2html - 664 sys sys 1138458899 1252
 sys/man/1/nedmail - 664 sys sys 1114697978 6820
 sys/man/1/netstat - 664 sys sys 1128255431 942
 sys/man/1/news - 664 sys sys 1113743329 1151
@@ -7338,7 +7341,7 @@ sys/man/1/ps - 664 sys sys 1113743329 1619
 sys/man/1/ps2pdf - 664 sys sys 1032632098 1359
 sys/man/1/pwd - 664 sys sys 1104639653 744
 sys/man/1/rc - 664 sys sys 1113743326 19898
-sys/man/1/replica - 664 sys sys 1113743329 6677
+sys/man/1/replica - 664 sys sys 1138479156 7209
 sys/man/1/resample - 664 sys sys 1015024740 1083
 sys/man/1/rio - 664 sys sys 1130425691 14707
 sys/man/1/rm - 664 sys sys 944959673 515
@@ -7559,7 +7562,7 @@ sys/man/3/mnt - 664 sys sys 944959698 1994
 sys/man/3/mouse - 664 sys sys 1020313480 4276
 sys/man/3/pipe - 664 sys sys 1032640674 1145
 sys/man/3/pnp - 664 sys sys 1088560895 4547
-sys/man/3/proc - 664 sys sys 1133880424 12029
+sys/man/3/proc - 664 sys sys 1138458595 12062
 sys/man/3/root - 664 sys sys 1046958450 632
 sys/man/3/rtc - 664 sys sys 954378857 667
 sys/man/3/sd - 664 sys sys 1018386776 4805
@@ -7640,13 +7643,13 @@ sys/man/6/authsrv - 664 sys sys 1128483124 13304
 sys/man/6/color - 664 sys sys 988225304 5181
 sys/man/6/face - 664 sys sys 1062505426 2846
 sys/man/6/font - 664 sys sys 1077594184 2528
-sys/man/6/htmlroff - 644 sys sys 1138396325 6608
+sys/man/6/htmlroff - 664 sys sys 1138458634 6608
 sys/man/6/image - 664 sys sys 988225304 6209
 sys/man/6/keyboard - 664 sys sys 1079575918 4418
 sys/man/6/keys.who - 664 sys sys 1110641163 775
 sys/man/6/man - 664 sys sys 944959678 4961
 sys/man/6/map - 664 sys sys 944959678 1892
-sys/man/6/mhtml - 644 sys sys 1138396055 1710
+sys/man/6/mhtml - 664 sys sys 1138458169 1711
 sys/man/6/mpictures - 664 sys sys 944959678 2899
 sys/man/6/ms - 664 sys sys 958249504 6815
 sys/man/6/namespace - 664 sys sys 1048637182 1576
@@ -7689,7 +7692,7 @@ sys/man/8/cpurc - 664 sys sys 971455510 1275
 sys/man/8/cron - 664 sys sys 1063858596 1867
 sys/man/8/dhcpd - 664 sys sys 1032654987 5237
 sys/man/8/drawterm - 664 sys sys 1135901219 1741
-sys/man/8/fossilcons - 664 sys sys 1127560168 17789
+sys/man/8/fossilcons - 664 sys sys 1138466274 18276
 sys/man/8/fs - 664 sys sys 1055701170 15029
 sys/man/8/fsconfig - 664 sys sys 1045501600 8142
 sys/man/8/gpsfs - 664 sys sys 1123643451 4924
@@ -7715,10 +7718,10 @@ sys/man/8/ping - 664 sys sys 1084473185 3436
 sys/man/8/plan9.ini - 664 sys sys 1131294569 22077
 sys/man/8/pop3 - 664 sys sys 1063854676 2720
 sys/man/8/ppp - 664 sys sys 1125530075 4414
-sys/man/8/prep - 664 sys sys 1079705872 13820
+sys/man/8/prep - 664 sys sys 1138460130 13853
 sys/man/8/qer - 664 sys sys 1067723129 4909
 sys/man/8/reboot - 664 sys sys 969499895 414
-sys/man/8/replica - 664 sys sys 1102088374 6295
+sys/man/8/replica - 664 sys sys 1138479158 6383
 sys/man/8/rsa - 664 sys sys 1057955511 4628
 sys/man/8/scanmail - 664 sys sys 969499895 10803
 sys/man/8/scuzz - 664 sys sys 984709640 7916
@@ -7726,7 +7729,7 @@ sys/man/8/secstore - 664 sys sys 1105016705 1954
 sys/man/8/securenet - 664 sys sys 954305552 3160
 sys/man/8/send - 664 sys sys 1045501634 2168
 sys/man/8/smtp - 664 sys sys 1133631990 4507
-sys/man/8/snoopy - 664 sys sys 1128179510 4054
+sys/man/8/snoopy - 664 sys sys 1138463452 4086
 sys/man/8/stats - 664 sys sys 1067722908 4291
 sys/man/8/statusbar - 664 sys sys 1131317865 1251
 sys/man/8/stub - 664 sys sys 1044830500 943
@@ -7792,10 +7795,10 @@ sys/src/9/bitsy/Booting101 - 664 sys sys 1054798506 8841
 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/clock.c - 664 sys sys 1037028998 4835
-sys/src/9/bitsy/dat.h - 664 sys sys 1131289775 5829
+sys/src/9/bitsy/dat.h - 664 sys sys 1138500731 5941
 sys/src/9/bitsy/defont.c - 664 sys sys 1017695511 21570
 sys/src/9/bitsy/devether.c - 664 sys sys 1116097769 10675
-sys/src/9/bitsy/devflash.c - 664 sys sys 1018386999 16832
+sys/src/9/bitsy/devflash.c - 664 sys sys 1138500612 16830
 sys/src/9/bitsy/devpcmcia.c - 664 sys sys 1099801570 12977
 sys/src/9/bitsy/devpenmouse.c - 664 sys sys 1131289775 9589
 sys/src/9/bitsy/devuda1341.c - 664 sys sys 1071245420 30346
@@ -7969,7 +7972,7 @@ sys/src/9/pc/etherwavelan.c - 664 sys sys 1131290380 3747
 sys/src/9/pc/floppy.h - 664 sys sys 1055700609 3835
 sys/src/9/pc/fns.h - 664 sys sys 1131290383 4461
 sys/src/9/pc/hcwAMC.h - 664 sys sys 1026860163 166004
-sys/src/9/pc/i8253.c - 664 sys sys 1096379063 6279
+sys/src/9/pc/i8253.c - 664 sys sys 1138460051 6279
 sys/src/9/pc/i8259.c - 664 sys sys 1131290399 4586
 sys/src/9/pc/init9.c - 664 sys sys 1040002518 94
 sys/src/9/pc/initcode.s - 664 sys sys 1015014519 282
@@ -8047,11 +8050,11 @@ sys/src/9/pc/wavelan.c - 664 sys sys 1127743243 27879
 sys/src/9/pc/wavelan.h - 664 sys sys 1107448246 6169
 sys/src/9/port - 20000000775 sys sys 1018469625 0
 sys/src/9/port/alarm.c - 664 sys sys 1134042902 1425
-sys/src/9/port/alloc.c - 664 sys sys 1130964595 5674
+sys/src/9/port/alloc.c - 664 sys sys 1138459977 5704
 sys/src/9/port/allocb.c - 664 sys sys 1123676437 3340
 sys/src/9/port/auth.c - 664 sys sys 1123647282 2392
 sys/src/9/port/cache.c - 664 sys sys 1126586168 9241
-sys/src/9/port/chan.c - 664 sys sys 1135974610 33663
+sys/src/9/port/chan.c - 664 sys sys 1138458251 34790
 sys/src/9/port/cis.c - 664 sys sys 1099761153 9248
 sys/src/9/port/debugalloc.c - 664 sys sys 1014931171 10402
 sys/src/9/port/dev.c - 664 sys sys 1131289870 8219
@@ -8065,15 +8068,15 @@ sys/src/9/port/devenv.c - 664 sys sys 1048644225 6992
 sys/src/9/port/devfs.c - 664 sys sys 1105799131 10783
 sys/src/9/port/devkbmap.c - 664 sys sys 1130763846 3064
 sys/src/9/port/devkprof.c - 664 sys sys 1014931173 3111
-sys/src/9/port/devloopback.c - 664 sys sys 1076612248 14573
+sys/src/9/port/devloopback.c - 664 sys sys 1138458368 14579
 sys/src/9/port/devmnt.c - 664 sys sys 1134659798 20918
 sys/src/9/port/devmntstats.c - 664 sys sys 1014931173 4039
 sys/src/9/port/devmouse.c - 664 sys sys 1130848303 13517
 sys/src/9/port/devpipe.c - 664 sys sys 1077055016 5825
 sys/src/9/port/devpnp.c - 664 sys sys 1088560907 13624
-sys/src/9/port/devproc.c - 664 sys sys 1131886823 28287
+sys/src/9/port/devproc.c - 664 sys sys 1138469351 28497
 sys/src/9/port/devroot.c - 664 sys sys 1067722764 4254
-sys/src/9/port/devsd.c - 664 sys sys 1131289885 30798
+sys/src/9/port/devsd.c - 664 sys sys 1138458233 30866
 sys/src/9/port/devsdp.c - 664 sys sys 1057323393 44800
 sys/src/9/port/devsegment.c - 664 sys sys 1131289891 9610
 sys/src/9/port/devsrv.c - 664 sys sys 1107232208 5418
@@ -8082,16 +8085,16 @@ sys/src/9/port/devtinyfs.c - 664 sys sys 1015278339 15347
 sys/src/9/port/devtls.c - 664 sys sys 1134498858 45226
 sys/src/9/port/devuart.c - 664 sys sys 1138118881 12141
 sys/src/9/port/devwd.c - 664 sys sys 1126582325 2342
-sys/src/9/port/edf.c - 664 sys sys 1099760881 12742
-sys/src/9/port/edf.h - 664 sys sys 1084475128 1156
+sys/src/9/port/edf.c - 664 sys sys 1138472540 13489
+sys/src/9/port/edf.h - 664 sys sys 1138469072 1195
 sys/src/9/port/error.h - 664 sys sys 1117055493 2637
-sys/src/9/port/fault.c - 664 sys sys 1131289901 7271
+sys/src/9/port/fault.c - 664 sys sys 1138459838 7265
 sys/src/9/port/initcode.c - 664 sys sys 1055688491 574
 sys/src/9/port/latin1.c - 664 sys sys 1015278339 1418
 sys/src/9/port/latin1.h - 664 sys sys 1103633666 3563
 sys/src/9/port/lib.h - 664 sys sys 1131289913 6040
 sys/src/9/port/log.c - 664 sys sys 1014931175 2860
-sys/src/9/port/master - 664 sys sys 1131289934 510
+sys/src/9/port/master - 664 sys sys 1138469433 479
 sys/src/9/port/master.local - 664 sys sys 1063856961 130
 sys/src/9/port/mkbootrules - 775 sys sys 1055700518 923
 sys/src/9/port/mkdevc - 775 sys sys 1109202243 3889
@@ -8109,13 +8112,13 @@ sys/src/9/port/netif.c - 664 sys sys 1066514951 13421
 sys/src/9/port/netif.h - 664 sys sys 1066514947 2975
 sys/src/9/port/page.c - 664 sys sys 1131636090 11128
 sys/src/9/port/parse.c - 664 sys sys 1014931177 2026
-sys/src/9/port/pgrp.c - 664 sys sys 1072704671 3940
-sys/src/9/port/portclock.c - 664 sys sys 1102093397 4556
-sys/src/9/port/portdat.h - 664 sys sys 1138127259 22540
-sys/src/9/port/portfns.h - 664 sys sys 1138047830 11023
+sys/src/9/port/pgrp.c - 664 sys sys 1138458260 4760
+sys/src/9/port/portclock.c - 664 sys sys 1138458385 4211
+sys/src/9/port/portdat.h - 664 sys sys 1138458366 22535
+sys/src/9/port/portfns.h - 664 sys sys 1138469535 11079
 sys/src/9/port/portmkfile - 664 sys sys 1131907975 2062
 sys/src/9/port/print.c - 664 sys sys 1014931178 227
-sys/src/9/port/proc.c - 664 sys sys 1138028309 27967
+sys/src/9/port/proc.c - 664 sys sys 1138469345 28053
 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/rdb.c - 664 sys sys 1018721202 1698
@@ -8129,7 +8132,7 @@ sys/src/9/port/systab.h - 664 sys sys 1062721698 3044
 sys/src/9/port/taslock.c - 664 sys sys 1131290039 3928
 sys/src/9/port/thwack.c - 664 sys sys 1057323394 7253
 sys/src/9/port/thwack.h - 664 sys sys 1015278340 1792
-sys/src/9/port/tod.c - 664 sys sys 1067722762 4856
+sys/src/9/port/tod.c - 664 sys sys 1138459530 5336
 sys/src/9/port/unthwack.c - 664 sys sys 1057323394 5249
 sys/src/9/port/xalloc.c - 664 sys sys 1131290051 4063
 sys/src/9/ppc - 20000000775 sys sys 1059490838 0
@@ -8138,7 +8141,7 @@ sys/src/9/ppc/blast.h - 664 sys sys 1059490750 3109
 sys/src/9/ppc/clock.c - 664 sys sys 1131290066 1076
 sys/src/9/ppc/dat.h - 664 sys sys 1127274100 4735
 sys/src/9/ppc/devether.c - 664 sys sys 1131290184 9327
-sys/src/9/ppc/devflash.c - 664 sys sys 1059490750 19885
+sys/src/9/ppc/devflash.c - 664 sys sys 1138469487 19884
 sys/src/9/ppc/devirq.c - 664 sys sys 1100701675 6314
 sys/src/9/ppc/devtls.c - 664 sys sys 1059490751 43721
 sys/src/9/ppc/etherfcc.c - 664 sys sys 1131290110 19599
@@ -8163,7 +8166,7 @@ sys/src/9/ppc/msaturn.h - 664 sys sys 1059490753 99
 sys/src/9/ppc/mtx.c - 664 sys sys 1059490753 177
 sys/src/9/ppc/random.c - 664 sys sys 1059490753 1983
 sys/src/9/ppc/saturntimer.c - 664 sys sys 1072705482 1737
-sys/src/9/ppc/trap.c - 664 sys sys 1131290140 17067
+sys/src/9/ppc/trap.c - 664 sys sys 1138469503 17084
 sys/src/9/ppc/uartsaturn.c - 664 sys sys 1059490754 7151
 sys/src/9/ppc/uartsmc.c - 664 sys sys 1131290162 9764
 sys/src/9/ppc/ucu - 664 sys sys 1067722849 672
@@ -9224,7 +9227,7 @@ sys/src/cmd/8c/peep.c - 664 sys sys 1089299181 11182
 sys/src/cmd/8c/reg.c - 664 sys sys 1113585456 20572
 sys/src/cmd/8c/sgen.c - 664 sys sys 1089299181 12833
 sys/src/cmd/8c/swt.c - 664 sys sys 1098463321 10943
-sys/src/cmd/8c/txt.c - 664 sys sys 1089299180 24215
+sys/src/cmd/8c/txt.c - 664 sys sys 1138460007 23789
 sys/src/cmd/8l - 20000000775 sys sys 1017165863 0
 sys/src/cmd/8l/asm.c - 664 sys sys 1107755623 11882
 sys/src/cmd/8l/compat.c - 664 sys sys 944960733 445
@@ -9655,7 +9658,7 @@ 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/reboot.c - 664 sys sys 1116769521 1429
 sys/src/cmd/aux/searchfs.c - 664 sys sys 1014925091 18176
-sys/src/cmd/aux/statusbar.c - 664 sys sys 1131209286 6025
+sys/src/cmd/aux/statusbar.c - 664 sys sys 1138460096 6066
 sys/src/cmd/aux/stub.c - 664 sys sys 1098196222 2723
 sys/src/cmd/aux/timesync.c - 664 sys sys 1107448970 25758
 sys/src/cmd/aux/trampoline.c - 664 sys sys 1126104850 3790
@@ -9820,8 +9823,8 @@ sys/src/cmd/cc/macbody - 664 sys sys 1108281581 11703
 sys/src/cmd/cc/machcap.c - 664 sys sys 1084472048 78
 sys/src/cmd/cc/mkfile - 664 sys sys 1107365240 563
 sys/src/cmd/cc/pickle.c - 664 sys sys 1063855374 4829
-sys/src/cmd/cc/scon.c - 664 sys sys 1134321732 8645
-sys/src/cmd/cc/sub.c - 664 sys sys 1134321729 34315
+sys/src/cmd/cc/scon.c - 664 sys sys 1138463621 8788
+sys/src/cmd/cc/sub.c - 664 sys sys 1138463622 34377
 sys/src/cmd/cc/y.tab.c - 664 sys sys 1098501521 53564
 sys/src/cmd/cc/y.tab.h - 664 sys sys 1098501521 1680
 sys/src/cmd/cdfs - 20000000775 sys sys 959922196 0
@@ -10118,20 +10121,20 @@ sys/src/cmd/file.c - 664 sys sys 1125313891 23512
 sys/src/cmd/fmt.c - 664 sys sys 1137603598 4078
 sys/src/cmd/fortune.c - 664 sys sys 1072729222 1779
 sys/src/cmd/fossil - 20000000775 sys sys 1042005512 0
-sys/src/cmd/fossil/9.h - 664 sys sys 1091904424 4342
-sys/src/cmd/fossil/9auth.c - 664 sys sys 1061530721 3393
+sys/src/cmd/fossil/9.h - 664 sys sys 1138465941 4438
+sys/src/cmd/fossil/9auth.c - 664 sys sys 1138465942 3863
 sys/src/cmd/fossil/9dir.c - 664 sys sys 1085333382 2219
 sys/src/cmd/fossil/9excl.c - 664 sys sys 1042005502 1887
 sys/src/cmd/fossil/9fid.c - 664 sys sys 1045600016 5521
 sys/src/cmd/fossil/9fsys.c - 664 sys sys 1134305453 33320
-sys/src/cmd/fossil/9lstn.c - 664 sys sys 1042005503 2865
-sys/src/cmd/fossil/9p.c - 664 sys sys 1104940048 21862
+sys/src/cmd/fossil/9lstn.c - 664 sys sys 1138469518 3024
+sys/src/cmd/fossil/9p.c - 664 sys sys 1138465942 22935
 sys/src/cmd/fossil/9ping.c - 664 sys sys 1042005503 1563
-sys/src/cmd/fossil/9proc.c - 664 sys sys 1079034426 14680
-sys/src/cmd/fossil/9srv.c - 664 sys sys 1077896346 3879
+sys/src/cmd/fossil/9proc.c - 664 sys sys 1138469518 15148
+sys/src/cmd/fossil/9srv.c - 664 sys sys 1138465941 3956
 sys/src/cmd/fossil/9user.c - 664 sys sys 1071179088 17260
 sys/src/cmd/fossil/Ccli.c - 664 sys sys 1042005504 1624
-sys/src/cmd/fossil/Ccmd.c - 664 sys sys 1080586882 7982
+sys/src/cmd/fossil/Ccmd.c - 664 sys sys 1138465941 7985
 sys/src/cmd/fossil/Ccons.c - 664 sys sys 1055703737 6620
 sys/src/cmd/fossil/Clog.c - 664 sys sys 1042005505 591
 sys/src/cmd/fossil/archive.c - 664 sys sys 1087005594 10230
@@ -12261,7 +12264,7 @@ sys/src/cmd/htmlroff/t6.c - 664 sys sys 1138396081 1135
 sys/src/cmd/htmlroff/t7.c - 664 sys sys 1138396082 8626
 sys/src/cmd/htmlroff/t8.c - 664 sys sys 1138396082 6245
 sys/src/cmd/htmlroff/t9.c - 664 sys sys 1138396082 47
-sys/src/cmd/htmlroff/util.c - 664 sys sys 1138396082 1615
+sys/src/cmd/htmlroff/util.c - 664 sys sys 1138458817 1625
 sys/src/cmd/iconv.c - 664 sys sys 1039753035 1801
 sys/src/cmd/idiff.c - 664 sys sys 1014926695 6896
 sys/src/cmd/import.c - 664 sys sys 1133180705 7028
@@ -12371,25 +12374,25 @@ sys/src/cmd/ip/snoopy - 20000000775 sys sys 1015090062 0
 sys/src/cmd/ip/snoopy/arp.c - 664 sys sys 1128179536 1914
 sys/src/cmd/ip/snoopy/bootp.c - 664 sys sys 1128179536 3440
 sys/src/cmd/ip/snoopy/dat.h - 664 sys sys 1128179536 1915
-sys/src/cmd/ip/snoopy/dhcp.c - 664 sys sys 1128179537 9104
-sys/src/cmd/ip/snoopy/dump.c - 664 sys sys 1128179537 1136
+sys/src/cmd/ip/snoopy/dhcp.c - 664 sys sys 1138463389 8958
+sys/src/cmd/ip/snoopy/dump.c - 664 sys sys 1138463389 1078
 sys/src/cmd/ip/snoopy/eap.c - 664 sys sys 1128179537 3996
 sys/src/cmd/ip/snoopy/eap_identity.c - 664 sys sys 1128179537 50
 sys/src/cmd/ip/snoopy/eapol.c - 664 sys sys 1128179537 1890
 sys/src/cmd/ip/snoopy/eapol_key.c - 664 sys sys 1128179537 2025
 sys/src/cmd/ip/snoopy/ether.c - 664 sys sys 1128179537 2013
-sys/src/cmd/ip/snoopy/filter.y - 664 sys sys 1045505292 1536
+sys/src/cmd/ip/snoopy/filter.y - 664 sys sys 1138463389 1739
 sys/src/cmd/ip/snoopy/gre.c - 664 sys sys 1015090059 1503
 sys/src/cmd/ip/snoopy/hdlc.c - 664 sys sys 1128179537 4285
 sys/src/cmd/ip/snoopy/icmp.c - 664 sys sys 1128179538 2969
 sys/src/cmd/ip/snoopy/icmp6.c - 664 sys sys 1128179538 7736
-sys/src/cmd/ip/snoopy/il.c - 664 sys sys 1128179538 2255
+sys/src/cmd/ip/snoopy/il.c - 664 sys sys 1138463390 2261
 sys/src/cmd/ip/snoopy/ip.c - 664 sys sys 1128179538 4300
 sys/src/cmd/ip/snoopy/ip6.c - 664 sys sys 1128179538 5371
-sys/src/cmd/ip/snoopy/main.c - 664 sys sys 1128179536 15408
-sys/src/cmd/ip/snoopy/mkfile - 664 sys sys 1128179536 849
-sys/src/cmd/ip/snoopy/ninep.c - 664 sys sys 1128179538 701
-sys/src/cmd/ip/snoopy/ospf.c - 664 sys sys 1128179539 7522
+sys/src/cmd/ip/snoopy/main.c - 664 sys sys 1138463390 15607
+sys/src/cmd/ip/snoopy/mkfile - 664 sys sys 1138463439 879
+sys/src/cmd/ip/snoopy/ninep.c - 664 sys sys 1138463390 555
+sys/src/cmd/ip/snoopy/ospf.c - 664 sys sys 1138463391 7369
 sys/src/cmd/ip/snoopy/ppp.c - 664 sys sys 1128179539 10544
 sys/src/cmd/ip/snoopy/ppp_ccp.c - 664 sys sys 1015090061 50
 sys/src/cmd/ip/snoopy/ppp_chap.c - 664 sys sys 1015090061 50
@@ -12400,8 +12403,8 @@ sys/src/cmd/ip/snoopy/pppoe_disc.c - 664 sys sys 1128179539 2513
 sys/src/cmd/ip/snoopy/pppoe_sess.c - 664 sys sys 1033797942 36
 sys/src/cmd/ip/snoopy/rarp.c - 664 sys sys 1015090062 50
 sys/src/cmd/ip/snoopy/rc4keydesc.c - 664 sys sys 1128179539 56
-sys/src/cmd/ip/snoopy/rtcp.c - 664 sys sys 1128179540 1964
-sys/src/cmd/ip/snoopy/rtp.c - 664 sys sys 1128179540 1166
+sys/src/cmd/ip/snoopy/rtcp.c - 664 sys sys 1138463392 1818
+sys/src/cmd/ip/snoopy/rtp.c - 664 sys sys 1138463392 1021
 sys/src/cmd/ip/snoopy/tcp.c - 664 sys sys 1128179540 3602
 sys/src/cmd/ip/snoopy/ttls.c - 664 sys sys 1128179540 1451
 sys/src/cmd/ip/snoopy/udp.c - 664 sys sys 1128179540 1999
@@ -13088,7 +13091,7 @@ sys/src/cmd/read.c - 664 sys sys 1022047660 1278
 sys/src/cmd/replica - 20000000775 sys sys 1018321113 0
 sys/src/cmd/replica/all.h - 664 sys sys 1091904421 1265
 sys/src/cmd/replica/applychanges.c - 664 sys sys 1068497831 6123
-sys/src/cmd/replica/applylog.c - 664 sys sys 1111253491 18157
+sys/src/cmd/replica/applylog.c - 664 sys sys 1138478558 21811
 sys/src/cmd/replica/avl.c - 664 sys sys 1068497830 6242
 sys/src/cmd/replica/compactdb.c - 664 sys sys 1018323475 652
 sys/src/cmd/replica/db.c - 664 sys sys 1019340165 2989
@@ -13321,7 +13324,7 @@ sys/src/cmd/tbl/t7.c - 664 sys sys 944961244 3422
 sys/src/cmd/tbl/t8.c - 664 sys sys 1131293517 9041
 sys/src/cmd/tbl/t9.c - 664 sys sys 944961244 1577
 sys/src/cmd/tbl/tb.c - 664 sys sys 944961244 1732
-sys/src/cmd/tbl/tc.c - 664 sys sys 1131293494 1274
+sys/src/cmd/tbl/tc.c - 664 sys sys 1138463701 1414
 sys/src/cmd/tbl/te.c - 664 sys sys 944961244 1071
 sys/src/cmd/tbl/tf.c - 664 sys sys 944961244 1283
 sys/src/cmd/tbl/tg.c - 664 sys sys 1128819351 2164
@@ -13333,7 +13336,7 @@ sys/src/cmd/tbl/tt.c - 664 sys sys 944961244 1708
 sys/src/cmd/tbl/tu.c - 664 sys sys 944961244 4817
 sys/src/cmd/tbl/tv.c - 664 sys sys 944961244 3329
 sys/src/cmd/tcs - 20000000775 sys sys 954034511 0
-sys/src/cmd/tcs/8859.h - 644 sys sys 1138382778 16466
+sys/src/cmd/tcs/8859.h - 664 sys sys 1138382778 16466
 sys/src/cmd/tcs/big5.c - 664 sys sys 944961288 99606
 sys/src/cmd/tcs/big5.h - 664 sys sys 944961287 112
 sys/src/cmd/tcs/conv.h - 664 sys sys 1135487940 941
@@ -13373,9 +13376,9 @@ sys/src/cmd/tcs/kuten208.c - 664 sys sys 948046995 59960
 sys/src/cmd/tcs/kuten208.h - 664 sys sys 944961287 94
 sys/src/cmd/tcs/kuten212.c - 664 sys sys 944961289 55407
 sys/src/cmd/tcs/kuten212.h - 664 sys sys 944961287 94
-sys/src/cmd/tcs/misc.h - 644 sys sys 1138382780 19274
+sys/src/cmd/tcs/misc.h - 664 sys sys 1138382780 19274
 sys/src/cmd/tcs/mkfile - 664 sys sys 1138382781 591
-sys/src/cmd/tcs/ms.h - 644 sys sys 1138382780 44069
+sys/src/cmd/tcs/ms.h - 664 sys sys 1138382780 44069
 sys/src/cmd/tcs/plan9.h - 664 sys sys 944961287 751
 sys/src/cmd/tcs/tcs.c - 664 sys sys 1138382781 15489
 sys/src/cmd/tcs/utf.c - 664 sys sys 1125501123 7962
@@ -13451,7 +13454,7 @@ sys/src/cmd/unix/drawterm/Make.irix - 664 sys sys 1137502401 493
 sys/src/cmd/unix/drawterm/Make.unix - 664 sys sys 1135900534 429
 sys/src/cmd/unix/drawterm/Make.win32 - 664 sys sys 1135900534 816
 sys/src/cmd/unix/drawterm/Makefile - 664 sys sys 1135900534 1112
-sys/src/cmd/unix/drawterm/README - 664 sys sys 1135900534 925
+sys/src/cmd/unix/drawterm/README - 664 sys sys 1138469123 1002
 sys/src/cmd/unix/drawterm/args.h - 664 sys sys 1135900534 709
 sys/src/cmd/unix/drawterm/bin - 20000000775 sys sys 959090509 0
 sys/src/cmd/unix/drawterm/cpu-bl.c - 664 sys sys 1135900534 14118
@@ -14107,7 +14110,7 @@ sys/src/cmd/venti/checkindex.c - 664 sys sys 1055707429 4115
 sys/src/cmd/venti/clump.c - 664 sys sys 1019678877 4148
 sys/src/cmd/venti/clumpstats.c - 664 sys sys 1055707430 2239
 sys/src/cmd/venti/conf.rc - 775 sys sys 1055707446 1416
-sys/src/cmd/venti/config.c - 664 sys sys 1063854193 4956
+sys/src/cmd/venti/config.c - 664 sys sys 1138471074 4930
 sys/src/cmd/venti/conv.c - 664 sys sys 1019678878 8202
 sys/src/cmd/venti/copy.c - 664 sys sys 1055707434 3517
 sys/src/cmd/venti/dat.h - 664 sys sys 1132452191 15346
@@ -14117,7 +14120,7 @@ sys/src/cmd/venti/dumparena.c - 664 sys sys 1019678878 6381
 sys/src/cmd/venti/dumpvacroots - 775 sys sys 1044904736 467
 sys/src/cmd/venti/findscore.c - 664 sys sys 1121977913 2605
 sys/src/cmd/venti/fmtarenas.c - 664 sys sys 1132452192 2213
-sys/src/cmd/venti/fmtindex.c - 664 sys sys 1055707425 2534
+sys/src/cmd/venti/fmtindex.c - 664 sys sys 1138471072 2524
 sys/src/cmd/venti/fmtisect.c - 664 sys sys 1132452192 1326
 sys/src/cmd/venti/fns.h - 664 sys sys 1055707422 6793
 sys/src/cmd/venti/httpd.c - 664 sys sys 1045503654 9107
@@ -14416,7 +14419,7 @@ sys/src/games/music/jukebox/colors.c - 664 sys sys 1103793918 3819
 sys/src/games/music/jukebox/colors.h - 664 sys sys 1103793918 692
 sys/src/games/music/jukebox/mk.dep - 664 sys sys 1103793918 653
 sys/src/games/music/jukebox/mkfile - 664 sys sys 1103793918 234
-sys/src/games/music/jukebox/music.c - 664 sys sys 1111074158 28912
+sys/src/games/music/jukebox/music.c - 664 sys sys 1138463667 30760
 sys/src/games/music/jukebox/playlist.c - 664 sys sys 1111156611 6629
 sys/src/games/music/jukebox/playlist.h - 664 sys sys 1103793919 505
 sys/src/games/music/jukefs - 20000000775 sys sys 1103793922 0
@@ -14437,7 +14440,7 @@ sys/src/games/music/missing - 775 sys sys 1103793915 72
 sys/src/games/music/mkfile - 664 sys sys 1103793915 723
 sys/src/games/music/mkinc - 664 sys sys 1103793915 92
 sys/src/games/music/playlistfs - 20000000775 sys sys 1103794221 0
-sys/src/games/music/playlistfs/boilerplate.c - 664 sys sys 1131293384 1547
+sys/src/games/music/playlistfs/boilerplate.c - 664 sys sys 1138469137 1585
 sys/src/games/music/playlistfs/fs.c - 664 sys sys 1111504109 17985
 sys/src/games/music/playlistfs/main.c - 664 sys sys 1103793922 1636
 sys/src/games/music/playlistfs/mk.dep - 664 sys sys 1103793923 594
@@ -14539,7 +14542,7 @@ sys/src/libauthsrv/mkfile - 664 sys sys 1035389776 409
 sys/src/libauthsrv/nvcsum.c - 664 sys sys 1015091654 192
 sys/src/libauthsrv/opasstokey.c - 664 sys sys 1015091654 448
 sys/src/libauthsrv/passtokey.c - 664 sys sys 1015091654 517
-sys/src/libauthsrv/readnvram.c - 664 sys sys 1117193209 8752
+sys/src/libauthsrv/readnvram.c - 664 sys sys 1138469173 8809
 sys/src/libbin - 20000000775 sys sys 984777332 0
 sys/src/libbin/bin.c - 664 sys sys 1135487932 1829
 sys/src/libbin/mkfile - 664 sys sys 1035389776 197
@@ -14932,7 +14935,7 @@ sys/src/libc/port/utfutf.c - 664 sys sys 1014927408 389
 sys/src/libc/power - 20000000775 sys sys 984709299 0
 sys/src/libc/power/argv0.s - 664 sys sys 1067719057 88
 sys/src/libc/power/cycles.s - 664 sys sys 1100701675 322
-sys/src/libc/power/getcallerpc.s - 664 sys sys 944961720 51
+sys/src/libc/power/getcallerpc.s - 664 sys sys 1138463299 52
 sys/src/libc/power/getfcr.s - 664 sys sys 944961719 352
 sys/src/libc/power/main9.s - 664 sys sys 1067719057 415
 sys/src/libc/power/main9p.s - 664 sys sys 1067719058 620
@@ -15146,26 +15149,26 @@ sys/src/libmach/0.c - 664 sys sys 1131289379 4080
 sys/src/libmach/0c - 20000000775 sys sys 1114459438 0
 sys/src/libmach/0c/README - 664 sys sys 1114459609 73
 sys/src/libmach/0c/ureg.h - 664 sys sys 1114459438 886
-sys/src/libmach/2.c - 664 sys sys 1131289379 2074
+sys/src/libmach/2.c - 664 sys sys 1138471014 2085
 sys/src/libmach/2db.c - 664 sys sys 1136322405 61334
 sys/src/libmach/2obj.c - 664 sys sys 1091732624 2335
-sys/src/libmach/5.c - 664 sys sys 1131289380 1553
+sys/src/libmach/5.c - 664 sys sys 1138471013 1564
 sys/src/libmach/5db.c - 664 sys sys 1136322405 21586
 sys/src/libmach/5obj.c - 664 sys sys 1091732625 2209
-sys/src/libmach/6.c - 664 sys sys 1131289380 3464
+sys/src/libmach/6.c - 664 sys sys 1138471019 3482
 sys/src/libmach/6c - 20000000775 sys sys 1123100867 0
 sys/src/libmach/6c/6.out.h - 664 sys sys 1114459480 7984
 sys/src/libmach/6obj.c - 664 sys sys 1114459831 2382
-sys/src/libmach/7.c - 664 sys sys 1131289380 3299
+sys/src/libmach/7.c - 664 sys sys 1138471022 3310
 sys/src/libmach/7db.c - 664 sys sys 1136322405 17355
 sys/src/libmach/7obj.c - 664 sys sys 1091732676 2367
-sys/src/libmach/8.c - 664 sys sys 1131289381 2060
+sys/src/libmach/8.c - 664 sys sys 1138471020 2071
 sys/src/libmach/8db.c - 664 sys sys 1136322405 50889
 sys/src/libmach/8obj.c - 664 sys sys 1091732625 2200
 sys/src/libmach/access.c - 664 sys sys 1131289377 4588
 sys/src/libmach/elf.h - 664 sys sys 1131292881 2301
-sys/src/libmach/executable.c - 664 sys sys 1131289375 16128
-sys/src/libmach/k.c - 664 sys sys 1131289378 3370
+sys/src/libmach/executable.c - 664 sys sys 1138471015 16006
+sys/src/libmach/k.c - 664 sys sys 1138471021 3381
 sys/src/libmach/kdb.c - 664 sys sys 1136322404 21222
 sys/src/libmach/kobj.c - 664 sys sys 1091732625 2217
 sys/src/libmach/machdata.c - 664 sys sys 1131289377 8799
@@ -15178,8 +15181,8 @@ sys/src/libmach/qdb.c - 664 sys sys 1136322404 27544
 sys/src/libmach/qobj.c - 664 sys sys 1091732625 2310
 sys/src/libmach/setmach.c - 664 sys sys 1119476886 2911
 sys/src/libmach/swap.c - 664 sys sys 1131289376 1056
-sys/src/libmach/sym.c - 664 sys sys 1131289377 26729
-sys/src/libmach/u.c - 664 sys sys 1131289378 3436
+sys/src/libmach/sym.c - 664 sys sys 1138471012 26745
+sys/src/libmach/u.c - 664 sys sys 1138471017 3447
 sys/src/libmach/uc - 20000000775 sys sys 1114459488 0
 sys/src/libmach/uc/README - 664 sys sys 1114459488 73
 sys/src/libmach/uc/u.out.h - 664 sys sys 1114459488 3137
@@ -15523,7 +15526,7 @@ sys/src/libthread/note.c - 664 sys sys 1055700452 2265
 sys/src/libthread/power.c - 664 sys sys 1014928159 585
 sys/src/libthread/ref.c - 664 sys sys 1014928159 168
 sys/src/libthread/rendez.c - 664 sys sys 1135487954 1909
-sys/src/libthread/sched.c - 664 sys sys 1135487951 3094
+sys/src/libthread/sched.c - 664 sys sys 1138463237 3342
 sys/src/libthread/test.c - 664 sys sys 1014928159 228
 sys/src/libthread/threadimpl.h - 664 sys sys 1135487955 4689
 sys/src/libthread/tprimes.c - 664 sys sys 1014928160 798
@@ -15564,7 +15567,7 @@ usr/glenda/bin - 20000000775 glenda glenda 953406597 0
 usr/glenda/bin/386 - 20000000775 glenda glenda 953406597 0
 usr/glenda/bin/mips - 20000000775 glenda glenda 953406597 0
 usr/glenda/bin/rc - 20000000775 glenda glenda 954101780 0
-usr/glenda/bin/rc/pull - 775 glenda glenda 1093453255 224
+usr/glenda/bin/rc/pull - 775 glenda glenda 1138478624 272
 usr/glenda/bin/rc/riostart - 775 glenda glenda 1018974192 341
 usr/glenda/bin/rc/screensize - 775 glenda glenda 1019273896 145
 usr/glenda/lib - 20000000775 glenda glenda 959740302 0

+ 167 - 164
dist/replica/plan9.db

@@ -15,12 +15,12 @@
 386/_9pcdisk.gz - 664 sys sys 1039764191 695837
 386/bin - 20000000775 sys sys 1018897690 0
 386/bin/8a - 775 sys sys 1135570766 116009
-386/bin/8c - 775 sys sys 1135570766 362140
+386/bin/8c - 775 sys sys 1138464441 361964
 386/bin/8l - 775 sys sys 1130384229 115712
 386/bin/9660srv - 775 sys sys 1135570766 104023
-386/bin/aan - 775 sys sys 1135570767 130761
-386/bin/acid - 775 sys sys 1136346850 400912
-386/bin/acme - 775 sys sys 1136087521 429186
+386/bin/aan - 775 sys sys 1138500151 131061
+386/bin/acid - 775 sys sys 1138500164 400525
+386/bin/acme - 775 sys sys 1138500184 429460
 386/bin/ape - 20000000775 sys sys 1016944144 0
 386/bin/ape/basename - 775 sys sys 1136656314 132873
 386/bin/ape/cc - 775 sys sys 1135570769 70399
@@ -37,27 +37,27 @@
 386/bin/ape/stty - 775 sys sys 1130384232 41057
 386/bin/ape/tar - 775 sys sys 1135570769 61941
 386/bin/ape/uname - 775 sys sys 1136656327 132702
-386/bin/aquarela - 775 sys sys 1136656329 331912
+386/bin/aquarela - 775 sys sys 1138500199 332204
 386/bin/ar - 775 sys sys 1135570769 111942
 386/bin/archfs - 775 sys sys 1135570769 146849
 386/bin/ascii - 775 sys sys 1135570770 64641
 386/bin/astro - 775 sys sys 1130384233 138837
 386/bin/auth - 20000000775 sys sys 1016920815 0
-386/bin/auth/aescbc - 775 sys sys 1135570770 140764
+386/bin/auth/aescbc - 775 sys sys 1138500222 140815
 386/bin/auth/asn12rsa - 775 sys sys 1135570770 120433
 386/bin/auth/authsrv - 775 sys sys 1135570771 165460
 386/bin/auth/changeuser - 775 sys sys 1135570771 97011
-386/bin/auth/convkeys - 775 sys sys 1135570771 87436
-386/bin/auth/convkeys2 - 775 sys sys 1135570771 87487
+386/bin/auth/convkeys - 775 sys sys 1138500239 87487
+386/bin/auth/convkeys2 - 775 sys sys 1138500253 87538
 386/bin/auth/cron - 775 sys sys 1135570772 143956
 386/bin/auth/debug - 775 sys sys 1135570772 101051
 386/bin/auth/disable - 775 sys sys 1020319057 146
 386/bin/auth/enable - 775 sys sys 1020319057 134
-386/bin/auth/factotum - 775 sys sys 1135570773 318316
-386/bin/auth/fgui - 775 sys sys 1135570773 218329
+386/bin/auth/factotum - 775 sys sys 1138500268 318365
+386/bin/auth/fgui - 775 sys sys 1138500284 218624
 386/bin/auth/guard.srv - 775 sys sys 1135570774 142833
 386/bin/auth/iam - 775 sys sys 1085076981 50791
-386/bin/auth/keyfs - 775 sys sys 1135570774 115579
+386/bin/auth/keyfs - 775 sys sys 1138500299 115630
 386/bin/auth/login - 775 sys sys 1135570774 104481
 386/bin/auth/newns - 775 sys sys 1135570774 89719
 386/bin/auth/none - 775 sys sys 1135570775 89007
@@ -71,13 +71,13 @@
 386/bin/auth/rsafill - 775 sys sys 1135570777 143608
 386/bin/auth/rsagen - 775 sys sys 1135570778 153242
 386/bin/auth/secretpem - 775 sys sys 1045537944 118526
-386/bin/auth/secstore - 775 sys sys 1135570778 195447
+386/bin/auth/secstore - 775 sys sys 1138500327 195492
 386/bin/auth/secstored - 775 sys sys 1135570779 197002
 386/bin/auth/secuser - 775 sys sys 1135570779 152936
 386/bin/auth/status - 775 sys sys 1020319060 738
 386/bin/auth/uniq - 775 sys sys 1135570779 63055
 386/bin/auth/warning - 775 sys sys 1135570779 100633
-386/bin/auth/wrkey - 775 sys sys 1135570779 75197
+386/bin/auth/wrkey - 775 sys sys 1138500378 75242
 386/bin/aux - 20000000775 sys sys 1016920817 0
 386/bin/aux/9pcon - 775 sys sys 1135570780 94910
 386/bin/aux/LOCK - 775 sys sys 1135570780 59902
@@ -85,15 +85,15 @@
 386/bin/aux/accupoint - 775 sys sys 1130384245 40077
 386/bin/aux/acidleak - 775 sys sys 1135570780 69430
 386/bin/aux/antiword - 775 sys sys 1070288096 511478
-386/bin/aux/apm - 775 sys sys 1135570781 180009
+386/bin/aux/apm - 775 sys sys 1138500391 180310
 386/bin/aux/astarld - 775 sys sys 1135570781 64675
 386/bin/aux/cddb - 775 sys sys 1135570781 72214
 386/bin/aux/clog - 775 sys sys 1135570782 66431
-386/bin/aux/consolefs - 775 sys sys 1135570782 153921
+386/bin/aux/consolefs - 775 sys sys 1138464441 153937
 386/bin/aux/conswdir - 775 sys sys 1062080411 38855
 386/bin/aux/cropmarks - 775 sys sys 1020319062 1808
 386/bin/aux/data2s - 775 sys sys 1135570782 60518
-386/bin/aux/depend - 775 sys sys 1135570782 145569
+386/bin/aux/depend - 775 sys sys 1138500404 145864
 386/bin/aux/disksim - 775 sys sys 1135570783 150431
 386/bin/aux/download - 775 sys sys 1087442506 176016
 386/bin/aux/faxreceive - 775 sys sys 1135570783 83923
@@ -102,7 +102,7 @@
 386/bin/aux/g3p9bit - 775 sys sys 1104121976 67278
 386/bin/aux/getflags - 775 sys sys 1130384250 43835
 386/bin/aux/gpsevermore - 775 sys sys 1135570784 71477
-386/bin/aux/gpsfs - 775 sys sys 1135570784 182265
+386/bin/aux/gpsfs - 775 sys sys 1138500417 182563
 386/bin/aux/grabit - 775 sys sys 1020319063 1244
 386/bin/aux/hardcopy - 775 sys sys 1020319063 1699
 386/bin/aux/isvmware - 775 sys sys 1032486791 23997
@@ -117,17 +117,17 @@
 386/bin/aux/mklatinkbd - 775 sys sys 1135570786 64164
 386/bin/aux/mnihongo - 775 sys sys 1135570786 139629
 386/bin/aux/mouse - 775 sys sys 1130384253 44044
-386/bin/aux/ms2 - 775 sys sys 1135570786 87426
+386/bin/aux/ms2 - 775 sys sys 1138500429 87049
 386/bin/aux/msexceltables - 775 sys sys 1138075017 81356
 386/bin/aux/mswordstrings - 775 sys sys 1135570787 65298
 386/bin/aux/na - 775 sys sys 1135570787 154182
-386/bin/aux/nfsmount - 775 sys sys 1135570787 234147
+386/bin/aux/nfsmount - 775 sys sys 1138500443 234446
 386/bin/aux/nfsserver - 775 sys sys 1135570788 185407
 386/bin/aux/olefs - 775 sys sys 1135570788 149329
 386/bin/aux/p9bitpost - 775 sys sys 1104121982 127974
 386/bin/aux/pcmcia - 775 sys sys 1130384255 46923
 386/bin/aux/pcnfsd - 775 sys sys 1135570789 129333
-386/bin/aux/portmap - 775 sys sys 1135570789 143667
+386/bin/aux/portmap - 775 sys sys 1138500456 143966
 386/bin/aux/portmapper - 775 sys sys 1135570789 128221
 386/bin/aux/postgif - 775 sys sys 1087442507 175380
 386/bin/aux/postprint - 775 sys sys 1087442507 160041
@@ -140,7 +140,7 @@
 386/bin/aux/sprog - 775 sys sys 1130594714 79372
 386/bin/aux/ssh_genkey - 775 sys sys 1045537957 194629
 386/bin/aux/sshserve - 775 sys sys 1132506841 252850
-386/bin/aux/statusbar - 775 sys sys 1135570790 151780
+386/bin/aux/statusbar - 775 sys sys 1138464442 151846
 386/bin/aux/stub - 775 sys sys 1135570791 140900
 386/bin/aux/tcpostio - 775 sys sys 1094040084 200808
 386/bin/aux/text2post - 775 sys sys 1104121986 78336
@@ -161,11 +161,11 @@
 386/bin/bind - 775 sys sys 1135570793 59562
 386/bin/bitsy - 20000000775 sys sys 1018721039 0
 386/bin/bitsy/bitsyload - 775 sys sys 1135570793 63359
-386/bin/bitsy/keyboard - 775 sys sys 1135570794 306153
+386/bin/bitsy/keyboard - 775 sys sys 1138500470 306442
 386/bin/bitsy/light - 775 sys sys 1020319072 242
 386/bin/bitsy/params - 775 sys sys 1135570794 58772
 386/bin/bitsy/pencal - 775 sys sys 1135570794 117257
-386/bin/bitsy/prompter - 775 sys sys 1135570795 286441
+386/bin/bitsy/prompter - 775 sys sys 1138500486 286731
 386/bin/bmp - 775 sys sys 1135570796 157659
 386/bin/bunzip2 - 775 sys sys 1135570796 97484
 386/bin/bzip2 - 775 sys sys 1135570796 114019
@@ -177,10 +177,10 @@
 386/bin/cfs - 775 sys sys 1135570797 128025
 386/bin/chgrp - 775 sys sys 1135570798 59279
 386/bin/chmod - 775 sys sys 1135570798 62275
-386/bin/cifscmd - 775 sys sys 1136656333 342747
+386/bin/cifscmd - 775 sys sys 1138500512 343031
 386/bin/cleanname - 775 sys sys 1135570798 58298
 386/bin/clock - 775 sys sys 1135570798 158281
-386/bin/cmp - 775 sys sys 1130384270 40583
+386/bin/cmp - 775 sys sys 1138500523 40602
 386/bin/colors - 775 sys sys 1135570799 150575
 386/bin/comm - 775 sys sys 1135570799 61343
 386/bin/con - 775 sys sys 1135570799 78243
@@ -189,7 +189,7 @@
 386/bin/cpu - 775 sys sys 1135570800 139202
 386/bin/crop - 775 sys sys 1135570800 116024
 386/bin/date - 775 sys sys 1130384272 43279
-386/bin/db - 775 sys sys 1136346851 345745
+386/bin/db - 775 sys sys 1138500534 345355
 386/bin/dc - 775 sys sys 1135570801 99015
 386/bin/dd - 775 sys sys 1130384273 45416
 386/bin/deroff - 775 sys sys 1135570802 74231
@@ -205,7 +205,7 @@
 386/bin/disk/exsort - 775 sys sys 1135570803 60212
 386/bin/disk/fdisk - 775 sys sys 1135570804 103852
 386/bin/disk/format - 775 sys sys 1135570804 89520
-386/bin/disk/kfs - 775 sys sys 1135570804 249003
+386/bin/disk/kfs - 775 sys sys 1138500552 249042
 386/bin/disk/kfscmd - 775 sys sys 1130384277 38240
 386/bin/disk/ksync - 775 sys sys 1020319074 302
 386/bin/disk/mbr - 775 sys sys 1135570805 73675
@@ -220,20 +220,20 @@
 386/bin/echo - 775 sys sys 1135570806 57349
 386/bin/ed - 775 sys sys 1135570807 93021
 386/bin/eqn - 775 sys sys 1136656335 243034
-386/bin/execnet - 775 sys sys 1135570807 177748
+386/bin/execnet - 775 sys sys 1138500564 178046
 386/bin/exportfs - 775 sys sys 1135570807 162237
 386/bin/ext2srv - 775 sys sys 1135570808 179710
 386/bin/faces - 775 sys sys 1135570808 193982
 386/bin/factor - 775 sys sys 1135570809 61456
 386/bin/fcp - 775 sys sys 1136656336 82190
-386/bin/file - 775 sys sys 1135570809 120978
+386/bin/file - 775 sys sys 1138500574 120581
 386/bin/fmt - 775 sys sys 1137607040 65320
 386/bin/fortune - 775 sys sys 1135570810 67113
 386/bin/fossil - 20000000775 sys sys 1042005470 0
 386/bin/fossil/conf - 775 sys sys 1085077052 1506
 386/bin/fossil/flchk - 775 sys sys 1138211975 237734
 386/bin/fossil/flfmt - 775 sys sys 1138211976 245881
-386/bin/fossil/fossil - 775 sys sys 1138211977 360656
+386/bin/fossil/fossil - 775 sys sys 1138500586 362894
 386/bin/fossil/last - 775 sys sys 1135570812 63280
 386/bin/freq - 775 sys sys 1136397208 61797
 386/bin/fs - 20000000775 sys sys 954380769 0
@@ -273,7 +273,7 @@
 386/bin/hoc - 775 sys sys 1135570817 99860
 386/bin/html2ms - 775 sys sys 1135570817 66078
 386/bin/htmlfmt - 775 sys sys 1135570817 160781
-386/bin/htmlroff - 775 sys sys 1138406772 148065
+386/bin/htmlroff - 775 sys sys 1138464442 148089
 386/bin/ico - 775 sys sys 1135570818 161740
 386/bin/iconv - 775 sys sys 1135570818 113279
 386/bin/idiff - 775 sys sys 1135570818 76099
@@ -296,13 +296,13 @@
 386/bin/ip/httpd/save - 775 sys sys 1135570823 131200
 386/bin/ip/httpd/webls - 775 sys sys 1135570823 131299
 386/bin/ip/httpd/wikipost - 775 sys sys 1135570824 112661
-386/bin/ip/httpfile - 775 sys sys 1135570824 283624
+386/bin/ip/httpfile - 775 sys sys 1138500622 283922
 386/bin/ip/imap4d - 775 sys sys 1135570825 237651
 386/bin/ip/ipconfig - 775 sys sys 1135570825 137844
 386/bin/ip/ping - 775 sys sys 1135570826 76416
 386/bin/ip/ppp - 775 sys sys 1135570826 219950
 386/bin/ip/pppoe - 775 sys sys 1135570826 77544
-386/bin/ip/pptp - 775 sys sys 1135570826 126715
+386/bin/ip/pptp - 775 sys sys 1138500632 127014
 386/bin/ip/pptpd - 775 sys sys 1135570827 125862
 386/bin/ip/rarpd - 775 sys sys 1135570827 111558
 386/bin/ip/rexexec - 775 sys sys 1135570827 89967
@@ -315,8 +315,8 @@
 386/bin/join - 775 sys sys 1135570829 114087
 386/bin/jpg - 775 sys sys 1135570829 174592
 386/bin/kbmap - 775 sys sys 1135570829 143626
-386/bin/kprof - 775 sys sys 1135570830 105465
-386/bin/ktrace - 775 sys sys 1135570830 123137
+386/bin/kprof - 775 sys sys 1138500643 105075
+386/bin/ktrace - 775 sys sys 1138500657 122747
 386/bin/lens - 775 sys sys 1135570830 150725
 386/bin/lex - 775 sys sys 1136224362 99020
 386/bin/lnfs - 775 sys sys 1135570831 99434
@@ -347,8 +347,8 @@
 386/bin/netkey - 775 sys sys 1135570837 72347
 386/bin/netstat - 775 sys sys 1135570838 84660
 386/bin/news - 775 sys sys 1135570838 71700
-386/bin/nfs - 775 sys sys 1135570838 321082
-386/bin/nm - 775 sys sys 1135570839 125741
+386/bin/nfs - 775 sys sys 1138500672 321380
+386/bin/nm - 775 sys sys 1138500680 125351
 386/bin/nntpfs - 775 sys sys 1135570839 166509
 386/bin/ns - 775 sys sys 1135570839 65247
 386/bin/p - 775 sys sys 1135570839 64977
@@ -366,17 +366,17 @@
 386/bin/ppm - 775 sys sys 1135570841 149413
 386/bin/pr - 775 sys sys 1135570842 77459
 386/bin/primes - 775 sys sys 1135101636 38803
-386/bin/prof - 775 sys sys 1135570842 110928
+386/bin/prof - 775 sys sys 1138500694 110538
 386/bin/proof - 775 sys sys 1132506869 178756
 386/bin/ps - 775 sys sys 1135570842 67981
 386/bin/pwd - 775 sys sys 1130384323 36915
 386/bin/ramfs - 775 sys sys 1135570842 89784
 386/bin/rc - 775 sys sys 1135101637 143284
-386/bin/rdbfs - 775 sys sys 1135570843 174476
+386/bin/rdbfs - 775 sys sys 1138500707 174769
 386/bin/read - 775 sys sys 1135570843 58040
 386/bin/replica - 20000000775 sys sys 1018321168 0
 386/bin/replica/applychanges - 775 sys sys 1132506870 98629
-386/bin/replica/applylog - 775 sys sys 1130594777 116771
+386/bin/replica/applylog - 775 sys sys 1138500717 119437
 386/bin/replica/changes - 775 sys sys 1020319082 42
 386/bin/replica/compactdb - 775 sys sys 1130594777 78514
 386/bin/replica/pull - 775 sys sys 1020319083 39
@@ -395,12 +395,12 @@
 386/bin/sed - 775 sys sys 1135570844 89510
 386/bin/seq - 775 sys sys 1130384331 38414
 386/bin/sha1sum - 775 sys sys 1135570844 61123
-386/bin/size - 775 sys sys 1135570844 78748
+386/bin/size - 775 sys sys 1138500736 78357
 386/bin/sleep - 775 sys sys 1085077097 3413
 386/bin/snap - 775 sys sys 1136346852 313627
 386/bin/snapfs - 775 sys sys 1134389876 388292
 386/bin/sniffer - 775 sys sys 1038443185 99028
-386/bin/snoopy - 775 sys sys 1135570845 168197
+386/bin/snoopy - 775 sys sys 1138464443 168213
 386/bin/sort - 775 sys sys 1135570845 82270
 386/bin/spin - 775 sys sys 1134151359 758520
 386/bin/split - 775 sys sys 1135570845 75631
@@ -411,7 +411,7 @@
 386/bin/sshnet - 775 sys sys 1134389877 288327
 386/bin/stats - 775 sys sys 1135570846 190636
 386/bin/strings - 775 sys sys 1135570846 62107
-386/bin/strip - 775 sys sys 1135570846 80730
+386/bin/strip - 775 sys sys 1138500744 80339
 386/bin/sum - 775 sys sys 1130384338 39488
 386/bin/swap - 775 sys sys 1135570847 62130
 386/bin/syscall - 775 sys sys 1130594788 73568
@@ -431,9 +431,9 @@
 386/bin/topng - 775 sys sys 1135570850 138333
 386/bin/toppm - 775 sys sys 1135570850 165236
 386/bin/touch - 775 sys sys 1135570850 63751
-386/bin/tprof - 775 sys sys 1136346853 297508
+386/bin/tprof - 775 sys sys 1138500753 297118
 386/bin/tr - 775 sys sys 1135570851 61845
-386/bin/trace - 775 sys sys 1135570851 181182
+386/bin/trace - 775 sys sys 1138500766 181475
 386/bin/troff - 775 sys sys 1134151360 357941
 386/bin/troff2html - 775 sys sys 1132506877 85770
 386/bin/tweak - 775 sys sys 1135570852 192855
@@ -529,46 +529,46 @@
 386/lib - 20000000775 sys sys 1016826328 0
 386/lib/ape - 20000000775 sys sys 944969312 0
 386/lib/ape/lib9.a - 664 sys sys 1135531447 6906
-386/lib/ape/libap.a - 664 sys sys 1137468666 815826
-386/lib/ape/libbsd.a - 664 sys sys 1137468667 183166
-386/lib/ape/libdraw.a - 664 sys sys 1137468668 580920
-386/lib/ape/libfmt.a - 664 sys sys 1137468669 150952
+386/lib/ape/libap.a - 664 sys sys 1138500806 815698
+386/lib/ape/libbsd.a - 664 sys sys 1138500827 183176
+386/lib/ape/libdraw.a - 664 sys sys 1138500836 580882
+386/lib/ape/libfmt.a - 664 sys sys 1138500850 150976
 386/lib/ape/libl.a - 664 sys sys 1122001337 9420
-386/lib/ape/libnet.a - 664 sys sys 1137468669 16950
+386/lib/ape/libnet.a - 664 sys sys 1138500858 16950
 386/lib/ape/libregexp.a - 664 sys sys 1137468669 47670
 386/lib/ape/libutf.a - 664 sys sys 1137485201 84674
 386/lib/ape/libv.a - 664 sys sys 1137485201 19668
-386/lib/lib9p.a - 664 sys sys 1134389884 91124
+386/lib/lib9p.a - 664 sys sys 1138500863 91156
 386/lib/libString.a - 664 sys sys 1115950150 22184
-386/lib/libauth.a - 664 sys sys 1128568181 58648
-386/lib/libauthsrv.a - 664 sys sys 1117249746 34098
+386/lib/libauth.a - 664 sys sys 1138500895 58638
+386/lib/libauthsrv.a - 664 sys sys 1138500905 34210
 386/lib/libbin.a - 664 sys sys 1115950150 2534
-386/lib/libbio.a - 664 sys sys 1125346045 26064
-386/lib/libc.a - 664 sys sys 1135531448 502758
-386/lib/libcomplete.a - 664 sys sys 1115950151 6370
-386/lib/libcontrol.a - 664 sys sys 1131646654 274922
-386/lib/libdisk.a - 664 sys sys 1126321691 42236
-386/lib/libdraw.a - 664 sys sys 1135570858 374160
-386/lib/libflate.a - 664 sys sys 1115950153 76872
-386/lib/libframe.a - 664 sys sys 1136087523 66130
+386/lib/libbio.a - 664 sys sys 1138500914 26064
+386/lib/libc.a - 664 sys sys 1138500920 502724
+386/lib/libcomplete.a - 664 sys sys 1138500945 6372
+386/lib/libcontrol.a - 664 sys sys 1138500950 274924
+386/lib/libdisk.a - 664 sys sys 1138500973 42236
+386/lib/libdraw.a - 664 sys sys 1138500978 374124
+386/lib/libflate.a - 664 sys sys 1138500991 76832
+386/lib/libframe.a - 664 sys sys 1138500996 66116
 386/lib/libgeometry.a - 664 sys sys 1115950153 50470
 386/lib/libhtml.a - 664 sys sys 1128740945 220134
-386/lib/libhttpd.a - 664 sys sys 1127790504 99596
+386/lib/libhttpd.a - 664 sys sys 1138501008 99586
 386/lib/libip.a - 664 sys sys 1116126324 35602
 386/lib/libl.a - 664 sys sys 1115950154 5384
-386/lib/libmach.a - 664 sys sys 1136346854 783354
-386/lib/libmemdraw.a - 664 sys sys 1135447284 284166
+386/lib/libmach.a - 664 sys sys 1138501015 782466
+386/lib/libmemdraw.a - 664 sys sys 1138501040 284158
 386/lib/libmemlayer.a - 664 sys sys 1115950157 47360
-386/lib/libmp.a - 664 sys sys 1127360619 79944
-386/lib/libndb.a - 664 sys sys 1115950157 60666
-386/lib/libplumb.a - 664 sys sys 1133287407 19458
+386/lib/libmp.a - 664 sys sys 1138501044 79942
+386/lib/libndb.a - 664 sys sys 1138501050 60716
+386/lib/libplumb.a - 664 sys sys 1138501055 19408
 386/lib/libregexp.a - 664 sys sys 1115950157 37464
-386/lib/libscribble.a - 664 sys sys 1116815422 107282
-386/lib/libsec.a - 664 sys sys 1127360621 646908
-386/lib/libstdio.a - 664 sys sys 1115950159 126206
-386/lib/libsunrpc.a - 664 sys sys 1115950160 355994
-386/lib/libthread.a - 664 sys sys 1135531448 71308
-386/lib/libventi.a - 664 sys sys 1138211977 98048
+386/lib/libscribble.a - 664 sys sys 1138501058 107278
+386/lib/libsec.a - 664 sys sys 1138501064 646888
+386/lib/libstdio.a - 664 sys sys 1138501067 126186
+386/lib/libsunrpc.a - 664 sys sys 1138501070 355994
+386/lib/libthread.a - 664 sys sys 1138501077 71986
+386/lib/libventi.a - 664 sys sys 1138501085 98038
 386/mbr - 775 sys sys 1131317338 407
 386/mkfile - 664 sys sys 948141303 46
 386/pbs - 775 sys sys 1131317339 494
@@ -623,14 +623,14 @@ acme/acid/Acid - 775 sys sys 1015011246 86
 acme/acid/guide - 444 sys sys 1015011246 68
 acme/bin - 20000000775 sys sys 1017457907 0
 acme/bin/386 - 20000000775 sys sys 1015011570 0
-acme/bin/386/Mail - 775 sys sys 1135570855 179492
-acme/bin/386/News - 775 sys sys 1135570855 128861
-acme/bin/386/Wiki - 775 sys sys 1135570856 127437
+acme/bin/386/Mail - 775 sys sys 1138500774 179770
+acme/bin/386/News - 775 sys sys 1138500782 129160
+acme/bin/386/Wiki - 775 sys sys 1138500790 127736
 acme/bin/386/acd - 775 sys sys 1032232412 137068
 acme/bin/386/adict - 775 sys sys 1015011247 99806
 acme/bin/386/mkwnew - 775 sys sys 1130384395 38977
 acme/bin/386/spout - 775 sys sys 1135570856 61598
-acme/bin/386/win - 775 sys sys 1135570856 184737
+acme/bin/386/win - 775 sys sys 1138500797 185035
 acme/bin/Battery - 775 sys sys 1017457907 451
 acme/bin/Isspam - 775 sys sys 1063951165 235
 acme/bin/Mail - 775 sys sys 1114697798 201
@@ -5486,7 +5486,7 @@ rc/bin/psu - 775 sys sys 1019769762 333
 rc/bin/reboot - 775 sys sys 1112276658 39
 rc/bin/replica - 20000000775 sys sys 1018321122 0
 rc/bin/replica/changes - 775 sys sys 1022177304 276
-rc/bin/replica/defs - 664 sys sys 1103390458 778
+rc/bin/replica/defs - 664 sys sys 1138478589 843
 rc/bin/replica/pull - 775 sys sys 1110990531 1447
 rc/bin/replica/push - 775 sys sys 1043865725 361
 rc/bin/replica/scan - 775 sys sys 1089299188 472
@@ -5540,6 +5540,7 @@ rc/bin/thesaurus - 775 sys sys 1068054167 246
 rc/bin/tlsclienttunnel - 775 sys sys 1024375633 153
 rc/bin/tlssrvtunnel - 775 sys sys 1024375634 175
 rc/bin/troff2gif - 775 sys sys 1127410278 164
+rc/bin/troff2png - 775 sys sys 1138456827 228
 rc/bin/ups - 775 sys sys 1091021981 806
 rc/bin/uptime - 775 sys sys 1074730712 234
 rc/bin/usbstart - 775 sys sys 1044894155 81
@@ -5596,7 +5597,7 @@ sys/doc/8½ - 20000000775 sys sys 945616779 0
 sys/doc/8½/8½.ms - 664 sys sys 1138396551 31721
 sys/doc/8½/8½.ps - 664 sys sys 1020895860 797150
 sys/doc/8½/fig1.ps - 664 sys sys 1020895859 473747
-sys/doc/8½/mkfile - 664 sys sys 1020895860 215
+sys/doc/8½/mkfile - 664 sys sys 1138459303 214
 sys/doc/9.ms - 664 sys sys 1138396402 84662
 sys/doc/9.ps - 664 sys sys 960837924 508340
 sys/doc/acid.ms - 664 sys sys 1138396403 65160
@@ -5610,7 +5611,7 @@ sys/doc/acme/acme.ms - 664 sys sys 1138396552 50028
 sys/doc/acme/acme.pdf - 664 sys sys 1020384351 117006
 sys/doc/acme/acme.ps - 664 sys sys 960837907 611301
 sys/doc/acme/bs - 664 sys sys 944959634 556
-sys/doc/acme/mkfile - 664 sys sys 961259926 304
+sys/doc/acme/mkfile - 664 sys sys 1138459292 295
 sys/doc/ape.ms - 664 sys sys 1138396403 12637
 sys/doc/ape.ps - 664 sys sys 960837914 258779
 sys/doc/asm.ms - 664 sys sys 1138396403 31516
@@ -5633,7 +5634,7 @@ sys/doc/fossil.ps - 664 sys sys 1135487951 313552
 sys/doc/fs - 20000000775 sys sys 945616779 0
 sys/doc/fs/fs.pdf - 664 sys sys 1020384351 47177
 sys/doc/fs/fs.ps - 664 sys sys 960837905 276918
-sys/doc/fs/mkfile - 664 sys sys 961259926 282
+sys/doc/fs/mkfile - 664 sys sys 1138459286 273
 sys/doc/fs/p0 - 664 sys sys 1138396562 682
 sys/doc/fs/p1 - 664 sys sys 953844581 989
 sys/doc/fs/p2 - 664 sys sys 953844581 3749
@@ -5648,7 +5649,7 @@ sys/doc/il - 20000000775 sys sys 945616779 0
 sys/doc/il/il.ms - 664 sys sys 1138396552 11390
 sys/doc/il/il.pdf - 664 sys sys 1020384351 44630
 sys/doc/il/il.ps - 664 sys sys 960837905 258028
-sys/doc/il/mkfile - 664 sys sys 961259927 214
+sys/doc/il/mkfile - 664 sys sys 1138459279 206
 sys/doc/il/transition.art - 664 sys sys 944959591 4463
 sys/doc/il/transition.fig - 664 sys sys 944959591 15431
 sys/doc/il/transition.pic - 664 sys sys 944959591 11912
@@ -5658,17 +5659,19 @@ sys/doc/lexnames.ms - 664 sys sys 1138396406 34107
 sys/doc/lexnames.ps - 664 sys sys 960837909 335546
 sys/doc/libmach.ms - 664 sys sys 1138396406 24212
 sys/doc/libmach.ps - 664 sys sys 960837916 291283
-sys/doc/lp.ms - 664 sys sys 954614673 22366
+sys/doc/lp.ms - 664 sys sys 1138458212 22383
 sys/doc/lp.ps - 664 sys sys 960837917 294399
 sys/doc/mk.ms - 664 sys sys 1138396445 34456
 sys/doc/mk.ps - 664 sys sys 960837917 329779
+sys/doc/mkdirlist - 775 sys sys 1138498508 48
 sys/doc/mkfile - 664 sys sys 1138396461 2393
+sys/doc/mkfilelist - 775 sys sys 1138498508 50
 sys/doc/mkfiles.ms - 664 sys sys 1138396445 17910
 sys/doc/mkfiles.ps - 664 sys sys 960837918 269496
 sys/doc/names.ms - 664 sys sys 1138396445 22143
 sys/doc/names.ps - 664 sys sys 960837918 288716
 sys/doc/net - 20000000775 sys sys 954033300 0
-sys/doc/net/mkfile - 664 sys sys 961259927 345
+sys/doc/net/mkfile - 664 sys sys 1138459273 334
 sys/doc/net/net.ms - 664 sys sys 1138396534 41237
 sys/doc/net/net.pdf - 664 sys sys 1020384351 82603
 sys/doc/net/net.ps - 664 sys sys 960837908 350053
@@ -5703,7 +5706,7 @@ sys/doc/sam/fig4.ps - 664 sys sys 944959644 3429
 sys/doc/sam/fig5.pic - 464 sys sys 944959644 756
 sys/doc/sam/fig6.pic - 464 sys sys 944959644 1105
 sys/doc/sam/fig7.pic - 464 sys sys 944959644 258
-sys/doc/sam/mkfile - 664 sys sys 961259927 574
+sys/doc/sam/mkfile - 664 sys sys 1138459266 566
 sys/doc/sam/refs - 464 sys sys 944959644 2652
 sys/doc/sam/sam.ms - 464 sys sys 1138396552 94640
 sys/doc/sam/sam.pdf - 664 sys sys 1020384352 156123
@@ -6003,7 +6006,7 @@ sys/include/ip.h - 664 sys sys 1103554773 2989
 sys/include/keyboard.h - 664 sys sys 1131637696 865
 sys/include/libc.h - 664 sys sys 1135487938 19627
 sys/include/libsec.h - 664 sys sys 1124709121 9345
-sys/include/mach.h - 664 sys sys 1131289126 8586
+sys/include/mach.h - 664 sys sys 1138471011 8621
 sys/include/memdraw.h - 664 sys sys 1091904419 5645
 sys/include/memlayer.h - 664 sys sys 1051031022 1851
 sys/include/mouse.h - 664 sys sys 1035232010 1003
@@ -6018,13 +6021,13 @@ sys/include/regexp.h - 664 sys sys 1014929066 1308
 sys/include/scribble.h - 664 sys sys 1091904419 708
 sys/include/stdio.h - 664 sys sys 1121977155 4208
 sys/include/sunrpc.h - 664 sys sys 1046367129 7219
-sys/include/thread.h - 664 sys sys 1091904419 3594
+sys/include/thread.h - 664 sys sys 1138463280 3616
 sys/include/tos.h - 664 sys sys 1091904418 575
-sys/include/trace.h - 664 sys sys 1089299189 642
+sys/include/trace.h - 664 sys sys 1138460022 640
 sys/include/venti.h - 664 sys sys 1091904426 7150
 sys/lib - 20000000775 sys sys 1018580948 0
 sys/lib/acid - 20000000775 sys sys 1016926088 0
-sys/lib/acid/386 - 664 sys sys 1032058272 2588
+sys/lib/acid/386 - 664 sys sys 1138464088 3268
 sys/lib/acid/68020 - 664 sys sys 944955985 2487
 sys/lib/acid/acme - 664 sys sys 969499632 2291
 sys/lib/acid/alef - 664 sys sys 944955985 2293
@@ -7296,7 +7299,7 @@ sys/man/1/gzip - 664 sys sys 1124839836 3226
 sys/man/1/hget - 664 sys sys 1067722859 1483
 sys/man/1/history - 664 sys sys 1109685635 1709
 sys/man/1/hoc - 664 sys sys 1136378274 2357
-sys/man/1/htmlroff - 644 sys sys 1138396051 1831
+sys/man/1/htmlroff - 664 sys sys 1138396051 1831
 sys/man/1/idiff - 664 sys sys 1113743324 914
 sys/man/1/join - 664 sys sys 1113743324 2561
 sys/man/1/jpg - 664 sys sys 1113743325 4842
@@ -7316,7 +7319,7 @@ sys/man/1/mc - 664 sys sys 1113743326 552
 sys/man/1/mk - 664 sys sys 1113743328 13198
 sys/man/1/mkdir - 664 sys sys 1082593141 717
 sys/man/1/mlmgr - 664 sys sys 1116513886 2542
-sys/man/1/ms2html - 664 sys sys 960001562 856
+sys/man/1/ms2html - 664 sys sys 1138458899 1252
 sys/man/1/nedmail - 664 sys sys 1114697978 6820
 sys/man/1/netstat - 664 sys sys 1128255431 942
 sys/man/1/news - 664 sys sys 1113743329 1151
@@ -7338,7 +7341,7 @@ sys/man/1/ps - 664 sys sys 1113743329 1619
 sys/man/1/ps2pdf - 664 sys sys 1032632098 1359
 sys/man/1/pwd - 664 sys sys 1104639653 744
 sys/man/1/rc - 664 sys sys 1113743326 19898
-sys/man/1/replica - 664 sys sys 1113743329 6677
+sys/man/1/replica - 664 sys sys 1138479156 7209
 sys/man/1/resample - 664 sys sys 1015024740 1083
 sys/man/1/rio - 664 sys sys 1130425691 14707
 sys/man/1/rm - 664 sys sys 944959673 515
@@ -7559,7 +7562,7 @@ sys/man/3/mnt - 664 sys sys 944959698 1994
 sys/man/3/mouse - 664 sys sys 1020313480 4276
 sys/man/3/pipe - 664 sys sys 1032640674 1145
 sys/man/3/pnp - 664 sys sys 1088560895 4547
-sys/man/3/proc - 664 sys sys 1133880424 12029
+sys/man/3/proc - 664 sys sys 1138458595 12062
 sys/man/3/root - 664 sys sys 1046958450 632
 sys/man/3/rtc - 664 sys sys 954378857 667
 sys/man/3/sd - 664 sys sys 1018386776 4805
@@ -7640,13 +7643,13 @@ sys/man/6/authsrv - 664 sys sys 1128483124 13304
 sys/man/6/color - 664 sys sys 988225304 5181
 sys/man/6/face - 664 sys sys 1062505426 2846
 sys/man/6/font - 664 sys sys 1077594184 2528
-sys/man/6/htmlroff - 644 sys sys 1138396325 6608
+sys/man/6/htmlroff - 664 sys sys 1138458634 6608
 sys/man/6/image - 664 sys sys 988225304 6209
 sys/man/6/keyboard - 664 sys sys 1079575918 4418
 sys/man/6/keys.who - 664 sys sys 1110641163 775
 sys/man/6/man - 664 sys sys 944959678 4961
 sys/man/6/map - 664 sys sys 944959678 1892
-sys/man/6/mhtml - 644 sys sys 1138396055 1710
+sys/man/6/mhtml - 664 sys sys 1138458169 1711
 sys/man/6/mpictures - 664 sys sys 944959678 2899
 sys/man/6/ms - 664 sys sys 958249504 6815
 sys/man/6/namespace - 664 sys sys 1048637182 1576
@@ -7689,7 +7692,7 @@ sys/man/8/cpurc - 664 sys sys 971455510 1275
 sys/man/8/cron - 664 sys sys 1063858596 1867
 sys/man/8/dhcpd - 664 sys sys 1032654987 5237
 sys/man/8/drawterm - 664 sys sys 1135901219 1741
-sys/man/8/fossilcons - 664 sys sys 1127560168 17789
+sys/man/8/fossilcons - 664 sys sys 1138466274 18276
 sys/man/8/fs - 664 sys sys 1055701170 15029
 sys/man/8/fsconfig - 664 sys sys 1045501600 8142
 sys/man/8/gpsfs - 664 sys sys 1123643451 4924
@@ -7715,10 +7718,10 @@ sys/man/8/ping - 664 sys sys 1084473185 3436
 sys/man/8/plan9.ini - 664 sys sys 1131294569 22077
 sys/man/8/pop3 - 664 sys sys 1063854676 2720
 sys/man/8/ppp - 664 sys sys 1125530075 4414
-sys/man/8/prep - 664 sys sys 1079705872 13820
+sys/man/8/prep - 664 sys sys 1138460130 13853
 sys/man/8/qer - 664 sys sys 1067723129 4909
 sys/man/8/reboot - 664 sys sys 969499895 414
-sys/man/8/replica - 664 sys sys 1102088374 6295
+sys/man/8/replica - 664 sys sys 1138479158 6383
 sys/man/8/rsa - 664 sys sys 1057955511 4628
 sys/man/8/scanmail - 664 sys sys 969499895 10803
 sys/man/8/scuzz - 664 sys sys 984709640 7916
@@ -7726,7 +7729,7 @@ sys/man/8/secstore - 664 sys sys 1105016705 1954
 sys/man/8/securenet - 664 sys sys 954305552 3160
 sys/man/8/send - 664 sys sys 1045501634 2168
 sys/man/8/smtp - 664 sys sys 1133631990 4507
-sys/man/8/snoopy - 664 sys sys 1128179510 4054
+sys/man/8/snoopy - 664 sys sys 1138463452 4086
 sys/man/8/stats - 664 sys sys 1067722908 4291
 sys/man/8/statusbar - 664 sys sys 1131317865 1251
 sys/man/8/stub - 664 sys sys 1044830500 943
@@ -7792,10 +7795,10 @@ sys/src/9/bitsy/Booting101 - 664 sys sys 1054798506 8841
 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/clock.c - 664 sys sys 1037028998 4835
-sys/src/9/bitsy/dat.h - 664 sys sys 1131289775 5829
+sys/src/9/bitsy/dat.h - 664 sys sys 1138500731 5941
 sys/src/9/bitsy/defont.c - 664 sys sys 1017695511 21570
 sys/src/9/bitsy/devether.c - 664 sys sys 1116097769 10675
-sys/src/9/bitsy/devflash.c - 664 sys sys 1018386999 16832
+sys/src/9/bitsy/devflash.c - 664 sys sys 1138500612 16830
 sys/src/9/bitsy/devpcmcia.c - 664 sys sys 1099801570 12977
 sys/src/9/bitsy/devpenmouse.c - 664 sys sys 1131289775 9589
 sys/src/9/bitsy/devuda1341.c - 664 sys sys 1071245420 30346
@@ -7969,7 +7972,7 @@ sys/src/9/pc/etherwavelan.c - 664 sys sys 1131290380 3747
 sys/src/9/pc/floppy.h - 664 sys sys 1055700609 3835
 sys/src/9/pc/fns.h - 664 sys sys 1131290383 4461
 sys/src/9/pc/hcwAMC.h - 664 sys sys 1026860163 166004
-sys/src/9/pc/i8253.c - 664 sys sys 1096379063 6279
+sys/src/9/pc/i8253.c - 664 sys sys 1138460051 6279
 sys/src/9/pc/i8259.c - 664 sys sys 1131290399 4586
 sys/src/9/pc/init9.c - 664 sys sys 1040002518 94
 sys/src/9/pc/initcode.s - 664 sys sys 1015014519 282
@@ -8047,11 +8050,11 @@ sys/src/9/pc/wavelan.c - 664 sys sys 1127743243 27879
 sys/src/9/pc/wavelan.h - 664 sys sys 1107448246 6169
 sys/src/9/port - 20000000775 sys sys 1018469625 0
 sys/src/9/port/alarm.c - 664 sys sys 1134042902 1425
-sys/src/9/port/alloc.c - 664 sys sys 1130964595 5674
+sys/src/9/port/alloc.c - 664 sys sys 1138459977 5704
 sys/src/9/port/allocb.c - 664 sys sys 1123676437 3340
 sys/src/9/port/auth.c - 664 sys sys 1123647282 2392
 sys/src/9/port/cache.c - 664 sys sys 1126586168 9241
-sys/src/9/port/chan.c - 664 sys sys 1135974610 33663
+sys/src/9/port/chan.c - 664 sys sys 1138458251 34790
 sys/src/9/port/cis.c - 664 sys sys 1099761153 9248
 sys/src/9/port/debugalloc.c - 664 sys sys 1014931171 10402
 sys/src/9/port/dev.c - 664 sys sys 1131289870 8219
@@ -8065,15 +8068,15 @@ sys/src/9/port/devenv.c - 664 sys sys 1048644225 6992
 sys/src/9/port/devfs.c - 664 sys sys 1105799131 10783
 sys/src/9/port/devkbmap.c - 664 sys sys 1130763846 3064
 sys/src/9/port/devkprof.c - 664 sys sys 1014931173 3111
-sys/src/9/port/devloopback.c - 664 sys sys 1076612248 14573
+sys/src/9/port/devloopback.c - 664 sys sys 1138458368 14579
 sys/src/9/port/devmnt.c - 664 sys sys 1134659798 20918
 sys/src/9/port/devmntstats.c - 664 sys sys 1014931173 4039
 sys/src/9/port/devmouse.c - 664 sys sys 1130848303 13517
 sys/src/9/port/devpipe.c - 664 sys sys 1077055016 5825
 sys/src/9/port/devpnp.c - 664 sys sys 1088560907 13624
-sys/src/9/port/devproc.c - 664 sys sys 1131886823 28287
+sys/src/9/port/devproc.c - 664 sys sys 1138469351 28497
 sys/src/9/port/devroot.c - 664 sys sys 1067722764 4254
-sys/src/9/port/devsd.c - 664 sys sys 1131289885 30798
+sys/src/9/port/devsd.c - 664 sys sys 1138458233 30866
 sys/src/9/port/devsdp.c - 664 sys sys 1057323393 44800
 sys/src/9/port/devsegment.c - 664 sys sys 1131289891 9610
 sys/src/9/port/devsrv.c - 664 sys sys 1107232208 5418
@@ -8082,16 +8085,16 @@ sys/src/9/port/devtinyfs.c - 664 sys sys 1015278339 15347
 sys/src/9/port/devtls.c - 664 sys sys 1134498858 45226
 sys/src/9/port/devuart.c - 664 sys sys 1138118881 12141
 sys/src/9/port/devwd.c - 664 sys sys 1126582325 2342
-sys/src/9/port/edf.c - 664 sys sys 1099760881 12742
-sys/src/9/port/edf.h - 664 sys sys 1084475128 1156
+sys/src/9/port/edf.c - 664 sys sys 1138472540 13489
+sys/src/9/port/edf.h - 664 sys sys 1138469072 1195
 sys/src/9/port/error.h - 664 sys sys 1117055493 2637
-sys/src/9/port/fault.c - 664 sys sys 1131289901 7271
+sys/src/9/port/fault.c - 664 sys sys 1138459838 7265
 sys/src/9/port/initcode.c - 664 sys sys 1055688491 574
 sys/src/9/port/latin1.c - 664 sys sys 1015278339 1418
 sys/src/9/port/latin1.h - 664 sys sys 1103633666 3563
 sys/src/9/port/lib.h - 664 sys sys 1131289913 6040
 sys/src/9/port/log.c - 664 sys sys 1014931175 2860
-sys/src/9/port/master - 664 sys sys 1131289934 510
+sys/src/9/port/master - 664 sys sys 1138469433 479
 sys/src/9/port/master.local - 664 sys sys 1063856961 130
 sys/src/9/port/mkbootrules - 775 sys sys 1055700518 923
 sys/src/9/port/mkdevc - 775 sys sys 1109202243 3889
@@ -8109,13 +8112,13 @@ sys/src/9/port/netif.c - 664 sys sys 1066514951 13421
 sys/src/9/port/netif.h - 664 sys sys 1066514947 2975
 sys/src/9/port/page.c - 664 sys sys 1131636090 11128
 sys/src/9/port/parse.c - 664 sys sys 1014931177 2026
-sys/src/9/port/pgrp.c - 664 sys sys 1072704671 3940
-sys/src/9/port/portclock.c - 664 sys sys 1102093397 4556
-sys/src/9/port/portdat.h - 664 sys sys 1138127259 22540
-sys/src/9/port/portfns.h - 664 sys sys 1138047830 11023
+sys/src/9/port/pgrp.c - 664 sys sys 1138458260 4760
+sys/src/9/port/portclock.c - 664 sys sys 1138458385 4211
+sys/src/9/port/portdat.h - 664 sys sys 1138458366 22535
+sys/src/9/port/portfns.h - 664 sys sys 1138469535 11079
 sys/src/9/port/portmkfile - 664 sys sys 1131907975 2062
 sys/src/9/port/print.c - 664 sys sys 1014931178 227
-sys/src/9/port/proc.c - 664 sys sys 1138028309 27967
+sys/src/9/port/proc.c - 664 sys sys 1138469345 28053
 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/rdb.c - 664 sys sys 1018721202 1698
@@ -8129,7 +8132,7 @@ sys/src/9/port/systab.h - 664 sys sys 1062721698 3044
 sys/src/9/port/taslock.c - 664 sys sys 1131290039 3928
 sys/src/9/port/thwack.c - 664 sys sys 1057323394 7253
 sys/src/9/port/thwack.h - 664 sys sys 1015278340 1792
-sys/src/9/port/tod.c - 664 sys sys 1067722762 4856
+sys/src/9/port/tod.c - 664 sys sys 1138459530 5336
 sys/src/9/port/unthwack.c - 664 sys sys 1057323394 5249
 sys/src/9/port/xalloc.c - 664 sys sys 1131290051 4063
 sys/src/9/ppc - 20000000775 sys sys 1059490838 0
@@ -8138,7 +8141,7 @@ sys/src/9/ppc/blast.h - 664 sys sys 1059490750 3109
 sys/src/9/ppc/clock.c - 664 sys sys 1131290066 1076
 sys/src/9/ppc/dat.h - 664 sys sys 1127274100 4735
 sys/src/9/ppc/devether.c - 664 sys sys 1131290184 9327
-sys/src/9/ppc/devflash.c - 664 sys sys 1059490750 19885
+sys/src/9/ppc/devflash.c - 664 sys sys 1138469487 19884
 sys/src/9/ppc/devirq.c - 664 sys sys 1100701675 6314
 sys/src/9/ppc/devtls.c - 664 sys sys 1059490751 43721
 sys/src/9/ppc/etherfcc.c - 664 sys sys 1131290110 19599
@@ -8163,7 +8166,7 @@ sys/src/9/ppc/msaturn.h - 664 sys sys 1059490753 99
 sys/src/9/ppc/mtx.c - 664 sys sys 1059490753 177
 sys/src/9/ppc/random.c - 664 sys sys 1059490753 1983
 sys/src/9/ppc/saturntimer.c - 664 sys sys 1072705482 1737
-sys/src/9/ppc/trap.c - 664 sys sys 1131290140 17067
+sys/src/9/ppc/trap.c - 664 sys sys 1138469503 17084
 sys/src/9/ppc/uartsaturn.c - 664 sys sys 1059490754 7151
 sys/src/9/ppc/uartsmc.c - 664 sys sys 1131290162 9764
 sys/src/9/ppc/ucu - 664 sys sys 1067722849 672
@@ -9224,7 +9227,7 @@ sys/src/cmd/8c/peep.c - 664 sys sys 1089299181 11182
 sys/src/cmd/8c/reg.c - 664 sys sys 1113585456 20572
 sys/src/cmd/8c/sgen.c - 664 sys sys 1089299181 12833
 sys/src/cmd/8c/swt.c - 664 sys sys 1098463321 10943
-sys/src/cmd/8c/txt.c - 664 sys sys 1089299180 24215
+sys/src/cmd/8c/txt.c - 664 sys sys 1138460007 23789
 sys/src/cmd/8l - 20000000775 sys sys 1017165863 0
 sys/src/cmd/8l/asm.c - 664 sys sys 1107755623 11882
 sys/src/cmd/8l/compat.c - 664 sys sys 944960733 445
@@ -9655,7 +9658,7 @@ 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/reboot.c - 664 sys sys 1116769521 1429
 sys/src/cmd/aux/searchfs.c - 664 sys sys 1014925091 18176
-sys/src/cmd/aux/statusbar.c - 664 sys sys 1131209286 6025
+sys/src/cmd/aux/statusbar.c - 664 sys sys 1138460096 6066
 sys/src/cmd/aux/stub.c - 664 sys sys 1098196222 2723
 sys/src/cmd/aux/timesync.c - 664 sys sys 1107448970 25758
 sys/src/cmd/aux/trampoline.c - 664 sys sys 1126104850 3790
@@ -9820,8 +9823,8 @@ sys/src/cmd/cc/macbody - 664 sys sys 1108281581 11703
 sys/src/cmd/cc/machcap.c - 664 sys sys 1084472048 78
 sys/src/cmd/cc/mkfile - 664 sys sys 1107365240 563
 sys/src/cmd/cc/pickle.c - 664 sys sys 1063855374 4829
-sys/src/cmd/cc/scon.c - 664 sys sys 1134321732 8645
-sys/src/cmd/cc/sub.c - 664 sys sys 1134321729 34315
+sys/src/cmd/cc/scon.c - 664 sys sys 1138463621 8788
+sys/src/cmd/cc/sub.c - 664 sys sys 1138463622 34377
 sys/src/cmd/cc/y.tab.c - 664 sys sys 1098501521 53564
 sys/src/cmd/cc/y.tab.h - 664 sys sys 1098501521 1680
 sys/src/cmd/cdfs - 20000000775 sys sys 959922196 0
@@ -10118,20 +10121,20 @@ sys/src/cmd/file.c - 664 sys sys 1125313891 23512
 sys/src/cmd/fmt.c - 664 sys sys 1137603598 4078
 sys/src/cmd/fortune.c - 664 sys sys 1072729222 1779
 sys/src/cmd/fossil - 20000000775 sys sys 1042005512 0
-sys/src/cmd/fossil/9.h - 664 sys sys 1091904424 4342
-sys/src/cmd/fossil/9auth.c - 664 sys sys 1061530721 3393
+sys/src/cmd/fossil/9.h - 664 sys sys 1138465941 4438
+sys/src/cmd/fossil/9auth.c - 664 sys sys 1138465942 3863
 sys/src/cmd/fossil/9dir.c - 664 sys sys 1085333382 2219
 sys/src/cmd/fossil/9excl.c - 664 sys sys 1042005502 1887
 sys/src/cmd/fossil/9fid.c - 664 sys sys 1045600016 5521
 sys/src/cmd/fossil/9fsys.c - 664 sys sys 1134305453 33320
-sys/src/cmd/fossil/9lstn.c - 664 sys sys 1042005503 2865
-sys/src/cmd/fossil/9p.c - 664 sys sys 1104940048 21862
+sys/src/cmd/fossil/9lstn.c - 664 sys sys 1138469518 3024
+sys/src/cmd/fossil/9p.c - 664 sys sys 1138465942 22935
 sys/src/cmd/fossil/9ping.c - 664 sys sys 1042005503 1563
-sys/src/cmd/fossil/9proc.c - 664 sys sys 1079034426 14680
-sys/src/cmd/fossil/9srv.c - 664 sys sys 1077896346 3879
+sys/src/cmd/fossil/9proc.c - 664 sys sys 1138469518 15148
+sys/src/cmd/fossil/9srv.c - 664 sys sys 1138465941 3956
 sys/src/cmd/fossil/9user.c - 664 sys sys 1071179088 17260
 sys/src/cmd/fossil/Ccli.c - 664 sys sys 1042005504 1624
-sys/src/cmd/fossil/Ccmd.c - 664 sys sys 1080586882 7982
+sys/src/cmd/fossil/Ccmd.c - 664 sys sys 1138465941 7985
 sys/src/cmd/fossil/Ccons.c - 664 sys sys 1055703737 6620
 sys/src/cmd/fossil/Clog.c - 664 sys sys 1042005505 591
 sys/src/cmd/fossil/archive.c - 664 sys sys 1087005594 10230
@@ -12261,7 +12264,7 @@ sys/src/cmd/htmlroff/t6.c - 664 sys sys 1138396081 1135
 sys/src/cmd/htmlroff/t7.c - 664 sys sys 1138396082 8626
 sys/src/cmd/htmlroff/t8.c - 664 sys sys 1138396082 6245
 sys/src/cmd/htmlroff/t9.c - 664 sys sys 1138396082 47
-sys/src/cmd/htmlroff/util.c - 664 sys sys 1138396082 1615
+sys/src/cmd/htmlroff/util.c - 664 sys sys 1138458817 1625
 sys/src/cmd/iconv.c - 664 sys sys 1039753035 1801
 sys/src/cmd/idiff.c - 664 sys sys 1014926695 6896
 sys/src/cmd/import.c - 664 sys sys 1133180705 7028
@@ -12371,25 +12374,25 @@ sys/src/cmd/ip/snoopy - 20000000775 sys sys 1015090062 0
 sys/src/cmd/ip/snoopy/arp.c - 664 sys sys 1128179536 1914
 sys/src/cmd/ip/snoopy/bootp.c - 664 sys sys 1128179536 3440
 sys/src/cmd/ip/snoopy/dat.h - 664 sys sys 1128179536 1915
-sys/src/cmd/ip/snoopy/dhcp.c - 664 sys sys 1128179537 9104
-sys/src/cmd/ip/snoopy/dump.c - 664 sys sys 1128179537 1136
+sys/src/cmd/ip/snoopy/dhcp.c - 664 sys sys 1138463389 8958
+sys/src/cmd/ip/snoopy/dump.c - 664 sys sys 1138463389 1078
 sys/src/cmd/ip/snoopy/eap.c - 664 sys sys 1128179537 3996
 sys/src/cmd/ip/snoopy/eap_identity.c - 664 sys sys 1128179537 50
 sys/src/cmd/ip/snoopy/eapol.c - 664 sys sys 1128179537 1890
 sys/src/cmd/ip/snoopy/eapol_key.c - 664 sys sys 1128179537 2025
 sys/src/cmd/ip/snoopy/ether.c - 664 sys sys 1128179537 2013
-sys/src/cmd/ip/snoopy/filter.y - 664 sys sys 1045505292 1536
+sys/src/cmd/ip/snoopy/filter.y - 664 sys sys 1138463389 1739
 sys/src/cmd/ip/snoopy/gre.c - 664 sys sys 1015090059 1503
 sys/src/cmd/ip/snoopy/hdlc.c - 664 sys sys 1128179537 4285
 sys/src/cmd/ip/snoopy/icmp.c - 664 sys sys 1128179538 2969
 sys/src/cmd/ip/snoopy/icmp6.c - 664 sys sys 1128179538 7736
-sys/src/cmd/ip/snoopy/il.c - 664 sys sys 1128179538 2255
+sys/src/cmd/ip/snoopy/il.c - 664 sys sys 1138463390 2261
 sys/src/cmd/ip/snoopy/ip.c - 664 sys sys 1128179538 4300
 sys/src/cmd/ip/snoopy/ip6.c - 664 sys sys 1128179538 5371
-sys/src/cmd/ip/snoopy/main.c - 664 sys sys 1128179536 15408
-sys/src/cmd/ip/snoopy/mkfile - 664 sys sys 1128179536 849
-sys/src/cmd/ip/snoopy/ninep.c - 664 sys sys 1128179538 701
-sys/src/cmd/ip/snoopy/ospf.c - 664 sys sys 1128179539 7522
+sys/src/cmd/ip/snoopy/main.c - 664 sys sys 1138463390 15607
+sys/src/cmd/ip/snoopy/mkfile - 664 sys sys 1138463439 879
+sys/src/cmd/ip/snoopy/ninep.c - 664 sys sys 1138463390 555
+sys/src/cmd/ip/snoopy/ospf.c - 664 sys sys 1138463391 7369
 sys/src/cmd/ip/snoopy/ppp.c - 664 sys sys 1128179539 10544
 sys/src/cmd/ip/snoopy/ppp_ccp.c - 664 sys sys 1015090061 50
 sys/src/cmd/ip/snoopy/ppp_chap.c - 664 sys sys 1015090061 50
@@ -12400,8 +12403,8 @@ sys/src/cmd/ip/snoopy/pppoe_disc.c - 664 sys sys 1128179539 2513
 sys/src/cmd/ip/snoopy/pppoe_sess.c - 664 sys sys 1033797942 36
 sys/src/cmd/ip/snoopy/rarp.c - 664 sys sys 1015090062 50
 sys/src/cmd/ip/snoopy/rc4keydesc.c - 664 sys sys 1128179539 56
-sys/src/cmd/ip/snoopy/rtcp.c - 664 sys sys 1128179540 1964
-sys/src/cmd/ip/snoopy/rtp.c - 664 sys sys 1128179540 1166
+sys/src/cmd/ip/snoopy/rtcp.c - 664 sys sys 1138463392 1818
+sys/src/cmd/ip/snoopy/rtp.c - 664 sys sys 1138463392 1021
 sys/src/cmd/ip/snoopy/tcp.c - 664 sys sys 1128179540 3602
 sys/src/cmd/ip/snoopy/ttls.c - 664 sys sys 1128179540 1451
 sys/src/cmd/ip/snoopy/udp.c - 664 sys sys 1128179540 1999
@@ -13088,7 +13091,7 @@ sys/src/cmd/read.c - 664 sys sys 1022047660 1278
 sys/src/cmd/replica - 20000000775 sys sys 1018321113 0
 sys/src/cmd/replica/all.h - 664 sys sys 1091904421 1265
 sys/src/cmd/replica/applychanges.c - 664 sys sys 1068497831 6123
-sys/src/cmd/replica/applylog.c - 664 sys sys 1111253491 18157
+sys/src/cmd/replica/applylog.c - 664 sys sys 1138478558 21811
 sys/src/cmd/replica/avl.c - 664 sys sys 1068497830 6242
 sys/src/cmd/replica/compactdb.c - 664 sys sys 1018323475 652
 sys/src/cmd/replica/db.c - 664 sys sys 1019340165 2989
@@ -13321,7 +13324,7 @@ sys/src/cmd/tbl/t7.c - 664 sys sys 944961244 3422
 sys/src/cmd/tbl/t8.c - 664 sys sys 1131293517 9041
 sys/src/cmd/tbl/t9.c - 664 sys sys 944961244 1577
 sys/src/cmd/tbl/tb.c - 664 sys sys 944961244 1732
-sys/src/cmd/tbl/tc.c - 664 sys sys 1131293494 1274
+sys/src/cmd/tbl/tc.c - 664 sys sys 1138463701 1414
 sys/src/cmd/tbl/te.c - 664 sys sys 944961244 1071
 sys/src/cmd/tbl/tf.c - 664 sys sys 944961244 1283
 sys/src/cmd/tbl/tg.c - 664 sys sys 1128819351 2164
@@ -13333,7 +13336,7 @@ sys/src/cmd/tbl/tt.c - 664 sys sys 944961244 1708
 sys/src/cmd/tbl/tu.c - 664 sys sys 944961244 4817
 sys/src/cmd/tbl/tv.c - 664 sys sys 944961244 3329
 sys/src/cmd/tcs - 20000000775 sys sys 954034511 0
-sys/src/cmd/tcs/8859.h - 644 sys sys 1138382778 16466
+sys/src/cmd/tcs/8859.h - 664 sys sys 1138382778 16466
 sys/src/cmd/tcs/big5.c - 664 sys sys 944961288 99606
 sys/src/cmd/tcs/big5.h - 664 sys sys 944961287 112
 sys/src/cmd/tcs/conv.h - 664 sys sys 1135487940 941
@@ -13373,9 +13376,9 @@ sys/src/cmd/tcs/kuten208.c - 664 sys sys 948046995 59960
 sys/src/cmd/tcs/kuten208.h - 664 sys sys 944961287 94
 sys/src/cmd/tcs/kuten212.c - 664 sys sys 944961289 55407
 sys/src/cmd/tcs/kuten212.h - 664 sys sys 944961287 94
-sys/src/cmd/tcs/misc.h - 644 sys sys 1138382780 19274
+sys/src/cmd/tcs/misc.h - 664 sys sys 1138382780 19274
 sys/src/cmd/tcs/mkfile - 664 sys sys 1138382781 591
-sys/src/cmd/tcs/ms.h - 644 sys sys 1138382780 44069
+sys/src/cmd/tcs/ms.h - 664 sys sys 1138382780 44069
 sys/src/cmd/tcs/plan9.h - 664 sys sys 944961287 751
 sys/src/cmd/tcs/tcs.c - 664 sys sys 1138382781 15489
 sys/src/cmd/tcs/utf.c - 664 sys sys 1125501123 7962
@@ -13451,7 +13454,7 @@ sys/src/cmd/unix/drawterm/Make.irix - 664 sys sys 1137502401 493
 sys/src/cmd/unix/drawterm/Make.unix - 664 sys sys 1135900534 429
 sys/src/cmd/unix/drawterm/Make.win32 - 664 sys sys 1135900534 816
 sys/src/cmd/unix/drawterm/Makefile - 664 sys sys 1135900534 1112
-sys/src/cmd/unix/drawterm/README - 664 sys sys 1135900534 925
+sys/src/cmd/unix/drawterm/README - 664 sys sys 1138469123 1002
 sys/src/cmd/unix/drawterm/args.h - 664 sys sys 1135900534 709
 sys/src/cmd/unix/drawterm/bin - 20000000775 sys sys 959090509 0
 sys/src/cmd/unix/drawterm/cpu-bl.c - 664 sys sys 1135900534 14118
@@ -14107,7 +14110,7 @@ sys/src/cmd/venti/checkindex.c - 664 sys sys 1055707429 4115
 sys/src/cmd/venti/clump.c - 664 sys sys 1019678877 4148
 sys/src/cmd/venti/clumpstats.c - 664 sys sys 1055707430 2239
 sys/src/cmd/venti/conf.rc - 775 sys sys 1055707446 1416
-sys/src/cmd/venti/config.c - 664 sys sys 1063854193 4956
+sys/src/cmd/venti/config.c - 664 sys sys 1138471074 4930
 sys/src/cmd/venti/conv.c - 664 sys sys 1019678878 8202
 sys/src/cmd/venti/copy.c - 664 sys sys 1055707434 3517
 sys/src/cmd/venti/dat.h - 664 sys sys 1132452191 15346
@@ -14117,7 +14120,7 @@ sys/src/cmd/venti/dumparena.c - 664 sys sys 1019678878 6381
 sys/src/cmd/venti/dumpvacroots - 775 sys sys 1044904736 467
 sys/src/cmd/venti/findscore.c - 664 sys sys 1121977913 2605
 sys/src/cmd/venti/fmtarenas.c - 664 sys sys 1132452192 2213
-sys/src/cmd/venti/fmtindex.c - 664 sys sys 1055707425 2534
+sys/src/cmd/venti/fmtindex.c - 664 sys sys 1138471072 2524
 sys/src/cmd/venti/fmtisect.c - 664 sys sys 1132452192 1326
 sys/src/cmd/venti/fns.h - 664 sys sys 1055707422 6793
 sys/src/cmd/venti/httpd.c - 664 sys sys 1045503654 9107
@@ -14416,7 +14419,7 @@ sys/src/games/music/jukebox/colors.c - 664 sys sys 1103793918 3819
 sys/src/games/music/jukebox/colors.h - 664 sys sys 1103793918 692
 sys/src/games/music/jukebox/mk.dep - 664 sys sys 1103793918 653
 sys/src/games/music/jukebox/mkfile - 664 sys sys 1103793918 234
-sys/src/games/music/jukebox/music.c - 664 sys sys 1111074158 28912
+sys/src/games/music/jukebox/music.c - 664 sys sys 1138463667 30760
 sys/src/games/music/jukebox/playlist.c - 664 sys sys 1111156611 6629
 sys/src/games/music/jukebox/playlist.h - 664 sys sys 1103793919 505
 sys/src/games/music/jukefs - 20000000775 sys sys 1103793922 0
@@ -14437,7 +14440,7 @@ sys/src/games/music/missing - 775 sys sys 1103793915 72
 sys/src/games/music/mkfile - 664 sys sys 1103793915 723
 sys/src/games/music/mkinc - 664 sys sys 1103793915 92
 sys/src/games/music/playlistfs - 20000000775 sys sys 1103794221 0
-sys/src/games/music/playlistfs/boilerplate.c - 664 sys sys 1131293384 1547
+sys/src/games/music/playlistfs/boilerplate.c - 664 sys sys 1138469137 1585
 sys/src/games/music/playlistfs/fs.c - 664 sys sys 1111504109 17985
 sys/src/games/music/playlistfs/main.c - 664 sys sys 1103793922 1636
 sys/src/games/music/playlistfs/mk.dep - 664 sys sys 1103793923 594
@@ -14539,7 +14542,7 @@ sys/src/libauthsrv/mkfile - 664 sys sys 1035389776 409
 sys/src/libauthsrv/nvcsum.c - 664 sys sys 1015091654 192
 sys/src/libauthsrv/opasstokey.c - 664 sys sys 1015091654 448
 sys/src/libauthsrv/passtokey.c - 664 sys sys 1015091654 517
-sys/src/libauthsrv/readnvram.c - 664 sys sys 1117193209 8752
+sys/src/libauthsrv/readnvram.c - 664 sys sys 1138469173 8809
 sys/src/libbin - 20000000775 sys sys 984777332 0
 sys/src/libbin/bin.c - 664 sys sys 1135487932 1829
 sys/src/libbin/mkfile - 664 sys sys 1035389776 197
@@ -14932,7 +14935,7 @@ sys/src/libc/port/utfutf.c - 664 sys sys 1014927408 389
 sys/src/libc/power - 20000000775 sys sys 984709299 0
 sys/src/libc/power/argv0.s - 664 sys sys 1067719057 88
 sys/src/libc/power/cycles.s - 664 sys sys 1100701675 322
-sys/src/libc/power/getcallerpc.s - 664 sys sys 944961720 51
+sys/src/libc/power/getcallerpc.s - 664 sys sys 1138463299 52
 sys/src/libc/power/getfcr.s - 664 sys sys 944961719 352
 sys/src/libc/power/main9.s - 664 sys sys 1067719057 415
 sys/src/libc/power/main9p.s - 664 sys sys 1067719058 620
@@ -15146,26 +15149,26 @@ sys/src/libmach/0.c - 664 sys sys 1131289379 4080
 sys/src/libmach/0c - 20000000775 sys sys 1114459438 0
 sys/src/libmach/0c/README - 664 sys sys 1114459609 73
 sys/src/libmach/0c/ureg.h - 664 sys sys 1114459438 886
-sys/src/libmach/2.c - 664 sys sys 1131289379 2074
+sys/src/libmach/2.c - 664 sys sys 1138471014 2085
 sys/src/libmach/2db.c - 664 sys sys 1136322405 61334
 sys/src/libmach/2obj.c - 664 sys sys 1091732624 2335
-sys/src/libmach/5.c - 664 sys sys 1131289380 1553
+sys/src/libmach/5.c - 664 sys sys 1138471013 1564
 sys/src/libmach/5db.c - 664 sys sys 1136322405 21586
 sys/src/libmach/5obj.c - 664 sys sys 1091732625 2209
-sys/src/libmach/6.c - 664 sys sys 1131289380 3464
+sys/src/libmach/6.c - 664 sys sys 1138471019 3482
 sys/src/libmach/6c - 20000000775 sys sys 1123100867 0
 sys/src/libmach/6c/6.out.h - 664 sys sys 1114459480 7984
 sys/src/libmach/6obj.c - 664 sys sys 1114459831 2382
-sys/src/libmach/7.c - 664 sys sys 1131289380 3299
+sys/src/libmach/7.c - 664 sys sys 1138471022 3310
 sys/src/libmach/7db.c - 664 sys sys 1136322405 17355
 sys/src/libmach/7obj.c - 664 sys sys 1091732676 2367
-sys/src/libmach/8.c - 664 sys sys 1131289381 2060
+sys/src/libmach/8.c - 664 sys sys 1138471020 2071
 sys/src/libmach/8db.c - 664 sys sys 1136322405 50889
 sys/src/libmach/8obj.c - 664 sys sys 1091732625 2200
 sys/src/libmach/access.c - 664 sys sys 1131289377 4588
 sys/src/libmach/elf.h - 664 sys sys 1131292881 2301
-sys/src/libmach/executable.c - 664 sys sys 1131289375 16128
-sys/src/libmach/k.c - 664 sys sys 1131289378 3370
+sys/src/libmach/executable.c - 664 sys sys 1138471015 16006
+sys/src/libmach/k.c - 664 sys sys 1138471021 3381
 sys/src/libmach/kdb.c - 664 sys sys 1136322404 21222
 sys/src/libmach/kobj.c - 664 sys sys 1091732625 2217
 sys/src/libmach/machdata.c - 664 sys sys 1131289377 8799
@@ -15178,8 +15181,8 @@ sys/src/libmach/qdb.c - 664 sys sys 1136322404 27544
 sys/src/libmach/qobj.c - 664 sys sys 1091732625 2310
 sys/src/libmach/setmach.c - 664 sys sys 1119476886 2911
 sys/src/libmach/swap.c - 664 sys sys 1131289376 1056
-sys/src/libmach/sym.c - 664 sys sys 1131289377 26729
-sys/src/libmach/u.c - 664 sys sys 1131289378 3436
+sys/src/libmach/sym.c - 664 sys sys 1138471012 26745
+sys/src/libmach/u.c - 664 sys sys 1138471017 3447
 sys/src/libmach/uc - 20000000775 sys sys 1114459488 0
 sys/src/libmach/uc/README - 664 sys sys 1114459488 73
 sys/src/libmach/uc/u.out.h - 664 sys sys 1114459488 3137
@@ -15523,7 +15526,7 @@ sys/src/libthread/note.c - 664 sys sys 1055700452 2265
 sys/src/libthread/power.c - 664 sys sys 1014928159 585
 sys/src/libthread/ref.c - 664 sys sys 1014928159 168
 sys/src/libthread/rendez.c - 664 sys sys 1135487954 1909
-sys/src/libthread/sched.c - 664 sys sys 1135487951 3094
+sys/src/libthread/sched.c - 664 sys sys 1138463237 3342
 sys/src/libthread/test.c - 664 sys sys 1014928159 228
 sys/src/libthread/threadimpl.h - 664 sys sys 1135487955 4689
 sys/src/libthread/tprimes.c - 664 sys sys 1014928160 798
@@ -15564,7 +15567,7 @@ usr/glenda/bin - 20000000775 glenda glenda 953406597 0
 usr/glenda/bin/386 - 20000000775 glenda glenda 953406597 0
 usr/glenda/bin/mips - 20000000775 glenda glenda 953406597 0
 usr/glenda/bin/rc - 20000000775 glenda glenda 954101780 0
-usr/glenda/bin/rc/pull - 775 glenda glenda 1093453255 224
+usr/glenda/bin/rc/pull - 775 glenda glenda 1138478624 272
 usr/glenda/bin/rc/riostart - 775 glenda glenda 1018974192 341
 usr/glenda/bin/rc/screensize - 775 glenda glenda 1019273896 145
 usr/glenda/lib - 20000000775 glenda glenda 959740302 0

+ 180 - 0
dist/replica/plan9.log

@@ -27324,3 +27324,183 @@
 1138397475 63 a sys/src/cmd/htmlroff/t9.c - 664 sys sys 1138396082 47
 1138397475 64 a sys/src/cmd/htmlroff/util.c - 664 sys sys 1138396082 1615
 1138408277 0 a 386/bin/htmlroff - 775 sys sys 1138406772 148065
+1138456891 0 a rc/bin/troff2png - 775 sys sys 1138456827 228
+1138457982 0 m sys/man/1/htmlroff - 664 sys sys 1138396051 1831
+1138457982 1 m sys/man/6/htmlroff - 664 sys sys 1138396325 6608
+1138457982 2 m sys/man/6/mhtml - 664 sys sys 1138396055 1710
+1138457982 3 m sys/src/cmd/tcs/8859.h - 664 sys sys 1138382778 16466
+1138457982 4 m sys/src/cmd/tcs/misc.h - 664 sys sys 1138382780 19274
+1138457982 5 m sys/src/cmd/tcs/ms.h - 664 sys sys 1138382780 44069
+1138458691 0 c sys/doc/lp.ms - 664 sys sys 1138458212 22383
+1138458691 1 c sys/man/3/proc - 664 sys sys 1138458595 12062
+1138458691 2 c sys/man/6/htmlroff - 664 sys sys 1138458634 6608
+1138458691 3 c sys/man/6/mhtml - 664 sys sys 1138458169 1711
+1138458691 4 c sys/src/9/port/chan.c - 664 sys sys 1138458251 34790
+1138458691 5 c sys/src/9/port/devloopback.c - 664 sys sys 1138458368 14579
+1138458691 6 c sys/src/9/port/devsd.c - 664 sys sys 1138458233 30866
+1138458691 7 c sys/src/9/port/edf.c - 664 sys sys 1138458370 13391
+1138458691 8 c sys/src/9/port/pgrp.c - 664 sys sys 1138458260 4760
+1138458691 9 c sys/src/9/port/portclock.c - 664 sys sys 1138458385 4211
+1138458691 10 c sys/src/9/port/portdat.h - 664 sys sys 1138458366 22535
+1138460492 0 c sys/doc/8½/mkfile - 664 sys sys 1138459303 214
+1138460492 1 c sys/doc/acme/mkfile - 664 sys sys 1138459292 295
+1138460492 2 c sys/doc/fs/mkfile - 664 sys sys 1138459286 273
+1138460492 3 c sys/doc/il/mkfile - 664 sys sys 1138459279 206
+1138460492 4 c sys/doc/net/mkfile - 664 sys sys 1138459273 334
+1138460492 5 c sys/doc/sam/mkfile - 664 sys sys 1138459266 566
+1138460492 6 c sys/include/trace.h - 664 sys sys 1138460022 640
+1138460492 7 c sys/man/1/ms2html - 664 sys sys 1138458899 1252
+1138460492 8 c sys/man/8/prep - 664 sys sys 1138460130 13853
+1138460492 9 c sys/src/9/pc/i8253.c - 664 sys sys 1138460051 6279
+1138460492 10 c sys/src/9/port/alloc.c - 664 sys sys 1138459977 5704
+1138460492 11 c sys/src/9/port/fault.c - 664 sys sys 1138459838 7265
+1138460492 12 c sys/src/9/port/tod.c - 664 sys sys 1138459530 5336
+1138460492 13 c sys/src/cmd/8c/txt.c - 664 sys sys 1138460007 23789
+1138460492 14 c sys/src/cmd/aux/statusbar.c - 664 sys sys 1138460096 6066
+1138460492 15 c sys/src/cmd/htmlroff/util.c - 664 sys sys 1138458817 1625
+1138464093 0 c sys/include/thread.h - 664 sys sys 1138463280 3616
+1138464093 1 c sys/lib/acid/386 - 664 sys sys 1138464088 3268
+1138464093 2 c sys/man/8/snoopy - 664 sys sys 1138463452 4086
+1138464093 3 c sys/src/cmd/cc/scon.c - 664 sys sys 1138463621 8788
+1138464093 4 c sys/src/cmd/cc/sub.c - 664 sys sys 1138463622 34377
+1138464093 5 c sys/src/cmd/ip/snoopy/dhcp.c - 664 sys sys 1138463389 8958
+1138464093 6 c sys/src/cmd/ip/snoopy/dump.c - 664 sys sys 1138463389 1078
+1138464093 7 c sys/src/cmd/ip/snoopy/filter.y - 664 sys sys 1138463389 1739
+1138464093 8 c sys/src/cmd/ip/snoopy/il.c - 664 sys sys 1138463390 2261
+1138464093 9 c sys/src/cmd/ip/snoopy/main.c - 664 sys sys 1138463390 15607
+1138464093 10 c sys/src/cmd/ip/snoopy/mkfile - 664 sys sys 1138463439 879
+1138464093 11 c sys/src/cmd/ip/snoopy/ninep.c - 664 sys sys 1138463390 555
+1138464093 12 c sys/src/cmd/ip/snoopy/ospf.c - 664 sys sys 1138463391 7369
+1138464093 13 c sys/src/cmd/ip/snoopy/rtcp.c - 664 sys sys 1138463392 1818
+1138464093 14 c sys/src/cmd/ip/snoopy/rtp.c - 664 sys sys 1138463392 1021
+1138464093 15 c sys/src/cmd/tbl/tc.c - 664 sys sys 1138463701 1414
+1138464093 16 c sys/src/games/music/jukebox/music.c - 664 sys sys 1138463667 30760
+1138464093 17 c sys/src/libc/power/getcallerpc.s - 664 sys sys 1138463299 52
+1138464093 18 c sys/src/libthread/sched.c - 664 sys sys 1138463237 3342
+1138465893 0 c 386/bin/8c - 775 sys sys 1138464441 361964
+1138465893 1 c 386/bin/snoopy - 775 sys sys 1138464443 168213
+1138465893 2 c 386/bin/aux/consolefs - 775 sys sys 1138464441 153937
+1138465893 3 c 386/bin/aux/statusbar - 775 sys sys 1138464442 151846
+1138465893 4 c 386/bin/htmlroff - 775 sys sys 1138464442 148089
+1138465893 5 c 386/lib/ape/libap.a - 664 sys sys 1138464446 815780
+1138465893 6 c 386/lib/ape/libfmt.a - 664 sys sys 1138464446 150926
+1138465893 7 c 386/lib/libc.a - 664 sys sys 1138464448 502714
+1138465893 8 c sys/src/cmd/fossil/9.h - 664 sys sys 1138465941 4438
+1138465893 9 c sys/src/cmd/fossil/9auth.c - 664 sys sys 1138465942 3863
+1138465893 10 c sys/src/cmd/fossil/9lstn.c - 664 sys sys 1138465941 3084
+1138465893 11 c sys/src/cmd/fossil/9p.c - 664 sys sys 1138465942 22935
+1138465893 12 c sys/src/cmd/fossil/9proc.c - 664 sys sys 1138465942 15149
+1138465893 13 c sys/src/cmd/fossil/9srv.c - 664 sys sys 1138465941 3956
+1138465893 14 c sys/src/cmd/fossil/Ccmd.c - 664 sys sys 1138465941 7985
+1138467694 0 c sys/man/8/fossilcons - 664 sys sys 1138466274 18276
+1138467694 1 c sys/src/9/port/portfns.h - 664 sys sys 1138469535 11079
+1138469495 0 c sys/src/9/port/devproc.c - 664 sys sys 1138469351 28497
+1138469495 1 c sys/src/9/port/edf.h - 664 sys sys 1138469072 1195
+1138469495 2 c sys/src/9/port/master - 664 sys sys 1138469433 479
+1138469495 3 c sys/src/9/port/proc.c - 664 sys sys 1138469345 28053
+1138469495 4 c sys/src/9/ppc/devflash.c - 664 sys sys 1138469487 19884
+1138469495 5 c sys/src/9/ppc/trap.c - 664 sys sys 1138469503 17084
+1138469495 6 c sys/src/cmd/unix/drawterm/README - 664 sys sys 1138469123 1002
+1138469495 7 c sys/src/cmd/fossil/9lstn.c - 664 sys sys 1138469518 3024
+1138469495 8 c sys/src/cmd/fossil/9proc.c - 664 sys sys 1138469518 15148
+1138469495 9 c sys/src/games/music/playlistfs/boilerplate.c - 664 sys sys 1138469137 1585
+1138469495 10 c sys/src/libauthsrv/readnvram.c - 664 sys sys 1138469173 8809
+1138471295 0 c sys/include/mach.h - 664 sys sys 1138471011 8621
+1138471295 1 c sys/src/cmd/venti/config.c - 664 sys sys 1138471074 4930
+1138471295 2 c sys/src/cmd/venti/fmtindex.c - 664 sys sys 1138471072 2524
+1138471295 3 c sys/src/libmach/2.c - 664 sys sys 1138471014 2085
+1138471295 4 c sys/src/libmach/5.c - 664 sys sys 1138471013 1564
+1138471295 5 c sys/src/libmach/6.c - 664 sys sys 1138471019 3482
+1138471295 6 c sys/src/libmach/7.c - 664 sys sys 1138471022 3310
+1138471295 7 c sys/src/libmach/8.c - 664 sys sys 1138471020 2071
+1138471295 8 c sys/src/libmach/executable.c - 664 sys sys 1138471015 16006
+1138471295 9 c sys/src/libmach/k.c - 664 sys sys 1138471021 3381
+1138471295 10 c sys/src/libmach/sym.c - 664 sys sys 1138471012 26745
+1138471295 11 c sys/src/libmach/u.c - 664 sys sys 1138471017 3447
+1138473099 0 c sys/src/9/port/edf.c - 664 sys sys 1138472540 13489
+1138474899 0 c 386/bin/replica/applylog - 775 sys sys 1138474434 117835
+1138474899 1 c sys/src/cmd/replica/applylog.c - 664 sys sys 1138475352 20407
+1138478500 0 c rc/bin/replica/defs - 664 sys sys 1138478589 843
+1138478500 1 c sys/src/cmd/replica/applylog.c - 664 sys sys 1138478558 21811
+1138480297 0 c usr/glenda/bin/rc/pull - 775 glenda glenda 1138478624 272
+1138480297 1 c 386/bin/replica/applylog - 775 sys sys 1138478590 119437
+1138480297 2 c rc/bin/replica/defs - 664 sys sys 1138478589 843
+1138480297 3 c sys/man/1/replica - 664 sys sys 1138479156 7209
+1138480297 4 c sys/man/8/replica - 664 sys sys 1138479158 6383
+1138480297 5 c sys/src/cmd/replica/applylog.c - 664 sys sys 1138478558 21811
+1138500103 0 a sys/doc/mkdirlist - 775 sys sys 1138498508 48
+1138500103 1 a sys/doc/mkfilelist - 775 sys sys 1138498508 50
+1138501903 0 c 386/bin/aan - 775 sys sys 1138500151 131061
+1138501903 1 c 386/bin/acid - 775 sys sys 1138500164 400525
+1138501903 2 c 386/bin/acme - 775 sys sys 1138500184 429460
+1138501903 3 c 386/bin/bitsy/keyboard - 775 sys sys 1138500470 306442
+1138501903 4 c 386/bin/bitsy/prompter - 775 sys sys 1138500486 286731
+1138501903 5 c 386/bin/cmp - 775 sys sys 1138500523 40602
+1138501903 6 c 386/bin/db - 775 sys sys 1138500534 345355
+1138501903 7 c 386/bin/replica/applylog - 775 sys sys 1138500717 119437
+1138501903 8 c 386/bin/file - 775 sys sys 1138500574 120581
+1138501903 9 c 386/bin/kprof - 775 sys sys 1138500643 105075
+1138501903 10 c 386/bin/ktrace - 775 sys sys 1138500657 122747
+1138501903 11 c 386/bin/nm - 775 sys sys 1138500680 125351
+1138501903 12 c 386/bin/prof - 775 sys sys 1138500694 110538
+1138501903 13 c 386/bin/rdbfs - 775 sys sys 1138500707 174769
+1138501903 14 c 386/bin/size - 775 sys sys 1138500736 78357
+1138501903 15 c 386/bin/strip - 775 sys sys 1138500744 80339
+1138501903 16 c 386/bin/aquarela - 775 sys sys 1138500199 332204
+1138501903 17 c 386/bin/auth/aescbc - 775 sys sys 1138500222 140815
+1138501903 18 c 386/bin/auth/convkeys - 775 sys sys 1138500239 87487
+1138501903 19 c 386/bin/auth/convkeys2 - 775 sys sys 1138500253 87538
+1138501903 20 c 386/bin/auth/factotum - 775 sys sys 1138500268 318365
+1138501903 21 c 386/bin/auth/fgui - 775 sys sys 1138500284 218624
+1138501903 22 c 386/bin/auth/keyfs - 775 sys sys 1138500299 115630
+1138501903 23 c 386/bin/auth/secstore - 775 sys sys 1138500327 195492
+1138501903 24 c 386/bin/auth/wrkey - 775 sys sys 1138500378 75242
+1138501903 25 c 386/bin/aux/apm - 775 sys sys 1138500391 180310
+1138501903 26 c 386/bin/aux/depend - 775 sys sys 1138500404 145864
+1138501903 27 c 386/bin/aux/gpsfs - 775 sys sys 1138500417 182563
+1138501903 28 c 386/bin/aux/ms2 - 775 sys sys 1138500429 87049
+1138501903 29 c 386/bin/aux/nfsmount - 775 sys sys 1138500443 234446
+1138501903 30 c 386/bin/aux/portmap - 775 sys sys 1138500456 143966
+1138501903 31 c 386/bin/cifscmd - 775 sys sys 1138500512 343031
+1138501903 32 c 386/bin/disk/kfs - 775 sys sys 1138500552 249042
+1138501903 33 c 386/bin/execnet - 775 sys sys 1138500564 178046
+1138501903 34 c 386/bin/fossil/fossil - 775 sys sys 1138500586 362894
+1138501903 35 c 386/bin/ip/httpfile - 775 sys sys 1138500622 283922
+1138501903 36 c 386/bin/ip/pptp - 775 sys sys 1138500632 127014
+1138501903 37 c 386/bin/nfs - 775 sys sys 1138500672 321380
+1138501903 38 c 386/bin/tprof - 775 sys sys 1138500753 297118
+1138501903 39 c 386/bin/trace - 775 sys sys 1138500766 181475
+1138501903 40 c 386/lib/ape/libap.a - 664 sys sys 1138500806 815698
+1138501903 41 c 386/lib/ape/libbsd.a - 664 sys sys 1138500827 183176
+1138501903 42 c 386/lib/ape/libdraw.a - 664 sys sys 1138500836 580882
+1138501903 43 c 386/lib/ape/libfmt.a - 664 sys sys 1138500850 150976
+1138501903 44 c 386/lib/ape/libnet.a - 664 sys sys 1138500858 16950
+1138501903 45 c 386/lib/lib9p.a - 664 sys sys 1138500863 91156
+1138501903 46 c 386/lib/libauth.a - 664 sys sys 1138500895 58638
+1138501903 47 c 386/lib/libauthsrv.a - 664 sys sys 1138500905 34210
+1138501903 48 c 386/lib/libbio.a - 664 sys sys 1138500914 26064
+1138501903 49 c 386/lib/libc.a - 664 sys sys 1138500920 502724
+1138501903 50 c 386/lib/libcomplete.a - 664 sys sys 1138500945 6372
+1138501903 51 c 386/lib/libcontrol.a - 664 sys sys 1138500950 274924
+1138501903 52 c 386/lib/libdisk.a - 664 sys sys 1138500973 42236
+1138501903 53 c 386/lib/libdraw.a - 664 sys sys 1138500978 374124
+1138501903 54 c 386/lib/libflate.a - 664 sys sys 1138500991 76832
+1138501903 55 c 386/lib/libframe.a - 664 sys sys 1138500996 66116
+1138501903 56 c 386/lib/libhttpd.a - 664 sys sys 1138501008 99586
+1138501903 57 c 386/lib/libmach.a - 664 sys sys 1138501015 782466
+1138501903 58 c 386/lib/libmemdraw.a - 664 sys sys 1138501040 284158
+1138501903 59 c 386/lib/libmp.a - 664 sys sys 1138501044 79942
+1138501903 60 c 386/lib/libndb.a - 664 sys sys 1138501050 60716
+1138501903 61 c 386/lib/libplumb.a - 664 sys sys 1138501055 19408
+1138501903 62 c 386/lib/libscribble.a - 664 sys sys 1138501058 107278
+1138501903 63 c 386/lib/libsec.a - 664 sys sys 1138501064 646888
+1138501903 64 c 386/lib/libstdio.a - 664 sys sys 1138501067 126186
+1138501903 65 c 386/lib/libsunrpc.a - 664 sys sys 1138501070 355994
+1138501903 66 c 386/lib/libthread.a - 664 sys sys 1138501077 71986
+1138501903 67 c 386/lib/libventi.a - 664 sys sys 1138501085 98038
+1138501903 68 c acme/bin/386/Mail - 775 sys sys 1138500774 179770
+1138501903 69 c acme/bin/386/News - 775 sys sys 1138500782 129160
+1138501903 70 c acme/bin/386/Wiki - 775 sys sys 1138500790 127736
+1138501903 71 c acme/bin/386/win - 775 sys sys 1138500797 185035
+1138501903 72 c sys/src/9/bitsy/dat.h - 664 sys sys 1138500731 5941
+1138501903 73 c sys/src/9/bitsy/devflash.c - 664 sys sys 1138500612 16830

+ 4 - 0
rc/bin/replica/defs

@@ -19,6 +19,10 @@ fn need {
 
 opt=()
 while(! ~ $#* 0 && ~ $1 -*){
+	if(~ $1 -s -c){	# take one argument 
+		opt=($opt $1)
+		shift
+	}
 	opt=($opt $1)
 	shift
 }

+ 9 - 0
rc/bin/troff2png

@@ -0,0 +1,9 @@
+#!/bin/rc
+
+troff -ms $* | aux/tr2post |
+	gs -g1000x1600 -r100 -dNOPAUSE -dQUIET \
+		'-dGraphicsAlphaBits=4' '-dTextAlphaBits=4' \
+		'-sOUTPUTFILE=-' '-sDEVICE=plan9' - quit.ps |
+	{crop -c 255 255 255; cat >/dev/null} | 
+	topng
+

+ 3 - 2
sys/doc/8½/mkfile

@@ -4,5 +4,6 @@
 	{echo $FONTS; cat 8½.ms} | tbl | troff -ms -mpictures -mnihongo | lp -dstdout >8½.ps
 	../cleanps 8½.ps
 
-8½.html:D:
-	{echo $FONTS; cat 8½.ms} | tbl | ms2html >8½.html
+8½.html:D: 8½.ms
+	tbl 8½.ms | htmlroff -ms -mhtml >8½.html
+

+ 1 - 1
sys/doc/acme/mkfile

@@ -8,5 +8,5 @@ acme.ps:D:	acme.ms
 	../cleanps acme.ps
 
 acme.html:D:	acme.ms
-	{echo $FONTS; cat acme.ms} | ms2html >acme.html
+	htmlroff -ms -mhtml acme.ms >acme.html
 

+ 2 - 1
sys/doc/fs/mkfile

@@ -18,4 +18,5 @@ fs.trout:D:	$OBJ
 	{echo $FONTS; cat $OBJ } | troff -ms >fs.trout
 
 fs.html:D:
-	{echo $FONTS; cat $OBJ } | ms2html >fs.html
+	htmlroff -ms -mhtml $OBJ >fs.html
+

+ 2 - 1
sys/doc/il/mkfile

@@ -5,4 +5,5 @@ il.ps:D:	il.ms transition.pic
 	../cleanps il.ps
 
 il.html:D:	il.ms transition.pic
-	{echo $FONTS; cat il.ms} | pic | ms2html >il.html
+	pic il.ms | htmlroff -ms -mhtml >il.html
+

+ 13 - 12
sys/doc/lp.ms

@@ -1,3 +1,4 @@
+.HTML "A Guide to the Lp Printer Spooler
 .TL
 A Guide to the Lp
 Printer Spooler
@@ -377,7 +378,7 @@ Within the
 .CW lp
 command, a shell variable is set for each attribute;
 the following list describes them:
-.IP "\f(CW\s-\\n(XPLPDEST\s+\\n(XP\fP " 12
+.IP "\f(CW\s-\n(XPLPDEST\s+\n(XP\fP " 12
 is the name of the device as given to
 .I lp
 with the
@@ -390,22 +391,22 @@ the file
 .CW $LPLIB/defdevice .
 This name is used in creating directories and log files that are associated with
 the printers operation.
-.IP "\f(CW\s-\\n(XPLOC\s+\\n(XP\fP "
+.IP "\f(CW\s-\n(XPLOC\s+\n(XP\fP "
 just describes where the printer is physically located.
-.IP "\f(CW\s-\\n(XPDEST_HOST\s+\\n(XP\fP "
+.IP "\f(CW\s-\n(XPDEST_HOST\s+\n(XP\fP "
 is the host from which the files are printed.
 Files may be spooled on other machines before being transferred to the
 destination host.
-.IP "\f(CW\s-\\n(XPOUT_DEV\s+\\n(XP\fP "
+.IP "\f(CW\s-\n(XPOUT_DEV\s+\n(XP\fP "
 is the physical device name or network address needed by the printer daemon
 to connect to the printer.
 This field depends on the requirements of the daemon and may contain a `\(en'
 if not required.
-.IP "\f(CW\s-\\n(XPSPEED\s+\\n(XP\fP "
+.IP "\f(CW\s-\n(XPSPEED\s+\n(XP\fP "
 is the baud rate setting for the port.
 This field depends on the requirements of the daemon and may contain a `\(en'
 if not required.
-.IP "\f(CW\s-\\n(XPLPCLASS\s+\\n(XP\fP "
+.IP "\f(CW\s-\n(XPLPCLASS\s+\n(XP\fP "
 is used to encode minor printer differences.
 The keyword
 .CW reverse
@@ -419,13 +420,13 @@ This is used for special and color printers.
 The keyword
 .CW duplex
 is used to coax double sided output from duplex printers.
-.IP "\f(CW\s-\\n(XPLPPROC\s+\\n(XP\fP "
+.IP "\f(CW\s-\n(XPLPPROC\s+\n(XP\fP "
 is the command from the
 .CW LPLIB/process
 directory to be used to convert input to a format
 that will be accepted by the device.
 The preprocessor is invoked by the spooler.
-.IP "\f(CW\s-\\n(XPSPOOLER\s+\\n(XP\fP "
+.IP "\f(CW\s-\n(XPSPOOLER\s+\n(XP\fP "
 is the command from the
 .CW LPLIB/spooler
 directory which will select files using the
@@ -437,7 +438,7 @@ into the remote spool directory.
 The output is sent directly to the spool directory on the
 destination machine to avoid conflicts when client and
 server machines share spool directories.
-.IP "\f(CW\s-\\n(XPSTAT\s+\\n(XP\fP "
+.IP "\f(CW\s-\n(XPSTAT\s+\n(XP\fP "
 is the command from the
 .CW LPLIB/stat
 directory that prints the status of the device and the list of jobs
@@ -450,7 +451,7 @@ The
 .CW SCHED
 command is used to show the jobs in the order
 in which they will be printed.
-.IP "\f(CW\s-\\n(XPKILL\s+\\n(XP\fP "
+.IP "\f(CW\s-\n(XPKILL\s+\n(XP\fP "
 is the command from the
 .CW LPLIB/kill
 that removes jobs from the queue.
@@ -459,7 +460,7 @@ The jobs to be removed are given as arguments to the
 command.
 When possible, it should also abort the currently running job
 if it has to be killed.
-.IP "\f(CW\s-\\n(XPDAEMON\s+\\n(XP\fP "
+.IP "\f(CW\s-\n(XPDAEMON\s+\n(XP\fP "
 is the command from the
 .CW LPLIB/daemon
 that is meant to run asynchronously to remove
@@ -468,7 +469,7 @@ Jobs may either be passed on to another host or sent to the
 printing device.
 .I Lp
 always tries to start a daemon process when one is specified.
-.IP "\f(CW\s-\\n(XPSCHED\s+\\n(XP\fP "
+.IP "\f(CW\s-\n(XPSCHED\s+\n(XP\fP "
 is the command from the
 .CW LPLIB/sched
 that is used to present the job names to the

+ 5 - 0
sys/doc/mkdirlist

@@ -0,0 +1,5 @@
+#!/bin/rc
+
+for(i in $*)
+	if(~ $i */*)
+		echo $i

+ 5 - 0
sys/doc/mkfilelist

@@ -0,0 +1,5 @@
+#!/bin/rc
+
+for(i in $*)
+	if(! ~ $i */*)
+		echo $i

+ 2 - 1
sys/doc/net/mkfile

@@ -14,4 +14,5 @@ tree.pout:D:	tree
 	pic tree > tree.pout
 
 net.html:D:	$DEPS
-	{ echo $FONTS; cat net.ms } | tbl | ms2html > net.html
+	tbl net.ms | htmlroff -ms -mhtml >net.html
+

+ 2 - 1
sys/doc/sam/mkfile

@@ -11,4 +11,5 @@ sam.tut.out:D:	sam.tut
 	troff -ms sam.tut > sam.tut.out
 
 sam.html:D:	sam.ms fig1.ps fig2.ps fig3.ps fig4.ps fig5.pic fig6.pic fig7.pic refs
-	{echo $FONTS; cat sam.ms refs} | pic | tbl | ms2html >sam.html
+	pic sam.ms refs | tbl | htmlroff -ms -mhtml >sam.html
+

+ 3 - 2
sys/include/mach.h

@@ -217,9 +217,10 @@ struct	Machdata {		/* Machine-dependent debugger support */
 typedef struct Fhdr
 {
 	char	*name;		/* identifier of executable */
-	uchar	type;		/* file type - see codes above*/
+	uchar	type;		/* file type - see codes above */
 	uchar	hdrsz;		/* header size */
-	uchar	spare[2];
+	uchar	_magic;		/* _MAGIC() magic */
+	uchar	spare;
 	long	magic;		/* magic number */
 	uvlong	txtaddr;	/* text address */
 	vlong	txtoff;		/* start of text in file */

+ 1 - 0
sys/include/thread.h

@@ -69,6 +69,7 @@ ulong		nbrecvul(Channel *c);
 int		nbsend(Channel *c, void *v);
 int		nbsendp(Channel *c, void *v);
 int		nbsendul(Channel *c, ulong v);
+void		needstack(int);
 int		proccreate(void (*f)(void *arg), void *arg, uint stacksize);
 int		procrfork(void (*f)(void *arg), void *arg, uint stacksize, int flag);
 void**		procdata(void);

+ 2 - 2
sys/include/trace.h

@@ -19,6 +19,6 @@ typedef enum Tevent {
 typedef struct Traceevent	Traceevent;
 struct Traceevent {
 	ulong	pid;	
-	ulong	etype;		/* Event type */
-	vlong	time;		/* time stamp  */
+	ulong	etype;	/* Event type */
+	vlong	time;	/* time stamp  */
 };

+ 20 - 0
sys/lib/acid/386

@@ -59,6 +59,26 @@ defn regs()				// print all registers
 	gpr();
 }
 
+defn fpr()
+{
+	print("F0\t",  *fmt(F0, 'g'), "\n");
+	print("F1\t",  *fmt(F1, 'g'), "\n");
+	print("F2\t",  *fmt(F2, 'g'), "\n");
+	print("F3\t",  *fmt(F3, 'g'), "\n");
+	print("F4\t",  *fmt(F4, 'g'), "\n");
+	print("F5\t",  *fmt(F5, 'g'), "\n");
+	print("F6\t",  *fmt(F6, 'g'), "\n");
+	print("F7\t",  *fmt(F7, 'g'), "\n");
+	print("control\t", *fmt(E0, 'x'), "\n");
+	print("status\t", *fmt(E1, 'x'), "\n");
+	print("tag\t", *fmt(E2, 'x'), "\n");
+	print("ip offset\t", *fmt(E3, 'X'), "\n");
+	print("cs selector\t", *fmt(E4, 'x'), "\n");
+	print("opcode\t", *fmt(E4>>8, 'x'), "\n");
+	print("data operand offset\t", *fmt(E5, 'x'), "\n");
+	print("operand selector\t", *fmt(E6, 'x'), "\n");
+}
+
 defn mmregs()
 {
 	print("MM0\t", *MM0, " MM1\t", *MM1, "\n");

+ 39 - 2
sys/man/1/ms2html

@@ -2,9 +2,21 @@
 .SH NAME
 ms2html, html2ms \- convert between troff's ms macros and html
 .SH SYNOPSIS
-.B ms2html < input > output
+.B ms2html
+[
+.B -q
+] [
+.B -b
+.I basename
+] [
+.B -d
+.I delims
+] [
+.B -t
+.I title
+]
 .br
-.B html2ms < input > output
+.B html2ms
 .SH DESCRIPTION
 .I Ms2html
 converts the
@@ -28,10 +40,35 @@ will look for a
 macro, unknown to
 .IR ms (6),
 and take its value.
+Options are:
+.TF q
+.IP q
+suppresses warnings about malformed input;
+.IP b
+sets the HTML base name to
+.IR basename ;
+.IP d
+sets the
+.IR eqn (1)
+delimiters to
+.IR delim ;
+.IP t
+sets the HTML title to
+.IR title .
+.PD
+.PP
+.I Html2ms
+reads HTML from standard input and converts it
+to
+.IR ms (6)
+source on standard output.
 .SH SOURCE
 .B /sys/src/cmd/ms2html.c
 .br
 .B /sys/src/cmd/html2ms.c
+.SH SEE ALSO
+.IR htmlroff (1),
+.IR ms (6)
 .SH BUGS
 .PP
 Ms2html doesn't understand a number of troff

+ 46 - 9
sys/man/1/replica

@@ -4,8 +4,16 @@ changes, pull, push, scan \- client-server replica management
 .SH SYNOPSIS
 .B replica/pull
 [
-.B -cnsv
+.B -nv
 ]
+[
+.B -c
+.I name
+]...
+[
+.B -s
+.I name
+]...
 .I name
 [
 .I path
@@ -160,15 +168,17 @@ The
 .B -c
 flag to
 .I pull
-causes updates to be resolved using the client's copy,
+specifies that conflicts for paths beginning with
+.I name
+should be resolved using the client's copy,
 while
 .B -s
 specifies the server's copy.
-Typically these flags are only used when
-invoking
-.I pull
-with a specific list of files that are known
-to be conflicting.
+The 
+.B -c
+and
+.B -s
+options may be repeated.
 .PP
 .I Replica/changes
 prints a list of local changes made on the client
@@ -283,9 +293,36 @@ in
 To update your system, make sure you are connected
 to the internet and run
 .EX
-    disk/kfscmd allow
     replica/pull /dist/replica/network
-    disk/kfscmd disallow
+.EE
+If conflicts are reported (say you have made local changes to 
+.B /rc/bin/cpurc
+and
+.BR /rc/bin/termrc ,
+but only want to keep the
+.B cpurc
+changes),
+use
+.EX
+    replica/pull -c rc/bin/cpurc -s rc/bin/termrc /dist/replica/network
+.EE
+to instruct
+.I pull
+to ignore the server's change to 
+.BR cpurc .
+.PP
+The script
+.B /usr/glenda/bin/rc/pull
+runs 
+.I pull
+with the
+.B -v
+flag and with
+.B /dist/replica/network
+inserted at the right point on the command line.
+Logged in as glenda, one can repeat the above example with:
+.EX
+    pull -c rc/bin/cpurc -s rc/bin/cpurc
 .EE
 .PP
 To see a list of changes made to the local file system

+ 7 - 1
sys/man/3/proc

@@ -351,7 +351,13 @@ to
 perform a schedulability test and start scheduling the process as a real-time
 process if the test succeeds.  If the test fails, the
 .B write
-will fail with error set to the reason for failure.  For details on real time, read on.
+will fail with error set to the reason for failure.  
+.TP 10n
+.B event
+Add a user event to the 
+.B /proc/trace
+file.
+.PD
 .PP
 Real-time processes are periodically
 .IR released ,

+ 2 - 2
sys/man/6/htmlroff

@@ -305,13 +305,13 @@ input into a pipe to
 The redirection stops on encountering the line
 .IR stop ,
 optionally followed by white space and extra text.
-This is a dangerous and clusmy request, as 
+This is a dangerous and clumsy request, as 
 .I htmlroff
 stops interpreting its input during the redirection, so
 .I stop
 must be found in the input itself, not in a macro that
 the input might appear to call.
-Although clusmy,
+Although clumsy,
 .B .inputpipe
 allows input files to invoke
 .I troff

+ 1 - 1
sys/man/6/mhtml

@@ -48,7 +48,7 @@ This macro opens the
 tag, opens and closes the
 .B <head>
 section, and opens
-.B <body> .
+.BR <body> .
 It invokes the
 .B .HEAD
 macro inside the

+ 23 - 1
sys/man/8/fossilcons

@@ -33,7 +33,7 @@ con /srv/fscons
 .PP
 .B listen
 [
-.B -d
+.B -INd
 ]
 [
 .I address
@@ -400,6 +400,28 @@ flag causes
 .I listen
 to remove the listener
 at the given address.
+By default, the user
+.I none
+is only allowed to attach on a connection after
+at least one other user has successfully attached.
+The
+.B -N
+flag allows connections from
+.I none
+at any time.
+The
+.B -I
+flag causes
+.I fossil
+to check the IP address of incoming connections
+against
+.BR /mnt/ipok ,
+rejecting attaches from disallowed addresses.
+This mechanism is not intended for general use.
+The server
+.I sources.cs.bell-labs.com
+uses it to comply with U.S. crytography
+export regulations.
 .PP
 .I Msg
 prints the maximum internal 9P message queue size

+ 4 - 2
sys/man/8/prep

@@ -668,7 +668,8 @@ for(disk in /dev/sd??) {
 Create a Plan 9 boot floppy on a previously formatted diskette:
 .IP
 .EX
-disk/format -b /386/pbs -df /dev/fd0disk /386/9load /tmp/plan9.ini
+disk/format -b /386/pbs -df /dev/fd0disk \e
+	/386/9load /tmp/plan9.ini /386/9pcf.gz
 .EE
 .PP
 Initialize the blank hard disk
@@ -678,7 +679,8 @@ Initialize the blank hard disk
 disk/mbr -m /386/mbr /dev/sdC0/data
 disk/fdisk -baw /dev/sdC0/data
 disk/prep -bw -a^(9fat fs cache swap) /dev/sdC0/plan9
-disk/format -b /386/pbslba -d -r 2 /dev/sdC0/9fat 9load 9pcdisk plan9.ini
+disk/format -b /386/pbslba -d -r 2 /dev/sdC0/9fat \e
+	/386/9load /386/9pcf /tmp/plan9.ini
 .EE
 .PP
 .SH SOURCE

+ 14 - 5
sys/man/8/replica

@@ -34,8 +34,16 @@ applychanges, applylog, compactdb, updatedb \- simple client-server replica mana
 .br
 .B replica/applylog
 [
-.B -cnsuv
+.B -nuv
 ]
+[
+.B -c
+.I name
+]...
+[
+.B -s
+.I name
+]...
 .I clientdb
 .I clientroot
 .I serverroot
@@ -217,14 +225,15 @@ If the
 .B -c
 flag is given, 
 .I applylog
-still takes no action, but does so silently and will not
+still takes no action for files beginning with the given names,
+but does so silently and will not
 report the conflicts in the future.
 (The conflict is resolved in favor of the client.)
-If the
+The
 .B -s
-flag is given,
+is similar but causes 
 .I applylog
-overwrites the local changes.
+to overwrite the local changes.
 (The conflict is resolved in favor of the server.)
 .PP
 .I Applychanges

+ 1 - 0
sys/man/8/snoopy

@@ -64,6 +64,7 @@ The grammar is:
 .EX
 \fIexpr\fP:	  \fIprotocol\fP
 	| \fIfield\fP '=' \fIvalue\fP
+	| \fIfield\fP '!=' \fIvalue\fP
 	| \fIprotocol\fP '(' \fIexpr\fP ')'
 	| '(' \fIexpr\fP ')'
 	| \fIexpr\fP '||' \fIexpr\fP

+ 5 - 0
sys/src/9/bitsy/dat.h

@@ -32,6 +32,10 @@ typedef void IntrHandler(Ureg*, void*);
  */
 #define AOUT_MAGIC	(E_MAGIC)
 
+enum {
+	Lockcycles = 0,	/* Don't measure lock latencies */
+};
+
 struct Lock
 {
 	ulong	key;
@@ -40,6 +44,7 @@ struct Lock
 	Proc	*p;
 	Mach	*m;
 	ushort	isilock;
+	uvlong	lockcycles;	/* Measure lock latencies */
 };
 
 struct Label

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

@@ -728,7 +728,7 @@ ise_erase(ulong addr)
  *	If someone learns better, please email me, though
  *	I doubt it will be much faster. -  presotto@bell-labs.com
  */
-static ulong
+static int
 ise_wbwrite(ulong *p, int n, ulong off, ulong baddr, ulong *status)
 {
 	ulong x, start;

+ 1 - 0
sys/src/9/port/alloc.c

@@ -95,6 +95,7 @@ plock(Pool *p)
 
 	pv = p->private;
 	ilock(&pv->lk);
+	pv->lk.pc = getcallerpc(&p);
 	pv->msg[0] = 0;
 }
 

+ 77 - 0
sys/src/9/port/chan.c

@@ -486,6 +486,82 @@ cclose(Chan *c)
 	chanfree(c);
 }
 
+/*
+ * Queue a chan to be closed by one of the clunk procs.
+ */
+struct {
+	Chan *head;
+	Chan *tail;
+	int nqueued;
+	int nclosed;
+	Lock l;
+	QLock q;
+	Rendez r;
+} clunkq;
+void closeproc(void*);
+
+void
+ccloseq(Chan *c)
+{
+	if(c->flag&CFREE)
+		panic("cclose %lux", getcallerpc(&c));
+
+	DBG("ccloseq %p name=%s ref=%ld\n", c, c->path->s, c->ref);
+
+	if(decref(c))
+		return;
+
+	lock(&clunkq.l);
+	clunkq.nqueued++;
+	c->next = nil;
+	if(clunkq.head)
+		clunkq.tail->next = c;
+	else
+		clunkq.head = c;
+	clunkq.tail = c;
+	unlock(&clunkq.l);
+
+	if(!wakeup(&clunkq.r))
+		kproc("closeproc", closeproc, nil);	
+}
+
+static int
+clunkwork(void*)
+{
+	return clunkq.head != nil;
+}
+
+void
+closeproc(void*)
+{
+	Chan *c;
+
+	for(;;){
+		qlock(&clunkq.q);
+		if(clunkq.head == nil){
+			if(!waserror()){
+				tsleep(&clunkq.r, clunkwork, nil, 5000);
+				poperror();
+			}
+			if(clunkq.head == nil){
+				qunlock(&clunkq.q);
+				pexit("no work", 1);
+			}
+		}
+		lock(&clunkq.l);
+		c = clunkq.head;
+		clunkq.head = c->next;
+		clunkq.nclosed++;
+		unlock(&clunkq.l);
+		qunlock(&clunkq.q);
+		if(!waserror()){
+			devtab[c->type]->close(c);
+			poperror();
+		}
+		chanfree(c);
+	}
+}
+
 /*
  * Make sure we have the only copy of c.  (Copy on write.)
  */
@@ -1691,3 +1767,4 @@ putmhead(Mhead *m)
 		free(m);
 	}
 }
+

+ 2 - 2
sys/src/9/port/devloopback.c

@@ -143,7 +143,7 @@ loopbackattach(char *spec)
 	lb->ref++;
 	if(lb->ref == 1){
 		for(chan = 0; chan < 2; chan++){
-			lb->link[chan].ci.mode = Tabsolute;
+			lb->link[chan].ci.mode = Trelative;
 			lb->link[chan].ci.a = &lb->link[chan];
 			lb->link[chan].ci.f = linkintr;
 			lb->link[chan].limit = Loopqlim;
@@ -685,7 +685,7 @@ pushlink(Link *link, vlong now)
 	if(!tin || tin > tout && tout)
 		tin = tout;
 
-	link->ci.ns = tin;
+	link->ci.ns = tin - now;
 	if(tin){
 		if(tin < now)
 			panic("loopback unfinished business");

+ 14 - 6
sys/src/9/port/devproc.c

@@ -62,6 +62,7 @@ enum
 	CMadmit,
 	CMextra,
 	CMexpel,
+	CMevent,
 };
 
 enum{
@@ -125,6 +126,7 @@ Cmdtab proccmd[] = {
 	CMadmit,		"admit",		1,
 	CMextra,		"extra",		1,
 	CMexpel,		"expel",		1,
+	CMevent,		"event",		1,
 };
 
 /* Segment type from portdat.h */
@@ -1289,6 +1291,7 @@ procctlreq(Proc *p, char *va, int n)
 	Cmdtab *ct;
 	vlong time;
 	char *e;
+	void (*pt)(Proc*, int, vlong);
 
 	if(p->kp)	/* no ctl requests to kprocs */
 		error(Eperm);
@@ -1317,13 +1320,13 @@ procctlreq(Proc *p, char *va, int n)
 			unbreak(p);
 			break;
 		case Stopped:
-			postnote(p, 0, "sys: killed", NExit);
 			p->procctl = Proc_exitme;
+			postnote(p, 0, "sys: killed", NExit);
 			ready(p);
 			break;
 		default:
-			postnote(p, 0, "sys: killed", NExit);
 			p->procctl = Proc_exitme;
+			postnote(p, 0, "sys: killed", NExit);
 		}
 		break;
 	case CMnohang:
@@ -1402,10 +1405,10 @@ procctlreq(Proc *p, char *va, int n)
 	case CMperiod:
 		if(p->edf == nil)
 			edfinit(p);
-		if(e=parsetime(&time, cb->f[1]))
+		if(e=parsetime(&time, cb->f[1]))	/* time in ns */
 			error(e);
 		edfstop(p);
-		p->edf->T = time;
+		p->edf->T = time/1000;	/* Edf times are in µs */
 		break;
 	case CMdeadline:
 		if(p->edf == nil)
@@ -1413,7 +1416,7 @@ procctlreq(Proc *p, char *va, int n)
 		if(e=parsetime(&time, cb->f[1]))
 			error(e);
 		edfstop(p);
-		p->edf->D = time;
+		p->edf->D = time/1000;
 		break;
 	case CMcost:
 		if(p->edf == nil)
@@ -1421,7 +1424,7 @@ procctlreq(Proc *p, char *va, int n)
 		if(e=parsetime(&time, cb->f[1]))
 			error(e);
 		edfstop(p);
-		p->edf->C = time;
+		p->edf->C = time/1000;
 		break;
 	case CMsporadic:
 		if(p->edf == nil)
@@ -1448,6 +1451,11 @@ procctlreq(Proc *p, char *va, int n)
 		if(p->edf)
 			edfstop(p);
 		break;
+	case CMevent:
+		pt = proctrace;
+		if(up->trace && pt)
+			pt(up, SUser, 0);
+		break;
 	}
 
 	poperror();

+ 7 - 2
sys/src/9/port/devsd.c

@@ -636,6 +636,7 @@ sdopen(Chan* c, int omode)
 	sdev = sdgetdev(DEV(c->qid));
 	if(sdev == nil)
 		error(Enonexist);
+
 	unit = sdev->unit[UNIT(c->qid)];
 
 	switch(TYPE(c->qid)){
@@ -646,6 +647,7 @@ sdopen(Chan* c, int omode)
 		c->qid.vers = unit->vers;
 		if(tas(&unit->rawinuse) != 0){
 			c->flag &= ~COPEN;
+			decref(&sdev->r);
 			error(Einuse);
 		}
 		unit->state = Rawcmd;
@@ -655,6 +657,7 @@ sdopen(Chan* c, int omode)
 		if(waserror()){
 			qunlock(&unit->ctl);
 			c->flag &= ~COPEN;
+			decref(&sdev->r);
 			nexterror();
 		}
 		pp = &unit->part[PART(c->qid)];
@@ -704,8 +707,10 @@ sdbio(Chan* c, int write, char* a, long len, vlong off)
 	ulong bno, max, nb, offset;
 
 	sdev = sdgetdev(DEV(c->qid));
-	if(sdev == nil)
+	if(sdev == nil){
+		decref(&sdev->r);
 		error(Enonexist);
+	}
 	unit = sdev->unit[UNIT(c->qid)];
 	if(unit == nil)
 		error(Enonexist);
@@ -1101,7 +1106,7 @@ sdread(Chan *c, void *a, long n, vlong off)
 		if(unit->sectors){
 			if(unit->dev->ifc->rctl == nil)
 				l += snprint(p+l, m-l,
-					"geometry %ld %ld\n",
+					"geometry %lud %ld\n",
 					unit->sectors, unit->secsize);
 			pp = unit->part;
 			for(i = 0; i < unit->npart; i++){

+ 112 - 60
sys/src/9/port/edf.c

@@ -12,7 +12,7 @@
 int	edfprint = 0;
 #define DPRINT	if(edfprint)print
 
-static vlong	now;
+static long	now;	/* Low order 32 bits of time in µs */
 extern ulong	delayedscheds;
 extern Schedq	runq[Nrq];
 extern int	nrdy;
@@ -21,7 +21,7 @@ extern ulong	runvec;
 /* Statistics stuff */
 ulong		nilcount;
 ulong		scheds;
-vlong		edfruntime;
+long		edfruntime;
 ulong		edfnrun;
 int		misseddeadlines;
 
@@ -39,11 +39,10 @@ static char *testschedulability(Proc*);
 static Proc *qschedulability;
 
 enum {
-	Onemicrosecond =	1000ULL,
-	Onemillisecond =	1000000ULL,
-	Onesecond =		1000000000ULL,
-	OneRound = 		Onemillisecond/2LL,
-	MilliRound = 		Onemicrosecond/2LL,
+	Onemicrosecond =	1,
+	Onemillisecond =	1000,
+	Onesecond =		1000000,
+	OneRound = 		Onemillisecond/2,
 };
 
 static int
@@ -58,7 +57,7 @@ timeconv(Fmt *f)
 		t = va_arg(f->args, uvlong);
 		break;
 	case 't':	// vlong in nanoseconds
-		t = va_arg(f->args, vlong);
+		t = va_arg(f->args, long);
 		break;
 	default:
 		return fmtstrcpy(f, "(timeconv)");
@@ -71,17 +70,19 @@ timeconv(Fmt *f)
 		sign = "";
 	if (t > Onesecond){
 		t += OneRound;
-		sprint(buf, "%s%d.%.3ds", sign, (int)(t / Onesecond), (int)(t % Onesecond)/1000000);
-	}else if (t > Onemillisecond){
-		t += MilliRound;
-		sprint(buf, "%s%d.%.3dms", sign, (int)(t / Onemillisecond), (int)(t % Onemillisecond)/1000);
-	}else if (t > Onemicrosecond)
-		sprint(buf, "%s%d.%.3dµs", sign, (int)(t / Onemicrosecond), (int)(t % Onemicrosecond));
+		sprint(buf, "%s%d.%.3ds", sign, (int)(t / Onesecond), (int)(t % Onesecond)/Onemillisecond);
+	}else if (t > Onemillisecond)
+		sprint(buf, "%s%d.%.3dms", sign, (int)(t / Onemillisecond), (int)(t % Onemillisecond));
 	else
-		sprint(buf, "%s%dns", sign, (int)t);
+		sprint(buf, "%s%dµs", sign, (int)t);
 	return fmtstrcpy(f, buf);
 }
 
+/*
+uvlong x;
+ulong xpc;
+*/
+
 Edf*
 edflock(Proc *p)
 {
@@ -91,7 +92,11 @@ edflock(Proc *p)
 		return nil;
 	ilock(&thelock);
 	if ((e = p->edf) && (e->flags & Admitted)){
-		now = todget(nil);
+/*
+		cycles(&x);
+		xpc = getcallerpc(&p);
+*/
+		now = fastticks2us(fastticks(nil));
 		return e;
 	}
 	iunlock(&thelock);
@@ -101,9 +106,21 @@ edflock(Proc *p)
 void
 edfunlock(void)
 {
+/*
+	uvlong y;
+	ulong n, upc;
+	cycles(&y);
+	upc = 0;
+	if((n = y - x) > 500000) upc = xpc;
+*/
+
 	edfruntime += todget(nil) - now;
 	edfnrun++;
 	iunlock(&thelock);
+/*
+	if(upc)
+		print("edfunlock %ld 0x%lux\n", n, upc);
+*/
 }
 
 void
@@ -113,7 +130,7 @@ edfinit(Proc*p)
 		fmtinstall('t', timeconv);
 		edfinited++;
 	}
-	now = todget(nil);
+	now = fastticks2us(fastticks(nil));
 	DPRINT("%t edfinit %lud[%s]\n", now, p->pid, statename[p->state]);
 	p->edf = malloc(sizeof(Edf));
 	if(p->edf == nil)
@@ -133,8 +150,8 @@ deadlineintr(Ureg*, Timer *t)
 		return;
 
 	p = t->ta;
-
-	DPRINT("%t deadlineintr %lud[%s]\n", todget(nil), p->pid, statename[p->state]);
+	now = fastticks2us(fastticks(nil));
+	DPRINT("%t deadlineintr %lud[%s]\n", now, p->pid, statename[p->state]);
 	/* If we're interrupting something other than the proc pointed to by t->a,
 	 * we've already achieved recheduling, so we need not do anything
 	 * Otherwise, we must cause a reschedule, but if we call sched()
@@ -157,18 +174,26 @@ release(Proc *p)
 	/* Called with edflock held */
 	Edf *e;
 	void (*pt)(Proc*, int, vlong);
+	long n;
+	vlong nowns;
 
 	e = p->edf;
 	e->flags &= ~Yield;
-	if (e->d < now){
+	if (e->d - now < 0){
 		e->periods++;
 		e->r = now;
 		if ((e->flags & Sporadic) == 0){
-			/* Non sporadic processes stay true to their period;
-			 * calculate next release time
+			/*
+			 * Non sporadic processes stay true to their period;
+			 * calculate next release time.
+			 * Second test limits duration of while loop.
 			 */
-			while(e->t <= now)
-				e->t += e->T;
+			if((n = now - e->t) > 0){
+				if(n < e->T)
+					e->t += e->T;
+				else
+					e->t = now + e->T - (n % e->T);
+			}
 		}else{
 			/* Sporadic processes may not be released earlier than
 			 * one period after this release
@@ -180,8 +205,9 @@ release(Proc *p)
 		DPRINT("%t release %lud[%s], r=%t, d=%t, t=%t, S=%t\n",
 			now, p->pid, statename[p->state], e->r, e->d, e->t, e->S);
 		if (pt = proctrace){
-			pt(p, SRelease, e->r);
-			pt(p, SDeadline, e->d);
+			nowns = todget(nil);
+			pt(p, SRelease, nowns);
+			pt(p, SDeadline, nowns + 1000LL*e->D);
 		}
 	}else{
 		DPRINT("%t release %lud[%s], too late t=%t, called from 0x%lux\n",
@@ -249,21 +275,21 @@ releaseintr(Ureg*, Timer *t)
 void
 edfrecord(Proc *p)
 {
-	vlong used;
+	long used;
 	Edf *e;
 	void (*pt)(Proc*, int, vlong);
 
 	if((e = edflock(p)) == nil)
 		return;
 	used = now - e->s;
-	if (e->d <= now)
+	if (e->d - now <= 0)
 		e->edfused += used;
 	else
 		e->extraused += used;
 	if (e->S > 0){
-		if (e->S <= used){
+		if(e->S <= used){
 			if(pt = proctrace)
-				pt(p, SSlice, now);
+				pt(p, SSlice, 0);
 			DPRINT("%t edfrecord slice used up\n", now);
 			e->d = now;
 			e->S = 0;
@@ -279,11 +305,13 @@ edfrun(Proc *p, int edfpri)
 {
 	Edf *e;
 	void (*pt)(Proc*, int, vlong);
+	long tns;
 
 	e = p->edf;
 	/* Called with edflock held */
 	if(edfpri){
-		if (e->d <= now || e->S == 0){
+		tns = e->d - now;
+		if (tns <= 0 || e->S == 0){
 			/* Deadline reached or resources exhausted,
 			 * deschedule forthwith
 			 */
@@ -292,17 +320,17 @@ edfrun(Proc *p, int edfpri)
 			e->s = now;
 			return;
 		}
-		e->tns = now + e->S;
-		if (e->d < e->tns)
-			e->tns = e->d;
+		if(e->S < tns)
+			tns = e->S;
+		e->tns = 1000LL * tns;
 		if(e->tt == nil || e->tf != deadlineintr){
-			DPRINT("%t edfrun, deadline=%t\n", now, e->tns);
+			DPRINT("%t edfrun, deadline=%t\n", now, tns);
 		}else{
 			DPRINT("v");
 		}
 		if(p->trace && (pt = proctrace))
-			pt(p, SInte, e->tns);
-		e->tmode = Tabsolute;
+			pt(p, SInte, todget(nil) + e->tns);
+		e->tmode = Trelative;
 		e->tf = deadlineintr;
 		e->ta = p;
 		timeradd(e);
@@ -320,6 +348,7 @@ edfadmit(Proc *p)
 	int i;
 	Proc *r;
 	void (*pt)(Proc*, int, vlong);
+	long tns;
 
 	e = p->edf;
 	if (e->flags & Admitted)
@@ -347,7 +376,7 @@ edfadmit(Proc *p)
 	edflock(p);
 
 	if(pt = proctrace)
-		pt(p, SAdmit, now);
+		pt(p, SAdmit, 0);
 
 	/* Look for another proc with the same period to synchronize to */
 	SET(r);
@@ -395,8 +424,11 @@ edfadmit(Proc *p)
 			if(e->tt == nil){
 				e->tf = releaseintr;
 				e->ta = p;
-				e->tns = e->t;
-				e->tmode = Tabsolute;
+				tns = e->t - now;
+				if(tns < 20)
+					tns = 20;
+				e->tns = 1000LL * tns;
+				e->tmode = Trelative;
 				timeradd(e);
 			}
 		}
@@ -415,9 +447,9 @@ edfstop(Proc *p)
 	if (e = edflock(p)){
 		DPRINT("%t edfstop %lud[%s]\n", now, p->pid, statename[p->state]);
 		if(pt = proctrace)
-			pt(p, SExpel, now);
+			pt(p, SExpel, 0);
 		e->flags &= ~Admitted;
-		if (e->tt)
+		if(e->tt)
 			timerdel(e);
 		edfunlock();
 	}
@@ -426,7 +458,8 @@ edfstop(Proc *p)
 static int
 yfn(void *)
 {
-	return up->trend == nil || todget(nil) >= up->edf->r;
+	now = fastticks2us(fastticks(nil));
+	return up->trend == nil || now - up->edf->r >= 0;
 }
 
 void
@@ -435,20 +468,28 @@ edfyield(void)
 	/* sleep until next release */
 	Edf *e;
 	void (*pt)(Proc*, int, vlong);
+	long n;
 
 	if((e = edflock(up)) == nil)
 		return;
 	if(pt = proctrace)
-		pt(up, SYield, now);
-	while(e->t < now)
-		e->t += e->T;
+		pt(up, SYield, 0);
+	if((n = now - e->t) > 0){
+		if(n < e->T)
+			e->t += e->T;
+		else
+			e->t = now + e->T - (n % e->T);
+	}
 	e->r = e->t;
 	e->flags |= Yield;
 	e->d = now;
 	if (up->tt == nil){
-		up->tns = e->t;
+		n = e->t - now;
+		if(n < 20)
+			n = 20;
+		up->tns = 1000LL * n;
 		up->tf = releaseintr;
-		up->tmode = Tabsolute;
+		up->tmode = Trelative;
 		up->ta = up;
 		up->trend = &up->sleep;
 		timeradd(up);
@@ -465,21 +506,32 @@ edfready(Proc *p)
 	Schedq *rq;
 	Proc *l, *pp;
 	void (*pt)(Proc*, int, vlong);
+	long n;
 
 	if((e = edflock(p)) == nil)
 		return 0;
-	if (e->d <= now){
+	if(e->d - now <= 0){
 		/* past deadline, arrange for next release */
-		if ((e->flags & Sporadic) == 0){
-			/* Non sporadic processes stay true to their period, calculate next release time */
-			while(e->t < now)
-				e->t += e->T;
+		if((e->flags & Sporadic) == 0){
+			/*
+			 * Non sporadic processes stay true to their period;
+			 * calculate next release time.
+			 */
+			if((n = now - e->t) > 0){
+				if(n < e->T)
+					e->t += e->T;
+				else
+					e->t = now + e->T - (n % e->T);
+			}
 		}	
-		if (now < e->t){
+		if(now - e->t < 0){
 			/* Next release is in the future, schedule it */
-			if (e->tt == nil || e->tf != releaseintr){
-				e->tns = e->t;
-				e->tmode = Tabsolute;
+			if(e->tt == nil || e->tf != releaseintr){
+				n = e->t - now;
+				if(n < 20)
+					n = 20;
+				e->tns = 1000LL * n;
+				e->tmode = Trelative;
 				e->tf = releaseintr;
 				e->ta = p;
 				timeradd(e);
@@ -534,7 +586,7 @@ edfready(Proc *p)
 	p->state = Ready;
 	unlock(runq);
 	if(pt = proctrace)
-		pt(p, SReady, now);
+		pt(p, SReady, 0);
 	return 1;
 }
 
@@ -554,7 +606,7 @@ testenq(Proc *p)
 	SET(xp);
 	for (xpp = &qschedulability; *xpp; xpp = &xp->edf->testnext) {
 		xp = *xpp;
-		if (e->testtime < xp->edf->testtime
+		if (e->testtime - xp->edf->testtime < 0
 		|| (e->testtime == xp->edf->testtime && e->testtype < xp->edf->testtype)){
 			e->testnext = xp;
 			*xpp = p;
@@ -569,7 +621,7 @@ static char *
 testschedulability(Proc *theproc)
 {
 	Proc *p;
-	vlong H, G, Cb, ticks;
+	long H, G, Cb, ticks;
 	int steps, i;
 
 	/* initialize */

+ 18 - 17
sys/src/9/port/edf.h

@@ -16,36 +16,37 @@ enum {
 typedef struct Edf		Edf;
 
 struct Edf {
+	/* All times in µs */
 	/* time intervals */
-	vlong		D;			/* Deadline */
-	vlong		Delta;		/* Inherited deadline */
-	vlong		T;			/* period */
-	vlong		C;			/* Cost */
-	vlong		S;			/* Slice: time remaining in this period */
-	/* times */
-	vlong		r;			/* (this) release time */
-	vlong		d;			/* (this) deadline */
-	vlong		t;			/* Start of next period, t += T at release */
-	vlong		s;			/* Time at which this proc was last scheduled */
+	long		D;		/* Deadline */
+	long		Delta;		/* Inherited deadline */
+	long		T;		/* period */
+	long		C;		/* Cost */
+	long		S;		/* Slice: time remaining in this period */
+	/* times (only low-order bits of absolute time) */
+	long		r;		/* (this) release time */
+	long		d;		/* (this) deadline */
+	long		t;		/* Start of next period, t += T at release */
+	long		s;		/* Time at which this proc was last scheduled */
 	/* for schedulability testing */
-	vlong		testDelta;
-	int			testtype;	/* Release or Deadline */
-	vlong		testtime;
+	long		testDelta;
+	int		testtype;	/* Release or Deadline */
+	long		testtime;
 	Proc		*testnext;
 	/* other */
 	ushort		flags;
 	Timer;
 	/* Stats */
-	vlong		edfused;
-	vlong		extraused;
-	vlong		aged;
+	long		edfused;
+	long		extraused;
+	long		aged;
 	ulong		periods;
 	ulong		missed;
 };
 
 extern Lock	edftestlock;	/* for atomic admitting/expelling */
 
-#pragma	varargck	type	"t"		vlong
+#pragma	varargck	type	"t"		long
 #pragma	varargck	type	"U"		uvlong
 
 /* Interface: */

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

@@ -11,7 +11,7 @@ fault(ulong addr, int read)
 	Segment *s;
 	char *sps;
 
-if(up && up->nlocks.ref) print("fault nlocks %ld\n", up->nlocks.ref);
+if(up->nlocks.ref) print("fault nlocks %ld\n", up->nlocks.ref);
 
 	sps = up->psstate;
 	up->psstate = "Fault";

+ 0 - 3
sys/src/9/port/master

@@ -9,7 +9,6 @@ C	ce
 D	ssl
 E	sdp
 F	flash
-F	tinyfs
 I	ip
 K	kprof
 L	lpt
@@ -20,7 +19,6 @@ T	lm78
 U	usb
 V	lml
 V	tv
-X	loopback
 Y	pccard
 a	tls
 b	irq
@@ -43,7 +41,6 @@ v	vga
 w	wd
 y	i82365
 y	pcmcia
-z	mntstats
 |	pipe
 ¤	cap
 κ	kbmap

+ 40 - 1
sys/src/9/port/pgrp.c

@@ -211,14 +211,53 @@ closefgrp(Fgrp *f)
 	if(decref(f) != 0)
 		return;
 
+	/*
+	 * If we get into trouble, forceclosefgrp
+	 * will bail us out.
+	 */
+	up->closingfgrp = f;
 	for(i = 0; i <= f->maxfd; i++)
-		if(c = f->fd[i])
+		if(c = f->fd[i]){
+			f->fd[i] = nil;
 			cclose(c);
+		}
+	up->closingfgrp = nil;
 
 	free(f->fd);
 	free(f);
 }
 
+/*
+ * Called from sleep because up is in the middle
+ * of closefgrp and just got a kill ctl message.
+ * This usually means that up has wedged because
+ * of some kind of deadly embrace with mntclose
+ * trying to talk to itself.  To break free, hand the
+ * unclosed channels to the close queue.  Once they
+ * are finished, the blocked cclose that we've 
+ * interrupted will finish by itself.
+ */
+void
+forceclosefgrp(void)
+{
+	int i;
+	Chan *c;
+	Fgrp *f;
+
+	if(up->procctl != Proc_exitme || up->closingfgrp == nil){
+		print("bad forceclosefgrp call");
+		return;
+	}
+
+	f = up->closingfgrp;
+	for(i = 0; i <= f->maxfd; i++)
+		if(c = f->fd[i]){
+			f->fd[i] = nil;
+			ccloseq(c);
+		}
+}
+
+
 Mount*
 newmount(Mhead *mh, Chan *to, int flag, char *spec)
 {

+ 3 - 14
sys/src/9/port/portclock.c

@@ -17,7 +17,7 @@ static Timers timers[MAXMACH];
 ulong intrcount[MAXMACH];
 ulong fcallcount[MAXMACH];
 
-static uvlong
+static vlong
 tadd(Timers *tt, Timer *nt)
 {
 	Timer *t, **last;
@@ -29,12 +29,10 @@ tadd(Timers *tt, Timer *nt)
 		panic("timer");
 		break;
 	case Trelative:
-		assert(nt->tns > 0);
+		if(nt->tns <= 0)
+			nt->tns = 1;
 		nt->twhen = fastticks(nil) + ns2fastticks(nt->tns);
 		break;
-	case Tabsolute:
-		nt->twhen = tod2fastticks(nt->tns);
-		break;
 	case Tperiodic:
 		assert(nt->tns >= 100000);	/* At least 100 µs period */
 		if(nt->twhen == 0){
@@ -94,15 +92,6 @@ timeradd(Timer *nt)
 	Timers *tt;
 	vlong when;
 
-	if (nt->tmode == Tabsolute){
-		when = todget(nil);
-		if (nt->tns <= when){
-	//		if (nt->tns + MS2NS(10) <= when)	/* small deviations will happen */
-	//			print("timeradd (%lld %lld) %lld too early 0x%lux\n",
-	//				when, nt->tns, when - nt->tns, getcallerpc(&nt));
-			nt->tns = when;
-		}
-	}
 	/* Must lock Timer struct before Timers struct */
 	ilock(nt);
 	if(tt = nt->tt){

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

@@ -506,7 +506,6 @@ struct Waitq
 enum {
 	/* Mode */
 	Trelative,	/* timer programmed in ns from now */
-	Tabsolute,	/* timer programmed in ns since epoch */
 	Tperiodic,	/* periodic timer, period in ns */
 };
 
@@ -631,6 +630,8 @@ struct Proc
 	Fgrp	*fgrp;		/* File descriptor group */
 	Rgrp	*rgrp;		/* Rendez group */
 
+	Fgrp	*closingfgrp;	/* used during teardown */
+
 	ulong	parentpid;
 	ulong	time[6];	/* User, Sys, Real; child U, S, R */
 

+ 4 - 1
sys/src/9/port/portfns.h

@@ -31,6 +31,7 @@ void		checkb(Block*, char*);
 void		cinit(void);
 Chan*		cclone(Chan*);
 void		cclose(Chan*);
+void		ccloseq(Chan*);
 void		closeegrp(Egrp*);
 void		closefgrp(Fgrp*);
 void		closepgrp(Pgrp*);
@@ -102,12 +103,14 @@ void		exhausted(char*);
 void		exit(int);
 uvlong		fastticks(uvlong*);
 uvlong		fastticks2ns(uvlong);
+uvlong		fastticks2us(uvlong);
 int		fault(ulong, int);
 void		fdclose(int, int);
 Chan*		fdtochan(int, int, int, int);
 int		findmount(Chan**, Mhead**, int, int, Qid);
 int		fixfault(Segment*, ulong, int, int);
 void		flushmmu(void);
+void		forceclosefgrp(void);
 void		forkchild(Proc*, Ureg*);
 void		forkret(void);
 void		free(void*);
@@ -336,7 +339,6 @@ void		todsetfreq(vlong);
 void		todinit(void);
 void		todset(vlong, vlong, int);
 Block*		trimblock(Block*, int, int);
-void		tnsleep(Rendez*, int (*)(void*), void*, vlong);
 void		tsleep(Rendez*, int (*)(void*), void*, ulong);
 int		uartctl(Uart*, char*);
 int		uartgetc(void);
@@ -351,6 +353,7 @@ void		unbreak(Proc*);
 void		uncachepage(Page*);
 long		unionread(Chan*, void*, long);
 void		unlock(Lock*);
+uvlong		us2fastticks(uvlong);
 void		userinit(void);
 ulong		userpc(void);
 long		userwrite(char*, int);

+ 4 - 1
sys/src/9/port/proc.c

@@ -776,6 +776,8 @@ sleep(Rendez *r, int (*f)(void*), void *arg)
 	if(up->notepending) {
 		up->notepending = 0;
 		splx(s);
+		if(up->procctl == Proc_exitme && up->closingfgrp)
+			forceclosefgrp();
 		error(Eintr);
 	}
 
@@ -1320,7 +1322,8 @@ kproc(char *name, void (*func)(void *), void *arg)
 	p->nerrlab = 0;
 	p->slash = up->slash;
 	p->dot = up->dot;
-	incref(p->dot);
+	if(p->dot)
+		incref(p->dot);
 
 	memmove(p->note, up->note, sizeof(p->note));
 	p->nnote = up->nnote;

+ 29 - 3
sys/src/9/port/tod.c

@@ -31,13 +31,16 @@
 
 /* frequency of the tod clock */
 #define TODFREQ	1000000000ULL
+#define MicroFREQ	1000000ULL
 
 struct {
 	int		init;		// true if initialized
 	ulong	cnt;
 	Lock;
-	uvlong	multiplier;	// t = off + (multiplier*ticks)>>31
-	uvlong	divider;	// ticks = (divider*(ticks-off))>>31
+	uvlong	multiplier;	// ns = off + (multiplier*ticks)>>31
+	uvlong	divider;	// ticks = (divider*(ns-off))>>31
+	uvlong	umultiplier;	// µs = (µmultiplier*ticks)>>31
+	uvlong	udivider;	// ticks = (µdivider*µs)>>31
 	vlong	hz;		// frequency of fast clock
 	vlong	last;		// last reading of fast clock
 	vlong	off;		// offset from epoch to last
@@ -72,7 +75,8 @@ todsetfreq(vlong f)
 	/* calculate multiplier for time conversion */
 	tod.multiplier = mk64fract(TODFREQ, f);
 	tod.divider = mk64fract(f, TODFREQ);
-
+	tod.umultiplier = mk64fract(MicroFREQ, f);
+	tod.udivider = mk64fract(f, MicroFREQ);
 	iunlock(&tod);
 }
 
@@ -213,6 +217,28 @@ seconds(void)
 	return i;
 }
 
+uvlong
+fastticks2us(uvlong ticks)
+{
+	uvlong res;
+
+	if(!tod.init)
+		todinit();
+	mul64fract(&res, ticks, tod.umultiplier);
+	return res;
+}
+
+uvlong
+us2fastticks(uvlong us)
+{
+	uvlong res;
+
+	if(!tod.init)
+		todinit();
+	mul64fract(&res, us, tod.udivider);
+	return res;
+}
+
 //  convert milliseconds to fast ticks
 //
 uvlong

+ 1 - 1
sys/src/9/ppc/devflash.c

@@ -813,7 +813,7 @@ ise_erase(Flash *flash, ulong addr)
  *	If someone learns better, please email me, though
  *	I doubt it will be much faster. -  presotto@bell-labs.com
  */
-static ulong
+static long
 ise_wbwrite(Flash *flash, Fword *p, int n, ulong off, ulong baddr, ulong *status)
 {
 	Fword x;

+ 3 - 1
sys/src/9/ppc/trap.c

@@ -225,8 +225,10 @@ trap(Ureg *ureg)
 		if(!user)
 			panic("syscall in kernel: srr1 0x%4.4luX\n", ureg->srr1);
 		syscall(ureg);
-		if (up->delaysched)
+		if (up->delaysched){
 			sched();
+			splhi();
+		}
 		kexit(ureg);
 		return;		/* syscall() calls notify itself, don't do it again */
 

+ 15 - 30
sys/src/cmd/8c/txt.c

@@ -791,9 +791,7 @@ gmove(Node *f, Node *t)
 	case CASE(	TFLOAT,	TSHORT):
 	case CASE(	TFLOAT,	TUSHORT):
 	case CASE(	TFLOAT,	TINT):
-	case CASE(	TFLOAT,	TUINT):
 	case CASE(	TFLOAT,	TLONG):
-	case CASE(	TFLOAT,	TULONG):
 	case CASE(	TFLOAT,	TIND):
 
 	case CASE(	TDOUBLE,TCHAR):
@@ -801,20 +799,8 @@ gmove(Node *f, Node *t)
 	case CASE(	TDOUBLE,TSHORT):
 	case CASE(	TDOUBLE,TUSHORT):
 	case CASE(	TDOUBLE,TINT):
-	case CASE(	TDOUBLE,TUINT):
 	case CASE(	TDOUBLE,TLONG):
-	case CASE(	TDOUBLE,TULONG):
 	case CASE(	TDOUBLE,TIND):
-
-	case CASE(	TVLONG,	TCHAR):
-	case CASE(	TVLONG,	TUCHAR):
-	case CASE(	TVLONG,	TSHORT):
-	case CASE(	TVLONG,	TUSHORT):
-	case CASE(	TVLONG,	TINT):
-	case CASE(	TVLONG,	TUINT):
-	case CASE(	TVLONG,	TLONG):
-	case CASE(	TVLONG,	TULONG):
-	case CASE(	TVLONG,	TIND):
 		if(fproundflg) {
 			regsalloc(&nod, &regnode);
 			gins(AFMOVLP, f, &nod);
@@ -833,14 +819,27 @@ gmove(Node *f, Node *t)
 		gmove(&nod, t);
 		return;
 
+/*
+ * float to ulong
+ */
+	case CASE(	TDOUBLE,	TULONG):
+	case CASE(	TFLOAT,	TULONG):
+	case CASE(	TDOUBLE,	TUINT):
+	case CASE(	TFLOAT,	TUINT):
+		regsalloc(&nod, &regnode);
+		gmove(f, &fregnode0);
+		gins(AFADDD, nodfconst(-2147483648.), &fregnode0);
+		gins(AFMOVLP, f, &nod);
+		gins(ASUBL, nodconst(-2147483648), &nod);
+		gmove(&nod, t);
+		return;
+
 /*
  * ulong to float
  */
 	case CASE(	TULONG,	TDOUBLE):
-	case CASE(	TULONG,	TVLONG):
 	case CASE(	TULONG,	TFLOAT):
 	case CASE(	TUINT,	TDOUBLE):
-	case CASE(	TUINT,	TVLONG):
 	case CASE(	TUINT,	TFLOAT):
 		regalloc(&nod, f, f);
 		gmove(f, &nod);
@@ -873,14 +872,6 @@ gmove(Node *f, Node *t)
 	case CASE(	TINT,	TDOUBLE):
 	case CASE(	TLONG,	TDOUBLE):
 	case CASE(	TIND,	TDOUBLE):
-
-	case CASE(	TCHAR,	TVLONG):
-	case CASE(	TUCHAR,	TVLONG):
-	case CASE(	TSHORT,	TVLONG):
-	case CASE(	TUSHORT,TVLONG):
-	case CASE(	TINT,	TVLONG):
-	case CASE(	TLONG,	TVLONG):
-	case CASE(	TIND,	TVLONG):
 		regsalloc(&nod, &regnode);
 		gmove(f, &nod);
 		gins(AFMOVL, &nod, &fregnode0);
@@ -891,15 +882,9 @@ gmove(Node *f, Node *t)
  */
 	case CASE(	TFLOAT,	TFLOAT):
 	case CASE(	TDOUBLE,TFLOAT):
-	case CASE(	TVLONG,	TFLOAT):
 
 	case CASE(	TFLOAT,	TDOUBLE):
 	case CASE(	TDOUBLE,TDOUBLE):
-	case CASE(	TVLONG,	TDOUBLE):
-
-	case CASE(	TFLOAT,	TVLONG):
-	case CASE(	TDOUBLE,TVLONG):
-	case CASE(	TVLONG,	TVLONG):
 		a = AFMOVD;	break;
 	}
 	if(a == AMOVL || a == AFMOVD)

+ 4 - 1
sys/src/cmd/aux/statusbar.c

@@ -200,12 +200,15 @@ main(int argc, char **argv)
 		textmode = 1;
 		rbar = Rect(0, 0, 60, 1);
 	}else{
-		initdraw(0, 0, "bar");
+		if(initdraw(0, 0, "bar") < 0)
+			exits("initdraw");
 		initcolor();
 		einit(Emouse|Ekeyboard);
 		eresized(0);
 	}
 	bar(&b);
+
+	exits(0);
 }
 
 

+ 20 - 13
sys/src/cmd/cc/scon.c

@@ -1,5 +1,18 @@
 #include "cc.h"
 
+static Node*
+acast(Type *t, Node *n)
+{
+	if(n->type->etype != t->etype || n->op == OBIT) {
+		n = new1(OCAST, n, Z);
+		if(nocast(n->left->type, t))
+			*n = *n->left;
+		n->type = t;
+	}
+	return n;
+}
+
+
 void
 evconst(Node *n)
 {
@@ -426,10 +439,8 @@ acom2(Node *n, Type *t)
 			if(c2 % c1)
 				continue;
 			r = trm[j].node;
-			if(r->type->etype != et) {
-				r = new1(OCAST, r, Z);
-				r->type = t;
-			}
+			if(r->type->etype != et)
+				r = acast(t, r);
 			c2 = trm[j].mult/trm[i].mult;
 			if(c2 != 1 && c2 != -1) {
 				r = new1(OMUL, r, new(OCONST, Z, Z));
@@ -438,10 +449,8 @@ acom2(Node *n, Type *t)
 				r->right->vconst = c2;
 			}
 			l = trm[i].node;
-			if(l->type->etype != et) {
-				l = new1(OCAST, l, Z);
-				l->type = t;
-			}
+			if(l->type->etype != et)
+				l = acast(t, l);
 			r = new1(OADD, l, r);
 			r->type = t;
 			if(c2 == -1)
@@ -468,10 +477,8 @@ acom2(Node *n, Type *t)
 		if(c1 == 0)
 			continue;
 		r = trm[i].node;
-		if(r->type->etype != et || r->op == OBIT) {
-			r = new1(OCAST, r, Z);
-			r->type = t;
-		}
+		if(r->type->etype != et || r->op == OBIT)
+			r = acast(t, r);
 		if(c1 != 1 && c1 != -1) {
 			r = new1(OMUL, r, new(OCONST, Z, Z));
 			r->type = t;
@@ -576,7 +583,7 @@ addo(Node *n)
 
 	if(n != Z)
 	if(!typefd[n->type->etype])
-	if(!typev[n->type->etype])
+	if(!typev[n->type->etype] || ewidth[TVLONG] == ewidth[TIND])
 	switch(n->op) {
 
 	case OCAST:

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

@@ -684,7 +684,7 @@ arith(Node *n, int f)
 	if(n->op == OSUB)
 	if(i == TIND && j == TIND) {
 		w = n->right->type->link->width;
-		if(w < 1)
+		if(w < 1 || n->left->type->link == T || n->left->type->link->width < 1)
 			goto bad;
 		n->type = types[ewidth[TIND] <= ewidth[TLONG]? TLONG: TVLONG];
 		if(1 && ewidth[TIND] > ewidth[TLONG]){

+ 10 - 5
sys/src/cmd/fossil/9.h

@@ -44,14 +44,19 @@ enum {
 	MsgF		= 4,
 };
 
+enum {
+	ConNoneAllow	= 1<<0,
+	ConNoAuthCheck	= 1<<1,
+	ConNoPermCheck	= 1<<2,
+	ConWstatAllow	= 1<<3,
+	ConIPCheck	= 1<<4,
+};
 struct Con {
 	char*	name;
 	uchar*	data;			/* max, not negotiated */
 	int	isconsole;		/* immutable */
-	int	noauth;			/* immutable */
-	int	noperm;			/* immutable */
-	int	wstatallow;		/* immutable */
-
+	int	flags;		/* immutable */
+	char		remote[128];	/* immutable */
 	VtLock*	lock;
 	int	state;
 	int	fd;
@@ -191,7 +196,7 @@ extern int lstnInit(void);
 /*
  * 9proc.c
  */
-extern Con* conAlloc(int, char*);
+extern Con* conAlloc(int, char*, int);
 extern void conInit(void);
 extern void msgFlush(Msg*);
 extern void msgInit(void);

+ 14 - 2
sys/src/cmd/fossil/9auth.c

@@ -84,16 +84,23 @@ authCheck(Fcall* t, Fid* fid, Fs* fsys)
 		 * authentication.
 		 */
 		vtRLock(con->alock);
-		if(!con->isconsole &&
-		(strcmp(fid->uname, unamenone) != 0 || !con->aok)){
+		if(con->isconsole){
+			/* anything goes */
+		}else if((con->flags&ConNoneAllow) || con->aok){
+			consPrint("attach %s as %s: allowing as none\n", fsysGetName(fsys), fid->uname);
+			vtMemFree(fid->uname);
+			fid->uname = vtStrDup(unamenone);
+		}else{
 			vtRUnlock(con->alock);
 			consPrint("attach %s as %s: connection not authenticated, not console\n", fsysGetName(fsys), fid->uname);
+			vtSetError("cannot attach as none before authentication");
 			return 0;
 		}
 		vtRUnlock(con->alock);
 
 		if((fid->uid = uidByUname(fid->uname)) == nil){
 			consPrint("attach %s as %s: unknown uname\n", fsysGetName(fsys), fid->uname);
+			vtSetError("unknown user");
 			return 0;
 		}
 		return 1;
@@ -101,6 +108,7 @@ authCheck(Fcall* t, Fid* fid, Fs* fsys)
 
 	if((afid = fidGet(con, t->afid, 0)) == nil){
 		consPrint("attach %s as %s: bad afid\n", fsysGetName(fsys), fid->uname);
+		vtSetError("bad authentication fid");
 		return 0;
 	}
 
@@ -111,11 +119,13 @@ authCheck(Fcall* t, Fid* fid, Fs* fsys)
 	if(!(afid->qid.type & QTAUTH)){
 		consPrint("attach %s as %s: afid not an auth file\n", fsysGetName(fsys), fid->uname);
 		fidPut(afid);
+		vtSetError("bad authentication fid");
 		return 0;
 	}
 	if(strcmp(afid->uname, fid->uname) != 0 || afid->fsys != fsys){
 		consPrint("attach %s as %s: afid is for %s as %s\n", fsysGetName(fsys), fid->uname, fsysGetName(afid->fsys), afid->uname);
 		fidPut(afid);
+		vtSetError("attach/auth mismatch");
 		return 0;
 	}
 
@@ -125,6 +135,7 @@ authCheck(Fcall* t, Fid* fid, Fs* fsys)
 			vtUnlock(afid->alock);
 			consPrint("attach %s as %s: %R\n", fsysGetName(fsys), fid->uname);
 			fidPut(afid);
+			vtSetError("authentication protocol not finished");
 			return 0;
 		}
 	}
@@ -134,6 +145,7 @@ authCheck(Fcall* t, Fid* fid, Fs* fsys)
 	if((fid->uid = uidByUname(afid->cuname)) == nil){
 		consPrint("attach %s as %s: unknown cuname %s\n", fsysGetName(fsys), fid->uname, afid->cuname);
 		fidPut(afid);
+		vtSetError("unknown user");
 		return 0;
 	}
 

+ 16 - 10
sys/src/cmd/fossil/9lstn.c

@@ -5,6 +5,7 @@
 typedef struct Lstn Lstn;
 typedef struct Lstn {
 	int	afd;
+	int	flags;
 	char*	address;
 	char	dir[NETPATHLEN];
 
@@ -45,7 +46,7 @@ lstnListen(void* a)
 	Lstn *lstn;
 	int dfd, lfd;
 	char newdir[NETPATHLEN];
-
+	
  	vtThreadSetName("listen");
 
 	lstn = a;
@@ -54,18 +55,16 @@ lstnListen(void* a)
 			fprint(2, "listen: listen '%s': %r", lstn->dir);
 			break;
 		}
-
 		if((dfd = accept(lfd, newdir)) >= 0)
-			conAlloc(dfd, newdir);
+			conAlloc(dfd, newdir, lstn->flags);
 		else
-			fprint(2, "listen: accept '%s': %r", newdir);
-		close(lfd);
+			fprint(2, "listen: accept %s: %r\n", newdir);
 	}
 	lstnFree(lstn);
 }
 
 static Lstn*
-lstnAlloc(char* address)
+lstnAlloc(char* address, int flags)
 {
 	int afd;
 	Lstn *lstn;
@@ -89,6 +88,7 @@ lstnAlloc(char* address)
 	lstn = vtMemAllocZ(sizeof(Lstn));
 	lstn->afd = afd;
 	lstn->address = vtStrDup(address);
+	lstn->flags = flags;
 	memmove(lstn->dir, dir, NETPATHLEN);
 
 	if(lbox.tail != nil){
@@ -114,18 +114,24 @@ lstnAlloc(char* address)
 static int
 cmdLstn(int argc, char* argv[])
 {
-	int dflag;
+	int dflag, flags;
 	Lstn *lstn;
-	char *usage = "usage: listen [-d] [address]";
+	char *usage = "usage: listen [-dIN] [address]";
 
 	dflag = 0;
-
+	flags = 0;
 	ARGBEGIN{
 	default:
 		return cliError(usage);
 	case 'd':
 		dflag = 1;
 		break;
+	case 'I':
+		flags |= ConIPCheck;
+		break;
+	case 'N':
+		flags |= ConNoneAllow;
+		break;
 	}ARGEND
 
 	switch(argc){
@@ -139,7 +145,7 @@ cmdLstn(int argc, char* argv[])
 		break;
 	case 1:
 		if(!dflag){
-			if(lstnAlloc(argv[0]) == nil)
+			if(lstnAlloc(argv[0], flags) == nil)
 				return 0;
 			break;
 		}

+ 53 - 8
sys/src/cmd/fossil/9p.c

@@ -56,7 +56,7 @@ permFile(File* file, Fid* fid, int perm)
 			return 1;
 		}
 	}
-	if(fsysNoPermCheck(fid->fsys) || fid->con->noperm){
+	if(fsysNoPermCheck(fid->fsys) || (fid->con->flags&ConNoPermCheck)){
 		deCleanup(&de);
 		return 1;
 	}
@@ -119,7 +119,7 @@ rTwstat(Msg* m)
 	ulong mode, oldmode;
 	DirEntry de;
 	char *gid, *strs, *uid;
-	int gl, op, retval, tsync;
+	int gl, op, retval, tsync, wstatallow;
 
 	if((fid = fidGet(m->con, m->t.fid, FidFWlock)) == nil)
 		return 0;
@@ -279,13 +279,15 @@ rTwstat(Msg* m)
 	else
 		gid = vtStrDup(de.gid);
 
+	wstatallow = (fsysWstatAllow(fid->fsys) || (m->con->flags&ConWstatAllow));
+
 	/*
 	 * 'Gl' counts whether neither, one or both groups are led.
 	 */
 	gl = groupLeader(gid, fid->uname) != 0;
 	gl += groupLeader(de.gid, fid->uname) != 0;
 
-	if(op && !(fsysWstatAllow(fid->fsys) || m->con->wstatallow)){
+	if(op && !wstatallow){
 		if(strcmp(fid->uid, de.uid) != 0 && !gl){
 			vtSetError("wstat -- not owner or group leader");
 			goto error;
@@ -298,7 +300,7 @@ rTwstat(Msg* m)
 	 * If gid is nil here then
 	 */
 	if(strcmp(gid, de.gid) != 0){
-		if(!(fsysWstatAllow(fid->fsys) || m->con->wstatallow)
+		if(!wstatallow
 		&& !(strcmp(fid->uid, de.uid) == 0 && groupMember(gid, fid->uname))
 		&& !(gl == 2)){
 			vtSetError("wstat -- not owner and not group leaders");
@@ -338,7 +340,7 @@ rTwstat(Msg* m)
 			goto error;
 		}
 		if(strcmp(uid, de.uid) != 0){
-			if(!(fsysWstatAllow(fid->fsys) || m->con->wstatallow)){
+			if(!wstatallow){
 				vtSetError("wstat -- not owner");
 				goto error;
 			}
@@ -926,6 +928,44 @@ parseAname(char *aname, char **fsname, char **path)
 		*path = "";
 }
 
+/*
+ * Check remote IP address against /mnt/ipok.
+ * Sources.cs.bell-labs.com uses this to disallow
+ * network connections from Sudan, Libya, etc., 
+ * following U.S. cryptography export regulations.
+ */
+static int
+conIPCheck(Con* con)
+{
+	char ok[256], *p;
+	int fd;
+
+	if(con->flags&ConIPCheck){
+		if(con->remote[0] == 0){
+			vtSetError("cannot verify unknown remote address");
+			return 0;
+		}
+		if(access("/mnt/ipok/ok", AEXIST) < 0){
+			/* mount closes the fd on success */
+			if((fd = open("/srv/ipok", ORDWR)) >= 0 
+			&& mount(fd, -1, "/mnt/ipok", MREPL, "") < 0)
+				close(fd);
+			if(access("/mnt/ipok/ok", AEXIST) < 0){
+				vtSetError("cannot verify remote address");
+				return 0;
+			}
+		}
+		snprint(ok, sizeof ok, "/mnt/ipok/ok/%s", con->remote);
+		if((p = strchr(ok, '!')) != nil)
+			*p = 0;
+		if(access(ok, AEXIST) < 0){
+			vtSetError("restricted remote address");
+			return 0;
+		}
+	}
+	return 1;
+}
+
 static int
 rTattach(Msg* m)
 {
@@ -949,14 +989,19 @@ rTattach(Msg* m)
 	else
 		fid->uname = vtStrDup(unamenone);
 
-	if(fsysNoAuthCheck(fsys) || m->con->noauth){
+	if((fid->con->flags&ConIPCheck) && !conIPCheck(fid->con)){
+		consPrint("reject %s from %s: %R\n", fid->uname, fid->con->remote);
+		fidClunk(fid);
+		vtMemFree(fsname);
+		return 0;
+	}
+	if(fsysNoAuthCheck(fsys) || (m->con->flags&ConNoAuthCheck)){
 		if((fid->uid = uidByUname(fid->uname)) == nil)
 			fid->uid = vtStrDup(unamenone);
 	}
 	else if(!authCheck(&m->t, fid, fsys)){
 		fidClunk(fid);
 		vtMemFree(fsname);
-		vtSetError("authentication failed");
 		return 0;
 	}
 
@@ -993,7 +1038,7 @@ rTauth(Msg* m)
 	}
 	vtMemFree(fsname);
 
-	if(fsysNoAuthCheck(fsys) || m->con->noauth){
+	if(fsysNoAuthCheck(fsys) || (m->con->flags&ConNoAuthCheck)){
 		m->con->aok = 1;
 		vtSetError("authentication disabled");
 		fsysPut(fsys);

+ 27 - 6
sys/src/cmd/fossil/9proc.c

@@ -63,7 +63,7 @@ conFree(Con* con)
 	}
 	con->state = ConDead;
 	con->aok = 0;
-	con->noauth = con->noperm = con->wstatallow = 0;
+	con->flags = 0;
 	con->isconsole = 0;
 
 	vtLock(cbox.alock);
@@ -502,9 +502,11 @@ msgWrite(void* v)
 }
 
 Con*
-conAlloc(int fd, char* name)
+conAlloc(int fd, char* name, int flags)
 {
 	Con *con;
+	char buf[128], *p;
+	int rfd, n;
 
 	vtLock(cbox.alock);
 	while(cbox.ahead == nil){
@@ -558,8 +560,19 @@ conAlloc(int fd, char* name)
 		con->name = vtStrDup(name);
 	else
 		con->name = vtStrDup("unknown");
-	con->aok = 0;
-	con->noauth = con->noperm = con->wstatallow = 0;
+	con->remote[0] = 0;
+	snprint(buf, sizeof buf, "%s/remote", con->name);
+	if((rfd = open(buf, OREAD)) >= 0){
+		n = read(rfd, buf, sizeof buf-1);
+		close(rfd);
+		if(n > 0){
+			buf[n] = 0;
+			if((p = strchr(buf, '\n')) != nil)
+				*p = 0;
+			strecpy(con->remote, con->remote+sizeof con->remote, buf);
+		}
+	}
+	con->flags = flags;
 	con->isconsole = 0;
 	vtUnlock(cbox.alock);
 
@@ -692,7 +705,7 @@ static int
 cmdWho(int argc, char* argv[])
 {
 	char *usage = "usage: who";
-	int i;
+	int i, l1, l2, l;
 	Con *con;
 	Fid *fid, *last;
 
@@ -705,8 +718,16 @@ cmdWho(int argc, char* argv[])
 		return cliError(usage);
 
 	vtRLock(cbox.clock);
+	l1 = 0;
+	l2 = 0;
+	for(con=cbox.chead; con; con=con->cnext){
+		if((l = strlen(con->name)) > l1)
+			l1 = l;
+		if((l = strlen(con->remote)) > l2)
+			l2 = l;
+	}
 	for(con=cbox.chead; con; con=con->cnext){
-		consPrint("\t%q:", con->name);
+		consPrint("\t%-*s %-*s", l1, con->name, l2, con->remote);
 		vtLock(con->fidlock);
 		last = nil;
 		for(i=0; i<NFidHash; i++)

+ 16 - 12
sys/src/cmd/fossil/9srv.c

@@ -131,23 +131,31 @@ cmdSrv(int argc, char* argv[])
 	Con *con;
 	Srv *srv;
 	char *usage = "usage: srv [-APWdp] [service]";
-	int Aflag, Pflag, Wflag, dflag, fd[2], mode, pflag, r;
+	int conflags, dflag, fd[2], mode, pflag, r;
 
-	Aflag = Pflag = Wflag = dflag = pflag = 0;
+	dflag = 0;
+	pflag = 0;
+	conflags = 0;
 	mode = 0666;
 
 	ARGBEGIN{
 	default:
 		return cliError(usage);
 	case 'A':
-		Aflag = 1;
+		conflags |= ConNoAuthCheck;
+		break;
+	case 'I':
+		conflags |= ConIPCheck;
+		break;
+	case 'N':
+		conflags |= ConNoneAllow;
 		break;
 	case 'P':
-		Pflag = 1;
+		conflags |= ConNoPermCheck;
 		mode = 0600;
 		break;
 	case 'W':
-		Wflag = 1;
+		conflags |= ConWstatAllow;
 		mode = 0600;
 		break;
 	case 'd':
@@ -159,7 +167,7 @@ cmdSrv(int argc, char* argv[])
 		break;
 	}ARGEND
 
-	if(pflag && Pflag){
+	if(pflag && (conflags&ConNoPermCheck)){
 		vtSetError("srv: cannot use -P with -p");
 		return 0;
 	}
@@ -207,15 +215,11 @@ cmdSrv(int argc, char* argv[])
 	if(pflag)
 		r = consOpen(fd[1], srv->srvfd, -1);
 	else{
-		con = conAlloc(fd[1], srv->mntpnt);
+		con = conAlloc(fd[1], srv->mntpnt, conflags);
 		if(con == nil)
 			r = 0;
-		else{
+		else
 			r = 1;
-			con->noauth = Aflag;
-			con->noperm = Pflag;
-			con->wstatallow = Wflag;
-		}
 	}
 	if(r == 0){
 		close(fd[1]);

+ 1 - 1
sys/src/cmd/fossil/Ccmd.c

@@ -446,7 +446,7 @@ cmdInit(void)
 
 	if(pipe(cbox.confd) < 0)
 		return 0;
-	if((cbox.con = conAlloc(cbox.confd[1], "console")) == nil){
+	if((cbox.con = conAlloc(cbox.confd[1], "console", 0)) == nil){
 		close(cbox.confd[0]);
 		close(cbox.confd[1]);
 		cbox.confd[0] = cbox.confd[1] = -1;

+ 1 - 1
sys/src/cmd/htmlroff/util.c

@@ -78,7 +78,7 @@ warn(char *fmt, ...)
 {
 	va_list arg;
 	
-	fprint(2, "%L: ");
+	fprint(2, "htmlroff: %L: ");
 	va_start(arg, fmt);
 	vfprint(2, fmt, arg);
 	va_end(arg);

+ 2 - 14
sys/src/cmd/ip/snoopy/dhcp.c

@@ -103,18 +103,6 @@ enum
 	OP9auth=		129,	// plan9 auth servers
 };
 
-static void
-p_compile(Filter *f)
-{
-	sysfatal("unknown bootp field: %s", f->s);
-}
-
-static int
-p_filter(Filter *, Msg *)
-{
-	return 0;
-}
-
 /*
  *  convert a byte array to hex
  */
@@ -471,8 +459,8 @@ out:
 Proto dhcp =
 {
 	"dhcp",
-	p_compile,
-	p_filter,
+	nil,
+	nil,
 	p_seprint,
 	nil,
 	nil,

+ 1 - 7
sys/src/cmd/ip/snoopy/dump.c

@@ -10,12 +10,6 @@ p_compile(Filter *)
 {
 }
 
-static int
-p_filter(Filter *, Msg *)
-{
-	return 0;
-}
-
 static char tohex[16] = {
 	'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
 	'a', 'b', 'c', 'd', 'e', 'f'
@@ -81,7 +75,7 @@ Proto dump =
 {
 	"dump",
 	p_compile,
-	p_filter,
+	nil,
 	p_seprint,
 	nil,
 	nil,

+ 21 - 11
sys/src/cmd/ip/snoopy/filter.y

@@ -12,6 +12,7 @@ char	*yyend;		/* end of buffer to be parsed */
 %term LOR
 %term LAND
 %term WORD
+%term NE
 %right '!'
 %left '|'
 %left '&'
@@ -27,6 +28,14 @@ expr		: WORD
 			{ $$ = $1; }
 		| WORD '=' WORD
 			{ $2->l = $1; $2->r = $3; $$ = $2; }
+		| WORD NE WORD
+			{ $2->l = newfilter();
+			  $2->l->op = '=';
+			  $2->l->l = $1;
+			  $2->l->r = $3;
+			  $2->op = '!';
+			  $$ = $2;
+			}
 		| WORD '(' expr ')'
 			{ $1->l = $3; free($2); free($4); $$ = $1; }
 		| '(' expr ')'
@@ -84,17 +93,18 @@ yylex(void)
 	}
 
 	yylp++;
-	if(*yylp == c)
-		switch(c){
-		case '&':
-			c = LAND;
-			yylp++;
-			break;
-		case '|':
-			c = LOR;
-			yylp++;
-			break;
-		}
+	if(c == '!' && *yylp == '='){
+		c = NE;
+		yylp++;
+	}
+	else if(c == '&' && *yylp == '&'){
+		c = LAND;
+		yylp++;
+	}
+	else if(c == '|' && *yylp == '|'){
+		c = LOR;
+		yylp++;
+	}
 	yylval->op = c;
 	return c;
 }

+ 1 - 2
sys/src/cmd/ip/snoopy/il.c

@@ -102,8 +102,7 @@ char *pktnames[] =
 static char*
 pkttype(int t)
 {
-	char b[10];
-
+	static char b[10];
 	
 	if(t > 6){
 		sprint(b, "%d", t);

+ 8 - 2
sys/src/cmd/ip/snoopy/main.c

@@ -233,7 +233,7 @@ _filterpkt(Filter *f, Msg *m)
 				return 0;
 			m->needroot = 0;
 		}else{
-			if(m->pr != nil && !(m->pr->filter)(f, m))
+			if(m->pr && (m->pr->filter==nil || !(m->pr->filter)(f, m)))
 				return 0;
 		}
 		if(f->l == nil)
@@ -650,14 +650,20 @@ _compile(Filter *f, Proto *last)
 		_compile(f->r, last);
 		break;
 	case WORD:
-		if(last != nil)
+		if(last != nil){
+			if(last->compile == nil)
+				sysfatal("unknown %s subprotocol: %s", f->pr->name, f->s);
 			(*last->compile)(f);
+		}
 		if(f->l)
 			_compile(f->l, f->pr);
 		break;
 	case '=':
 		if(last == nil)
 			sysfatal("internal error: compilewalk: badly formed tree");
+		
+		if(last->compile == nil)
+			sysfatal("unknown %s field: %s", f->pr->name, f->s);
 		(*last->compile)(f);
 		break;
 	default:

+ 2 - 0
sys/src/cmd/ip/snoopy/mkfile

@@ -53,6 +53,8 @@ UPDATE=\
 	main.c\
 	${POBJS:%.$O=%.c}\
 
+CLEANFILES=protos.c protos.h
+
 </sys/src/cmd/mkone
 
 protos.h: mkfile

+ 2 - 14
sys/src/cmd/ip/snoopy/ninep.c

@@ -5,18 +5,6 @@
 #include "dat.h"
 #include "protos.h"
 
-static void
-p_compile(Filter *f)
-{
-	sysfatal("unknown ninep field: %s", f->s);
-}
-
-static int
-p_filter(Filter *, Msg *)
-{
-	return 0;
-}
-
 static int
 p_seprint(Msg *m)
 {
@@ -44,8 +32,8 @@ p_seprint(Msg *m)
 Proto ninep =
 {
 	"ninep",
-	p_compile,
-	p_filter,
+	nil,
+	nil,
 	p_seprint,
 	nil,
 	nil,

+ 4 - 16
sys/src/cmd/ip/snoopy/ospf.c

@@ -90,7 +90,7 @@ struct Ospfhello
 };
 
 char*
-seprintospfhello(char *p, char *e, void *a, int)
+seprintospfhello(char *p, char *e, void *a)
 {
 	Ospfhello *h = a;
 
@@ -327,18 +327,6 @@ seprintospflsack(char *p, char *e, void *a, int len)
 	return seprint(p, e, ")");
 }
 
-static void
-p_compile(Filter *f)
-{
-	sysfatal("unknown ospf field: %s", f->s);
-}
-
-static int
-p_filter(Filter *, Msg *)
-{
-	return 0;
-}
-
 int
 p_seprint(Msg *m)
 {
@@ -366,7 +354,7 @@ p_seprint(Msg *m)
 
 	switch (ospf->type) {
 	case OSPFhello:
-		p = seprintospfhello(p, e, ospf->data, x);
+		p = seprintospfhello(p, e, ospf->data);
 		break;
 	case OSPFdd:
 		p = seprintospfdatadesc(p, e, ospf->data, x);
@@ -392,8 +380,8 @@ Default:
 Proto ospf =
 {
 	"ospf",
-	p_compile,
-	p_filter,
+	nil,
+	nil,
 	p_seprint,
 	nil,
 	nil,

+ 2 - 15
sys/src/cmd/ip/snoopy/rtcp.c

@@ -31,19 +31,6 @@ enum{
 	REPORTLEN = 24,
 };
 
-
-static void
-p_compile(Filter *f)
-{
-	sysfatal("unknown rtcp field: %s", f->s);
-}
-
-static int
-p_filter(Filter *, Msg *)
-{
-	return 0;
-}
-
 static int
 p_seprint(Msg *m)
 {
@@ -86,8 +73,8 @@ p_seprint(Msg *m)
 
 Proto rtcp = {
 	"rtcp",
-	p_compile,
-	p_filter,
+	nil,
+	nil,
 	p_seprint,
 	nil,
 	nil,

+ 2 - 15
sys/src/cmd/ip/snoopy/rtp.c

@@ -17,19 +17,6 @@ enum{
 	RTPLEN = 12,		// Minimum size of an RTP header
 };
 
-
-static void
-p_compile(Filter *f)
-{
-	sysfatal("unknown rtp field: %s", f->s);
-}
-
-static int
-p_filter(Filter *, Msg *)
-{
-	return 0;
-}
-
 static int
 p_seprint(Msg *m)
 {
@@ -65,8 +52,8 @@ p_seprint(Msg *m)
 
 Proto rtp = {
 	"rtp",
-	p_compile,
-	p_filter,
+	nil,
+	nil,
 	p_seprint,
 	nil,
 	nil,

+ 194 - 39
sys/src/cmd/replica/applylog.c

@@ -22,7 +22,6 @@ char **conf;
 int verbose;
 char **match;
 int nmatch;
-int resolve;
 int tempspool = 1;
 int safeinstall = 1;
 char *lroot;
@@ -41,6 +40,40 @@ int timefd;
 
 Db *copyerr;
 
+typedef struct Res Res;
+struct Res
+{
+	char c;
+	char *name;
+};
+
+Res *res;
+int nres;
+
+void 
+addresolve(int c, char *name)
+{
+	if(name[0] == '/')
+		name++;
+	res = erealloc(res, (nres+1)*sizeof res[0]);
+	res[nres].c = c;
+	res[nres].name = name;
+	nres++;
+}
+
+int
+resolve(char *name)
+{
+	int i, len;
+
+	for(i=0; i<nres; i++){
+		len = strlen(res[i].name);
+		if(strncmp(name, res[i].name, len) == 0 && (name[len]=='/' || name[len] == 0))
+			return res[i].c;
+	}
+	return '?';
+}
+
 void
 readtimefile(void)
 {
@@ -134,7 +167,9 @@ void
 main(int argc, char **argv)
 { 
 	char *f[10], *local, *name, *remote, *s, *t, verb;
-	int fd, havedb, havelocal, k, n, nf, skip;
+	int fd, havedb, havelocal, i, k, n, nf, resolve1, skip;
+	int checkedmatch1, checkedmatch2, 
+		checkedmatch3, checkedmatch4;
 	ulong now;
 	Biobuf bin;
 	Dir dbd, ld, nd, rd;
@@ -146,7 +181,8 @@ main(int argc, char **argv)
 	ARGBEGIN{
 	case 's':
 	case 'c':
-		resolve = ARGC();
+		i = ARGC();
+		addresolve(i, EARGF(usage()));
 		break;
 	case 'n':
 		donothing = 1;
@@ -165,7 +201,7 @@ main(int argc, char **argv)
 		douid = 1;
 		break;
 	case 'v':
-		verbose = 1;
+		verbose++;
 		break;
 	default:
 		usage();
@@ -183,12 +219,16 @@ main(int argc, char **argv)
 	rroot = argv[2];
 	if(!isdir(rroot))
 		sysfatal("bad remote root directory");
-	
-	if((clientdb = opendb(argv[0])) == nil)
-		sysfatal("opendb %q: %r", argv[2]);
+
 	match = argv+3;
 	nmatch = argc-3;
+	for(i=0; i<nmatch; i++)
+		if(match[i][0] == '/')
+			match[i]++;
 
+	if((clientdb = opendb(argv[0])) == nil)
+		sysfatal("opendb %q: %r", argv[2]);
+	
 	copyerr = opendb(nil);
 
 	skip = 0;
@@ -209,10 +249,6 @@ main(int argc, char **argv)
 		name = f[3];
 		if(now < maxnow || (now==maxnow && n <= maxn))
 			continue;
-		if(!ismatch(name)){
-			skip = 1;
-			continue;
-		}
 		local = mkname(localbuf, sizeof localbuf, lroot, name);
 		if(strcmp(f[4], "-") == 0)
 			f[4] = f[3];
@@ -226,15 +262,41 @@ main(int argc, char **argv)
 		havedb = finddb(clientdb, name, &dbd)>=0;
 		havelocal = localdirstat(local, &ld)>=0;
 
+		resolve1 = resolve(name);
+
+		/*
+		 * if(!ismatch(name)){
+		 *	skip = 1;
+		 *	continue;
+		 * }
+		 * 
+		 * This check used to be right here, but we want
+		 * the time to be able to move forward past entries
+		 * that don't match and have already been applied.
+		 * So now every path below must checked !ismatch(name)
+		 * before making any changes to the local file
+		 * system.  The fake variable checkedmatch
+		 * tracks whether !ismatch(name) has been checked.
+		 * If the compiler doesn't produce any used/set
+		 * warnings, then all the paths should be okay.
+		 * Even so, we have the asserts to fall back on.
+		 */
 		switch(verb){
 		case 'd':	/* delete file */
 			delce(local);
 			if(!havelocal)	/* doesn't exist; who cares? */
 				break;
+			if(!ismatch(name)){
+				if(!skip)
+					fprint(2, "stopped updating log apply time because of %s\n", name);
+				skip = 1;
+				continue;
+			}
+			SET(checkedmatch1);
 			if(!havedb){
-				if(resolve == 's')
+				if(resolve1 == 's')
 					goto DoRemove;
-				else if(resolve == 'c')
+				else if(resolve1 == 'c')
 					goto DoRemoveDb;
 				conflict(name, "locally created; will not remove");
 				skip = 1;
@@ -244,15 +306,17 @@ main(int argc, char **argv)
 			if(dbd.mtime > rd.mtime)		/* we have a newer file than what was deleted */
 				break;
 			if(!(dbd.mode&DMDIR) && (dbd.mtime != ld.mtime || dbd.length != ld.length)){	/* locally modified since we downloaded it */
-				if(resolve == 's')
+				if(resolve1 == 's')
 					goto DoRemove;
-				else if(resolve == 'c')
+				else if(resolve1 == 'c')
 					break;
 				conflict(name, "locally modified; will not remove");
 				skip = 1;
 				continue;
 			}
 		    DoRemove:
+			USED(checkedmatch1);
+			assert(ismatch(name));
 			chat("d %q\n", name);
 			if(donothing)
 				break;
@@ -262,18 +326,27 @@ main(int argc, char **argv)
 				continue;
 			}
 		    DoRemoveDb:
+			USED(checkedmatch1);
+			assert(ismatch(name));
 			removedb(clientdb, name);
 			break;
 
 		case 'a':	/* add file */
 			if(!havedb){
+				if(!ismatch(name)){
+					if(!skip)
+						fprint(2, "stopped updating log apply time because of %s\n", name);
+					skip = 1;
+					continue;
+				}
+				SET(checkedmatch2);
 				if(!havelocal)
 					goto DoCreate;
 				if((ld.mode&DMDIR) && (rd.mode&DMDIR))
 					break;
-				if(resolve == 's')
+				if(resolve1 == 's')
 					goto DoCreate;
-				else if(resolve == 'c')
+				else if(resolve1 == 'c')
 					goto DoCreateDb;
 				conflict(name, "locally created; will not overwrite");
 				skip = 1;
@@ -285,17 +358,33 @@ main(int argc, char **argv)
 			if(havelocal){
 				if((ld.mode&DMDIR) && (rd.mode&DMDIR))
 					break;
+				if(!ismatch(name)){
+					if(!skip)
+						fprint(2, "stopped updating log apply time because of %s\n", name);
+					skip = 1;
+					continue;
+				}
+				SET(checkedmatch2);
 				if(dbd.mtime==ld.mtime && dbd.length==ld.length)
 					goto DoCreate;
-				if(resolve=='s')
+				if(resolve1=='s')
 					goto DoCreate;
-				else if(resolve == 'c')
+				else if(resolve1 == 'c')
 					break;
 				conflict(name, "locally modified; will not overwrite");
 				skip = 1;
 				continue;
 			}
+			if(!ismatch(name)){
+				if(!skip)
+					fprint(2, "stopped updating log apply time because of %s\n", name);
+				skip = 1;
+				continue;
+			}
+			SET(checkedmatch2);
 		    DoCreate:
+			USED(checkedmatch2);
+			assert(ismatch(name));
 			if(notexists(remote)){
 				addce(local);
 				/* no skip=1 */
@@ -335,6 +424,8 @@ main(int argc, char **argv)
 				}
 			}
 		    DoCreateDb:
+			USED(checkedmatch2);
+			assert(ismatch(name));
 			insertdb(clientdb, name, &rd);
 			break;
 			
@@ -345,9 +436,16 @@ main(int argc, char **argv)
 					/* no skip=1 */
 					break;
 				}
-				if(resolve == 's')
+				if(!ismatch(name)){
+					if(!skip)
+						fprint(2, "stopped updating log apply time because of %s\n", name);
+					skip = 1;
+					continue;
+				}
+				SET(checkedmatch3);
+				if(resolve1 == 's')
 					goto DoCopy;
-				else if(resolve=='c')
+				else if(resolve1=='c')
 					goto DoCopyDb;
 				if(havelocal)
 					conflict(name, "locally created; will not update");
@@ -358,15 +456,22 @@ main(int argc, char **argv)
 			}
 			if(dbd.mtime >= rd.mtime)		/* already have/had this version; ignore */
 				break;
+			if(!ismatch(name)){
+				if(!skip)
+					fprint(2, "stopped updating log apply time because of %s\n", name);
+				skip = 1;
+				continue;
+			}
+			SET(checkedmatch3);
 			if(!havelocal){
 				if(notexists(remote)){
 					addce(local);
 					/* no skip=1 */
 					break;
 				}
-				if(resolve == 's')
+				if(resolve1 == 's')
 					goto DoCopy;
-				else if(resolve == 'c')
+				else if(resolve1 == 'c')
 					break;
 				conflict(name, "locally removed; will not update");
 				skip = 1;
@@ -379,15 +484,17 @@ main(int argc, char **argv)
 					/* no skip=1 */
 					break;
 				}
-				if(resolve == 's')
+				if(resolve1 == 's')
 					goto DoCopy;
-				else if(resolve == 'c')
+				else if(resolve1 == 'c')
 					break;
 				conflict(name, "locally modified; will not update");
 				skip = 1;
 				continue;
 			}
 		    DoCopy:
+			USED(checkedmatch3);
+			assert(ismatch(name));
 			if(notexists(remote)){
 				addce(local);
 				/* no skip=1 */
@@ -403,6 +510,8 @@ main(int argc, char **argv)
 				continue;
 			}
 		    DoCopyDb:
+			USED(checkedmatch3);
+			assert(ismatch(name));
 			if(!havedb){
 				if(havelocal)
 					dbd = ld;
@@ -421,9 +530,19 @@ main(int argc, char **argv)
 					/* no skip=1 */
 					break;
 				}
-				if(resolve == 's')
+				if(!ismatch(name)){
+					if(!skip)
+						fprint(2, "stopped updating log apply time because of %s\n", name);
+					skip = 1;
+					continue;
+				}
+				SET(checkedmatch4);
+				if(resolve1 == 's'){
+					USED(checkedmatch4);
+					SET(checkedmatch2);
 					goto DoCreate;
-				else if(resolve == 'c')
+				}
+				else if(resolve1 == 'c')
 					goto DoMetaDb;
 				if(havelocal)
 					conflict(name, "locally created; will not update metadata");
@@ -436,17 +555,27 @@ main(int argc, char **argv)
 				break;
 			if((dbd.mode&DMDIR) && dbd.mtime > now)
 				break;
-			if(havelocal && (!douid || strcmp(ld.uid, rd.uid)==0) && strcmp(ld.gid, rd.gid)==0 && ld.mode==rd.mode)	/* nothing to do */
-				goto DoMetaDb;
+			if(havelocal && (!douid || strcmp(ld.uid, rd.uid)==0) && strcmp(ld.gid, rd.gid)==0 && ld.mode==rd.mode)
+				break;
 			if(!havelocal){
 				if(notexists(remote)){
 					addce(local);
 					/* no skip=1 */
 					break;
 				}
-				if(resolve == 's')
+				if(!ismatch(name)){
+					if(!skip)
+						fprint(2, "stopped updating log apply time because of %s\n", name);
+					skip = 1;
+					continue;
+				}
+				SET(checkedmatch4);
+				if(resolve1 == 's'){
+					USED(checkedmatch4);
+					SET(checkedmatch2);
 					goto DoCreate;
-				else if(resolve == 'c')
+				}
+				else if(resolve1 == 'c')
 					break;
 				conflict(name, "locally removed; will not update metadata");
 				skip = 1;
@@ -458,11 +587,21 @@ main(int argc, char **argv)
 					/* no skip=1 */
 					break;
 				}
-				if(resolve == 's')
+				if(!ismatch(name)){
+					if(!skip)
+						fprint(2, "stopped updating log apply time because of %s\n", name);
+					skip = 1;
+					continue;
+				}
+				SET(checkedmatch4);
+				if(resolve1 == 's')
 					goto DoMeta;
-				else if(resolve == 'c')
+				else if(resolve1 == 'c')
 					break;
-				conflict(name, "contents locally modified; will not update metadata to %s %s %luo",
+				conflict(name, "contents locally modified (%s); will not update metadata to %s %s %luo",
+					dbd.mtime != ld.mtime ? "mtime" :
+					dbd.length != ld.length ? "length" : 
+					"unknown",
 					rd.uid, rd.gid, rd.mode);
 				skip = 1;
 				continue;
@@ -473,15 +612,31 @@ main(int argc, char **argv)
 					/* no skip=1 */
 					break;
 				}
-				if(resolve == 's')
+				if(!ismatch(name)){
+					if(!skip)
+						fprint(2, "stopped updating log apply time because of %s\n", name);
+					skip = 1;
+					continue;
+				}
+				SET(checkedmatch4);
+				if(resolve1 == 's')
 					goto DoMeta;
-				else if(resolve == 'c')
+				else if(resolve1 == 'c')
 					break;
 				conflict(name, "metadata locally changed; will not update metadata to %s %s %luo", rd.uid, rd.gid, rd.mode);
 				skip = 1;
 				continue;
 			}
+			if(!ismatch(name)){
+				if(!skip)
+					fprint(2, "stopped updating log apply time because of %s\n", name);
+				skip = 1;
+				continue;
+			}
+			SET(checkedmatch4);
 		    DoMeta:
+			USED(checkedmatch4);
+			assert(ismatch(name));
 			if(notexists(remote)){
 				addce(local);
 				/* no skip=1 */
@@ -501,6 +656,8 @@ main(int argc, char **argv)
 				continue;
 			}
 		    DoMetaDb:
+			USED(checkedmatch4);
+			assert(ismatch(name));
 			if(!havedb){
 				if(havelocal)
 					dbd = ld;
@@ -604,10 +761,8 @@ ismatch(char *s)
 	if(nmatch == 0)
 		return 1;
 	for(i=0; i<nmatch; i++){
-		if(strcmp(s, match[i]) == 0)
-			return 1;
 		len = strlen(match[i]);
-		if(strncmp(s, match[i], len) == 0 && s[len]=='/')
+		if(strncmp(s, match[i], len) == 0 && (s[len]=='/' || s[len] == 0))
 			return 1;
 	}
 	return 0;

+ 10 - 4
sys/src/cmd/tbl/tc.c

@@ -22,12 +22,18 @@ choochar(void)
 				continue;
 			s = table[ilin][icol].col;
 			if (point(s))
-				while (*s)
-					had[*s++] = 1;
+ 				while (*s) {
+ 					if((unsigned char)*s < 128)
+ 						had[(unsigned char)*s] = 1;
+ 					s++;
+ 				}
 			s = table[ilin][icol].rcol;
 			if (point(s))
-				while (*s)
-					had[*s++] = 1;
+ 				while (*s) {
+ 					if((unsigned char)*s < 128)
+ 						had[(unsigned char)*s] = 1;
+ 					s++;
+ 				}
 		}
 	}
 				/* choose first funny character */

+ 9 - 0
sys/src/cmd/unix/drawterm/README

@@ -19,12 +19,19 @@ BINARIES
 ---------
 See http://swtch.com/drawterm/
 
+
 SOURCE
 ------
 Use CVS: cvs -d :pserver:anoncvs@cvs.pdos.csail.mit.edu:/cvs co drawterm
 On the web at http://cvs.pdos.csail.mit.edu/cvs/drawterm
 In the Plan 9 distribution: /sys/src/cmd/unix/drawterm
 
+
+HELP
+----
+Email Russ Cox <rsc@swtch.com> with bug reports or problems.
+
+
 TO DO:
 ------
 
@@ -35,3 +42,5 @@ TO DO:
 
 - Should implement /dev/label.
 
+
+

+ 13 - 13
sys/src/cmd/venti/config.c

@@ -113,44 +113,44 @@ runConfig(char *file, Config *config)
 			config->naparts++;
 		}else if(i == 2 && strcmp(flds[0], "index") == 0){
 			if(!nameOk(flds[1])){
-				setErr(EAdmin, "illegal index name %s in config file %s", flds[1], config);
+				setErr(EAdmin, "illegal index name %s in config file %s", flds[1], file);
 				break;
 			}
 			if(config->index != nil){
-				setErr(EAdmin, "duplicate indices in config file %s", config);
+				setErr(EAdmin, "duplicate indices in config file %s", file);
 				break;
 			}
 			config->index = estrdup(flds[1]);
 		}else if(i == 2 && strcmp(flds[0], "bcmem") == 0){
 			if(!numOk(flds[1])){
 				setErr(EAdmin, "illegal size %s in config file %s",
-					flds[1], config);
+					flds[1], file);
 				break;
 			}
 			if(config->bcmem != 0){
-				setErr(EAdmin, "duplicate bcmem lines in config file %s", config);
+				setErr(EAdmin, "duplicate bcmem lines in config file %s", file);
 				break;
 			}
 			config->bcmem = unittoull(flds[1]);
 		}else if(i == 2 && strcmp(flds[0], "mem") == 0){
 			if(!numOk(flds[1])){
 				setErr(EAdmin, "illegal size %s in config file %s",
-					flds[1], config);
+					flds[1], file);
 				break;
 			}
 			if(config->mem != 0xFFFFFFFFUL){
-				setErr(EAdmin, "duplicate mem lines in config file %s", config);
+				setErr(EAdmin, "duplicate mem lines in config file %s", file);
 				break;
 			}
 			config->mem = unittoull(flds[1]);
 		}else if(i == 2 && strcmp(flds[0], "icmem") == 0){
 			if(!numOk(flds[1])){
 				setErr(EAdmin, "illegal size %s in config file %s",
-					flds[1], config);
+					flds[1], file);
 				break;
 			}
 			if(config->icmem != 0){
-				setErr(EAdmin, "duplicate icmem lines in config file %s", config);
+				setErr(EAdmin, "duplicate icmem lines in config file %s", file);
 				break;
 			}
 			config->icmem = unittoull(flds[1]);
@@ -158,26 +158,26 @@ runConfig(char *file, Config *config)
 			config->queueWrites = 1;
 		}else if(i == 2 && strcmp(flds[0], "httpaddr") == 0){
 			if(!nameOk(flds[1])){
-				setErr(EAdmin, "illegal http address '%s' in configuration file %s", flds[1], config);
+				setErr(EAdmin, "illegal http address '%s' in configuration file %s", flds[1], file);
 				break;
 			}
 			if(config->haddr){
-				setErr(EAdmin, "duplicate httpaddr lines in configuration file %s", config);
+				setErr(EAdmin, "duplicate httpaddr lines in configuration file %s", file);
 				break;
 			}
 			config->haddr = estrdup(flds[1]);
 		}else if(i == 2 && strcmp(flds[0], "addr") == 0){
 			if(!nameOk(flds[1])){
-				setErr(EAdmin, "illegal venti address '%s' in configuration file %s", flds[1], config);
+				setErr(EAdmin, "illegal venti address '%s' in configuration file %s", flds[1], file);
 				break;
 			}
 			if(config->vaddr){
-				setErr(EAdmin, "duplicate addr lines in configuration file %s", config);
+				setErr(EAdmin, "duplicate addr lines in configuration file %s", file);
 				break;
 			}
 			config->vaddr = estrdup(flds[1]);
 		}else{
-			setErr(EAdmin, "illegal line '%s' in configuration file %s", line, config);
+			setErr(EAdmin, "illegal line '%s' in configuration file %s", line, file);
 			break;
 		}
 		free(line);

+ 1 - 1
sys/src/cmd/venti/fmtindex.c

@@ -43,7 +43,7 @@ main(int argc, char *argv[])
 	file = argv[0];
 
 	if(!runConfig(file, &conf))
-		fatal("can't intialization config %s: %R", file);
+		fatal("can't run config %s: %R", file);
 	if(conf.index == nil)
 		fatal("no index specified in %s", file);
 	if(!nameOk(conf.index))

+ 69 - 8
sys/src/games/music/jukebox/music.c

@@ -35,7 +35,9 @@ enum {
 	WinPlay,
 	WinPlaylist,
 	WinError,
-	Topselect = 0x7fffffff
+	Topselect = 0x7fffffff,
+
+	Browsedepth = 63,
 };
 
 typedef enum {
@@ -74,6 +76,7 @@ enum {
 	Volume,
 	Browsetopwin,
 	Browsebotwin,
+	Browsebotscr,
 	Playevent,
 	Playlistwin,
 	Nalt,
@@ -138,11 +141,20 @@ char *helptext[] = {
 	nil,
 };
 
+struct Browsestack {
+	char	*onum;
+	int	scrollpos;
+} browsestack[Browsedepth];
+int browsesp;	/* browse stack pointer */
+int browseline;	/* current browse position */
+
 Control		*vol;
 Control		*browsetopwin;
 Control		*browsebotwin;
 Control		*playlistwin;
 Control		*errortext;
+Control		*browsetopscr;
+Control		*browsebotscr;
 
 Playstate	playstate;
 
@@ -393,7 +405,6 @@ void
 makebrowsecontrols(void)
 {
 	int w;
-	Control *browsetopscr, *browsebotscr;
 
 	w = stringwidth(romanfont, "Roll over Beethoven");
 	browsetopscr = createslider(cs, "browsetopscr");
@@ -414,8 +425,8 @@ makebrowsecontrols(void)
 
 	chanprint(cs->ctl, "browsetopscr format '%%s: browsetopwin topline %%d'");
 	controlwire(browsetopscr, "event", cs->ctl);
-	chanprint(cs->ctl, "browsebotscr format '%%s: browsebotwin topline %%d'");
-	controlwire(browsebotscr, "event", cs->ctl);
+//	chanprint(cs->ctl, "browsebotscr format '%%s: browsebotwin topline %%d'");
+//	controlwire(browsebotscr, "event", cs->ctl);
 
 	tabs[WinBrowse].win = createcolumn(cs, tabs[WinBrowse].winname);
 	chanprint(cs->ctl, "%q add browsetop browsebot", tabs[WinBrowse].win->name);
@@ -674,6 +685,7 @@ updateplaylist(int trunc)
 	if(trunc){
 		playlistselect(-1);
 		chanprint(cs->ctl, "playlistwin clear");
+		chanprint(cs->ctl, "playlistwin topline 0");
 		chanprint(cs->ctl, "playlistscr max 0");
 		chanprint(cs->ctl, "playlistscr value 0");
 		deactivatebuttons(1<<Playbutton | 1<<Deletebutton);
@@ -703,7 +715,7 @@ updateplaylist(int trunc)
 }
 
 void
-browseto(char *onum)
+browseto(char *onum, int line)
 {
 	onum = strdup(onum);
 	setparent(onum);
@@ -711,10 +723,54 @@ browseto(char *onum)
 	fillbrowsetop(onum);
 	chanprint(cs->ctl, "browsetop show");
 	fillbrowsebot(onum);
+	if(line){
+		chanprint(cs->ctl, "browsebotscr value %d", line);
+		chanprint(cs->ctl, "browsebotwin topline %d", line);
+	}
 	chanprint(cs->ctl, "browsebot show");
 	free(onum);
 }
 
+void
+browsedown(char *onum)
+{
+	if(browsesp == 0){
+		/* Make room for an entry by deleting the last */
+		free(browsestack[Browsedepth-1].onum);
+		memmove(browsestack + 1, browsestack, (Browsedepth-1) * sizeof(browsestack[0]));
+		browsesp++;
+	}
+	/* Store current position in current stack frame */
+	assert(browsesp > 0 && browsesp < Browsedepth);
+	browsestack[browsesp].onum = strdup(parent.address);
+	browsestack[browsesp].scrollpos = browseline;
+	browsesp--;
+	browseline = 0;
+	if(browsestack[browsesp].onum && strcmp(browsestack[browsesp].onum, onum) == 0)
+		browseline = browsestack[browsesp].scrollpos;
+	browseto(onum, browseline);
+}
+
+void
+browseup(char *onum)
+{
+	if(browsesp == Browsedepth){
+		/* Make room for an entry by deleting the first */
+		free(browsestack[0].onum);
+		memmove(browsestack, browsestack + 1, browsesp * sizeof(browsestack[0]));
+		browsesp--;
+	}
+	/* Store current position in current stack frame */
+	assert(browsesp >= 0 && browsesp < Browsedepth);
+	browsestack[browsesp].onum = strdup(parent.address);
+	browsestack[browsesp].scrollpos = browseline;
+	browsesp++;
+	browseline = 0;
+	if(browsestack[browsesp].onum && strcmp(browsestack[browsesp].onum, onum) == 0)
+		browseline = browsestack[browsesp].scrollpos;
+	browseto(onum, browseline);
+}
+
 void
 addplaytext(char *s)
 {
@@ -740,6 +796,7 @@ work(void)
 	[Volume] =		{vol->event, &eventstr, CHANRCV},
 	[Browsetopwin] =	{browsetopwin->event, &eventstr, CHANRCV},
 	[Browsebotwin] =	{browsebotwin->event, &eventstr, CHANRCV},
+	[Browsebotscr] =	{browsebotscr->event, &eventstr, CHANRCV},
 	[Playevent] =		{playevent, &eventstr, CHANRCV},
 	[Playlistwin] =		{playlistwin->event, &eventstr, CHANRCV},
 	[Nalt] =		{nil, nil, CHANEND}
@@ -877,7 +934,7 @@ work(void)
 				doplay(parent.address);
 			else if(strcmp(args[3], "4") == 0){
 				s = getparent(parent.address);
-				browseto(s);
+				browsedown(s);
 			}
 			break;
 		case Browsebotwin:
@@ -897,11 +954,15 @@ work(void)
 			if(selected >= nchildren)
 				sysfatal("Select out of range: %d [0⋯%d)", selected, nchildren);
 			if(strcmp(args[3], "1") == 0){
-				browseto(children[selected].address);
+				browseup(children[selected].address);
 			}else if(strcmp(args[3], "2") == 0)
 				doplay(children[selected].address);
 			else if(strcmp(args[3], "4") == 0)
-				browseto(getparent(parent.address));
+				browsedown(getparent(parent.address));
+			break;
+		case Browsebotscr:
+			browseline = atoi(args[2]);
+			chanprint(cs->ctl, "browsebotwin topline %d", browseline);
 			break;
 		case Playevent:
 			if(n < 3 || strcmp(args[0], "playctlproc:"))

+ 1 - 1
sys/src/games/music/playlistfs/boilerplate.c

@@ -65,7 +65,7 @@ bcastmsg(Channel *q, Wmsg *m)
 	 * broadcast and putting themselves back on the
 	 * queue before the broadcast has finished
 	 */
-	marker.eventc = nil;
+	marker.eventc = nil;	/* Only markers have eventc == nil */
 	sendp(q, &marker);
 	while((w = recvp(q)) != &marker){
 		if(w->eventc == nil){

+ 1 - 0
sys/src/libauthsrv/readnvram.c

@@ -40,6 +40,7 @@ static struct {
 	"mips", "#r/nvram", 1024+900, sizeof(Nvrsafe),
 	"power", "#F/flash/flash0", 0x440000, sizeof(Nvrsafe),
 	"power", "#r/nvram", 4352, sizeof(Nvrsafe),	/* OK for MTX-604e */
+	"power", "/nvram", 0, sizeof(Nvrsafe),	/* OK for Ucu */
 	"debug", "/tmp/nvram", 0, sizeof(Nvrsafe),
 };
 

+ 1 - 1
sys/src/libc/power/getcallerpc.s

@@ -1,4 +1,4 @@
-TEXT	getcallerpc(SB), $-4
+TEXT	getcallerpc(SB),1,$-4
 	MOVW	0(R1), R3
 	RETURN
 

+ 1 - 1
sys/src/libmach/2.c

@@ -76,7 +76,7 @@ Mach m68020 =
 	0,		/* value */
 	0x2000,		/* page size */
 	0x80000000ULL,	/* kernel base */
-	0,		/* kernel text mask */
+	0x80000000ULL,	/* kernel text mask */
 	0x7FFFFFFFULL,	/* user stack top */
 	2,		/* quantization of pc */
 	4,		/* szaddr */

+ 1 - 1
sys/src/libmach/5.c

@@ -54,7 +54,7 @@ Mach marm =
 	0,		/* static base register value */
 	0x1000,		/* page size */
 	0xC0000000ULL,	/* kernel base */
-	0,		/* kernel text mask */
+	0xC0000000ULL,	/* kernel text mask */
 	0x7FFFFFFFULL,	/* user stack top */
 	4,		/* quantization of pc */
 	4,		/* szaddr */

+ 1 - 1
sys/src/libmach/6.c

@@ -107,7 +107,7 @@ Mach mamd64=
 	0,			/* static base register value */
 	0x1000,			/* page size */
 	0xFFFFFFFF80110000ULL,	/* kernel base */
-	0,			/* kernel text mask */
+	0xFFFF800000000000ULL,	/* kernel text mask */
 	0x00007FFFFFFFF000ULL,	/* user stack top */
 	1,			/* quantization of pc */
 	8,			/* szaddr */

+ 1 - 1
sys/src/libmach/7.c

@@ -104,7 +104,7 @@ Mach malpha =
 	0,		/* static base register value */
 	0x2000,		/* page size */
 	0x80000000ULL,	/* kernel base */
-	0,		/* kernel text mask */
+	0xF0000000ULL,	/* kernel text mask */
 	0x7FFFFFFFULL,	/* user stack top */
 	4,		/* quantization of pc */
 	4,		/* szaddr */

+ 1 - 1
sys/src/libmach/8.c

@@ -69,7 +69,7 @@ Mach mi386 =
 	0,		/* static base register value */
 	0x1000,		/* page size */
 	0x80100000ULL,	/* kernel base */
-	0,		/* kernel text mask */
+	0xF0000000ULL,	/* kernel text mask */
 	0x7FFFFFFFULL,	/* user stack top */
 	1,		/* quantization of pc */
 	4,		/* szaddr */

+ 86 - 78
sys/src/libmach/executable.c

@@ -34,7 +34,6 @@ static	int	commonllp64(int, Fhdr*, ExecHdr*);
 static	int	adotout(int, Fhdr*, ExecHdr*);
 static	int	elfdotout(int, Fhdr*, ExecHdr*);
 static	int	armdotout(int, Fhdr*, ExecHdr*);
-static	int	alphadotout(int, Fhdr*, ExecHdr*);
 static	void	setsym(Fhdr*, long, long, long, vlong);
 static	void	setdata(Fhdr*, uvlong, long, vlong, long);
 static	void	settext(Fhdr*, uvlong, uvlong, long, vlong);
@@ -49,7 +48,8 @@ typedef struct Exectable{
 	long	magic;			/* big-endian magic number of file */
 	char	*name;			/* executable identifier */
 	char	*dlmname;		/* dynamically loadable module identifier */
-	int	type;			/* Internal code */
+	uchar	type;			/* Internal code */
+	uchar	_magic;			/* _MAGIC() magic */
 	Mach	*mach;			/* Per-machine data */
 	long	hsize;			/* header size */
 	ulong	(*swal)(ulong);		/* beswal or leswal */
@@ -74,6 +74,7 @@ ExecTable exectab[] =
 		"mips plan 9 executable",
 		"mips plan 9 dlm",
 		FMIPS,
+		1,
 		&mmips,
 		sizeof(Exec),
 		beswal,
@@ -82,6 +83,7 @@ ExecTable exectab[] =
 		"mips 4k plan 9 executable BE",
 		"mips 4k plan 9 dlm BE",
 		FMIPS2BE,
+		1,
 		&mmips2be,
 		sizeof(Exec),
 		beswal,
@@ -90,6 +92,7 @@ ExecTable exectab[] =
 		"mips 4k plan 9 executable LE",
 		"mips 4k plan 9 dlm LE",
 		FMIPS2LE,
+		1,
 		&mmips2le,
 		sizeof(Exec),
 		beswal,
@@ -98,6 +101,7 @@ ExecTable exectab[] =
 		"mips plan 9 boot image",
 		nil,
 		FMIPSB,
+		0,
 		&mmips,
 		sizeof(struct mipsexec),
 		beswal,
@@ -106,6 +110,7 @@ ExecTable exectab[] =
 		"mips 4k plan 9 boot image",
 		nil,
 		FMIPSB,
+		0,
 		&mmips2be,
 		sizeof(struct mips4kexec),
 		beswal,
@@ -114,6 +119,7 @@ ExecTable exectab[] =
 		"sparc plan 9 executable",
 		"sparc plan 9 dlm",
 		FSPARC,
+		1,
 		&msparc,
 		sizeof(Exec),
 		beswal,
@@ -122,6 +128,7 @@ ExecTable exectab[] =
 		"sparc plan 9 boot image",
 		nil,
 		FSPARCB,
+		0,
 		&msparc,
 		sizeof(struct sparcexec),
 		beswal,
@@ -130,6 +137,7 @@ ExecTable exectab[] =
 		"sparc64 plan 9 executable",
 		"sparc64 plan 9 dlm",
 		FSPARC64,
+		1,
 		&msparc64,
 		sizeof(Exec),
 		beswal,
@@ -138,6 +146,7 @@ ExecTable exectab[] =
 		"68020 plan 9 executable",
 		"68020 plan 9 dlm",
 		F68020,
+		1,
 		&m68020,
 		sizeof(Exec),
 		beswal,
@@ -146,6 +155,7 @@ ExecTable exectab[] =
 		"next plan 9 boot image",
 		nil,
 		FNEXTB,
+		0,
 		&m68020,
 		sizeof(struct nextexec),
 		beswal,
@@ -154,6 +164,7 @@ ExecTable exectab[] =
 		"386 plan 9 executable",
 		"386 plan 9 dlm",
 		FI386,
+		1,
 		&mi386,
 		sizeof(Exec),
 		beswal,
@@ -162,6 +173,7 @@ ExecTable exectab[] =
 		"amd64 plan 9 executable",
 		"amd64 plan 9 dlm",
 		FAMD64,
+		1,
 		&mamd64,
 		sizeof(Exec)+8,
 		nil,
@@ -170,6 +182,7 @@ ExecTable exectab[] =
 		"power plan 9 executable",
 		"power plan 9 dlm",
 		FPOWER,
+		1,
 		&mpower,
 		sizeof(Exec),
 		beswal,
@@ -178,6 +191,7 @@ ExecTable exectab[] =
 		"elf executable",
 		nil,
 		FNONE,
+		0,
 		&mi386,
 		sizeof(Ehdr),
 		nil,
@@ -186,6 +200,7 @@ ExecTable exectab[] =
 		"arm plan 9 executable",
 		"arm plan 9 dlm",
 		FARM,
+		1,
 		&marm,
 		sizeof(Exec),
 		beswal,
@@ -194,6 +209,7 @@ ExecTable exectab[] =
 		"arm *bsd executable",
 		nil,
 		FARM,
+		0,
 		&marm,
 		sizeof(Exec),
 		leswal,
@@ -202,6 +218,7 @@ ExecTable exectab[] =
 		"alpha plan 9 executable",
 		"alpha plan 9 dlm",
 		FALPHA,
+		1,
 		&malpha,
 		sizeof(Exec),
 		beswal,
@@ -209,11 +226,12 @@ ExecTable exectab[] =
 	{ 0x0700e0c3,			/* alpha boot image */
 		"alpha plan 9 boot image",
 		nil,
-		FALPHAB,
+		FALPHA,
+		0,
 		&malpha,
 		sizeof(Exec),
 		beswal,
-		alphadotout },
+		common },
 	{ 0 },
 };
 
@@ -254,27 +272,49 @@ crackhdr(int fd, Fhdr *fp)
 		return 0;
 
 	ret = 0;
-	fp->magic = magic = beswal(d.e.magic);		/* big-endian */
+	magic = beswal(d.e.magic);		/* big-endian */
 	for (mp = exectab; mp->magic; mp++) {
 		if (nb < mp->hsize)
 			continue;
-		if (mp->magic == (magic & ~DYN_MAGIC)) {
+
+		/*
+		 * The magic number has morphed into something
+		 * with fields (the straw was DYN_MAGIC) so now
+		 * a flag is needed in Fhdr to distinguish _MAGIC()
+		 * magic numbers from foreign magic numbers.
+		 *
+		 * This code is creaking a bit and if it has to
+		 * be modified/extended much more it's probably
+		 * time to step back and redo it all.
+		 */
+		if(mp->_magic){
+			if(mp->magic != (magic & ~DYN_MAGIC))
+				continue;
+
 			if(mp->magic == V_MAGIC)
 				mp = couldbe4k(mp);
 
-			fp->type = mp->type;
 			if ((magic & DYN_MAGIC) && mp->dlmname != nil)
 				fp->name = mp->dlmname;
 			else
 				fp->name = mp->name;
-			fp->hdrsz = mp->hsize;		/* zero on bootables */
-			mach = mp->mach;
-			if(mp->swal != nil)
-				hswal(&d, sizeof(d.e)/sizeof(ulong), mp->swal);
-			ret = mp->hparse(fd, fp, &d);
-			seek(fd, mp->hsize, 0);		/* seek to end of header */
-			break;
 		}
+		else{
+			if(mp->magic != magic)
+				continue;
+			fp->name = mp->name;
+		}
+		fp->type = mp->type;
+		fp->hdrsz = mp->hsize;		/* will be zero on bootables */
+		fp->_magic = mp->_magic;
+		fp->magic = magic;
+
+		mach = mp->mach;
+		if(mp->swal != nil)
+			hswal(&d, sizeof(d.e)/sizeof(ulong), mp->swal);
+		ret = mp->hparse(fd, fp, &d);
+		seek(fd, mp->hsize, 0);		/* seek to end of header */
+		break;
 	}
 	if(mp->magic == 0)
 		werrstr("unknown header type");
@@ -314,10 +354,7 @@ adotout(int fd, Fhdr *fp, ExecHdr *hp)
 static void
 commonboot(Fhdr *fp)
 {
-	uvlong kbase;
-
-	kbase = mach->kbase;
-	if ((fp->entry & kbase) != kbase)
+	if (!(fp->entry & mach->ktmask))
 		return;
 
 	switch(fp->type) {				/* boot image */
@@ -332,14 +369,14 @@ commonboot(Fhdr *fp)
 		fp->dataddr = _round(fp->txtaddr+fp->txtsz, mach->pgsize);
 		break;
 	case FARM:
-		fp->txtaddr = kbase+0x8010;
+		fp->txtaddr = mach->kbase+0x8010;
 		fp->name = "ARM plan 9 boot image";
 		fp->dataddr = fp->txtaddr+fp->txtsz;
 		return;
 	case FALPHA:
 		fp->type = FALPHAB;
 		fp->txtaddr = (u32int)fp->entry;
-		fp->name = "alpha plan 9 boot image?";
+		fp->name = "alpha plan 9 boot image";
 		fp->dataddr = fp->txtaddr+fp->txtsz;
 		break;
 	case FPOWER:
@@ -357,12 +394,11 @@ commonboot(Fhdr *fp)
 	default:
 		return;
 	}
-	fp->hdrsz = 0;					/* header stripped */
+	fp->hdrsz = 0;			/* header stripped */
 }
 
 /*
- *	68020 2.out and 68020 bootable images
- *	386I 8.out and 386I bootable images
+ *	_MAGIC() style headers and
  *	alpha plan9-style bootable images for axp "headerless" boot
  *
  */
@@ -421,24 +457,24 @@ static int
 mipsboot(int fd, Fhdr *fp, ExecHdr *hp)
 {
 	USED(fd);
+	fp->type = FMIPSB;
 	switch(hp->e.amagic) {
 	default:
 	case 0407:	/* some kind of mips */
-		fp->type = FMIPSB;
-		settext(fp, hp->e.mentry, hp->e.text_start, hp->e.tsize,
-					sizeof(struct mipsexec)+4);
-		setdata(fp, hp->e.data_start, hp->e.dsize,
-				fp->txtoff+hp->e.tsize, hp->e.bsize);
+		settext(fp, (u32int)hp->e.mentry, (u32int)hp->e.text_start,
+			hp->e.tsize, sizeof(struct mipsexec)+4);
+		setdata(fp, (u32int)hp->e.data_start, hp->e.dsize,
+			fp->txtoff+hp->e.tsize, hp->e.bsize);
 		break;
 	case 0413:	/* some kind of mips */
-		fp->type = FMIPSB;
-		settext(fp, hp->e.mentry, hp->e.text_start, hp->e.tsize, 0);
-		setdata(fp, hp->e.data_start, hp->e.dsize, hp->e.tsize,
-					hp->e.bsize);
+		settext(fp, (u32int)hp->e.mentry, (u32int)hp->e.text_start,
+			hp->e.tsize, 0);
+		setdata(fp, (u32int)hp->e.data_start, hp->e.dsize,
+			hp->e.tsize, hp->e.bsize);
 		break;
 	}
 	setsym(fp, hp->e.nsyms, 0, hp->e.pcsize, hp->e.symptr);
-	fp->hdrsz = 0;		/* header stripped */
+	fp->hdrsz = 0;			/* header stripped */
 	return 1;
 }
 
@@ -449,24 +485,24 @@ static int
 mips4kboot(int fd, Fhdr *fp, ExecHdr *hp)
 {
 	USED(fd);
+	fp->type = FMIPSB;
 	switch(hp->e.h.amagic) {
 	default:
 	case 0407:	/* some kind of mips */
-		fp->type = FMIPSB;
-		settext(fp, hp->e.h.mentry, hp->e.h.text_start, hp->e.h.tsize,
-					sizeof(struct mips4kexec));
-		setdata(fp, hp->e.h.data_start, hp->e.h.dsize,
-				fp->txtoff+hp->e.h.tsize, hp->e.h.bsize);
+		settext(fp, (u32int)hp->e.h.mentry, (u32int)hp->e.h.text_start,
+			hp->e.h.tsize, sizeof(struct mips4kexec));
+		setdata(fp, (u32int)hp->e.h.data_start, hp->e.h.dsize,
+			fp->txtoff+hp->e.h.tsize, hp->e.h.bsize);
 		break;
 	case 0413:	/* some kind of mips */
-		fp->type = FMIPSB;
-		settext(fp, hp->e.h.mentry, hp->e.h.text_start, hp->e.h.tsize, 0);
-		setdata(fp, hp->e.h.data_start, hp->e.h.dsize, hp->e.h.tsize,
-					hp->e.h.bsize);
+		settext(fp, (u32int)hp->e.h.mentry, (u32int)hp->e.h.text_start,
+			hp->e.h.tsize, 0);
+		setdata(fp, (u32int)hp->e.h.data_start, hp->e.h.dsize,
+			hp->e.h.tsize, hp->e.h.bsize);
 		break;
 	}
 	setsym(fp, hp->e.h.nsyms, 0, hp->e.h.pcsize, hp->e.h.symptr);
-	fp->hdrsz = 0;		/* header stripped */
+	fp->hdrsz = 0;			/* header stripped */
 	return 1;
 }
 
@@ -479,11 +515,11 @@ sparcboot(int fd, Fhdr *fp, ExecHdr *hp)
 	USED(fd);
 	fp->type = FSPARCB;
 	settext(fp, hp->e.sentry, hp->e.sentry, hp->e.stext,
-					sizeof(struct sparcexec));
+		sizeof(struct sparcexec));
 	setdata(fp, hp->e.sentry+hp->e.stext, hp->e.sdata,
-					fp->txtoff+hp->e.stext, hp->e.sbss);
+		fp->txtoff+hp->e.stext, hp->e.sbss);
 	setsym(fp, hp->e.ssyms, 0, hp->e.sdrsize, fp->datoff+hp->e.sdata);
-	fp->hdrsz = 0;		/* header stripped */
+	fp->hdrsz = 0;			/* header stripped */
 	return 1;
 }
 
@@ -496,12 +532,12 @@ nextboot(int fd, Fhdr *fp, ExecHdr *hp)
 	USED(fd);
 	fp->type = FNEXTB;
 	settext(fp, hp->e.textc.vmaddr, hp->e.textc.vmaddr,
-					hp->e.texts.size, hp->e.texts.offset);
+		hp->e.texts.size, hp->e.texts.offset);
 	setdata(fp, hp->e.datac.vmaddr, hp->e.datas.size,
-				hp->e.datas.offset, hp->e.bsss.size);
+		hp->e.datas.offset, hp->e.bsss.size);
 	setsym(fp, hp->e.symc.nsyms, hp->e.symc.spoff, hp->e.symc.pcoff,
-					hp->e.symc.symoff);
-	fp->hdrsz = 0;		/* header stripped */
+		hp->e.symc.symoff);
+	fp->hdrsz = 0;			/* header stripped */
 	return 1;
 }
 
@@ -643,34 +679,6 @@ elfdotout(int fd, Fhdr *fp, ExecHdr *hp)
 	return 1;
 }
 
-/*
- * alpha bootable
- */
-static int
-alphadotout(int fd, Fhdr *fp, ExecHdr *hp)
-{
-	uvlong kbase;
-
-	USED(fd);
-	settext(fp, hp->e.entry, sizeof(Exec), hp->e.text, sizeof(Exec));
-	setdata(fp, fp->txtsz+sizeof(Exec), hp->e.data, fp->txtsz+sizeof(Exec), hp->e.bss);
-	setsym(fp, hp->e.syms, hp->e.spsz, hp->e.pcsz, fp->datoff+fp->datsz);
-
-	/*
-	 * Boot images have some of bits <31:28> set:
-	 *	0x80400000	kernel
-	 *	0x20000000	secondary bootstrap
-	 */
-	kbase = 0xF0000000;
-	if (fp->entry & kbase) {
-		fp->txtaddr = fp->entry;
-		fp->name = "alpha plan 9 boot image";
-		fp->hdrsz = 0;		/* header stripped */
-		fp->dataddr = fp->entry+fp->txtsz;
-	}
-	return 1;
-}
-
 /*
  * (Free|Net)BSD ARM header.
  */

+ 1 - 1
sys/src/libmach/k.c

@@ -108,7 +108,7 @@ Mach msparc =
 	0,		/* value */
 	0x1000,		/* page size */
 	0xE0000000ULL,	/* kernel base */
-	0,		/* kernel text mask */
+	0xE0000000ULL,	/* kernel text mask */
 	0x7FFFFFFFULL,	/* user stack top */
 	4,		/* quantization of pc */
 	4,		/* szaddr */

+ 1 - 1
sys/src/libmach/sym.c

@@ -103,7 +103,7 @@ syminit(int fd, Fhdr *fp)
 	nsym = 0;
 	size = 0;
 	for(p = symbols; size < fp->symsz; p++, nsym++) {
-		if(fp->magic & HDR_MAGIC){
+		if(fp->_magic && (fp->magic & HDR_MAGIC)){
 			svalsz = 8;
 			if(Bread(&b, &vl, 8) != 8)
 				return symerrmsg(8, "symbol");

+ 1 - 1
sys/src/libmach/u.c

@@ -109,7 +109,7 @@ Mach msparc64 =
 	0,		/* value */
 	0x2000,		/* page size */
 	0x80000000ULL,	/* kernel base */
-	0,		/* kernel text mask */
+	0x80000000ULL,	/* kernel text mask */
 	0x7FFFFFFFULL,	/* user stack top */
 	4,		/* quantization of pc */
 	4,		/* szaddr */

+ 19 - 2
sys/src/libthread/sched.c

@@ -77,6 +77,24 @@ _schedinit(void *arg)
 	_sched();
 }
 
+void
+needstack(int n)
+{
+	int x;
+	Proc *p;
+	Thread *t;
+	
+	p = _threadgetproc();
+	t = p->thread;
+	
+	if((uchar*)&x - n < (uchar*)t->stk){
+		fprint(2, "%s %d: &x=%p n=%d t->stk=%p\n",
+			argv0, getpid(), &x, n, t->stk);
+		fprint(2, "%s %d: stack overflow\n", argv0, getpid());
+		abort();
+	}
+}
+
 void
 _sched(void)
 {
@@ -86,8 +104,7 @@ _sched(void)
 Resched:
 	p = _threadgetproc();
 	if((t = p->thread) != nil){
-		if((uchar*)&p < t->stk)		/* stack overflow */
-			abort();
+		needstack(128);
 		_threaddebug(DBGSCHED, "pausing, state=%s", psstate(t->state));
 		if(setjmp(t->sched)==0)
 			longjmp(p->sched, 1);

+ 4 - 0
usr/glenda/bin/rc/pull

@@ -3,6 +3,10 @@
 rfork e
 flags=()
 while(! ~ $#* 0 && ~ $1 -*){
+	if(~ $1 -c -s){
+		flags=($flags $1)
+		shift
+	}
 	flags=($flags $1)
 	shift
 }