Browse Source

Plan 9 from Bell Labs 2003-06-16

David du Colombier 16 years ago
parent
commit
215f76e2af
100 changed files with 1784 additions and 1501 deletions
  1. 250 229
      dist/replica/plan9.db
  2. 264 0
      dist/replica/plan9.log
  3. 1 0
      lib/vgadb
  4. 1 1
      rc/bin/ps2gif
  5. 1 1
      rc/bin/stock
  6. 4 0
      sys/include/String.h
  7. 4 2
      sys/include/stdio.h
  8. 10 10
      sys/man/1/ar
  9. 9 0
      sys/man/1/dd
  10. 19 1
      sys/man/1/nedmail
  11. 6 0
      sys/man/2/authsrv
  12. 5 0
      sys/man/2/string
  13. 1 1
      sys/man/3/fs
  14. 11 8
      sys/man/3/realtime
  15. 110 0
      sys/man/4/ext2srv
  16. 47 4
      sys/man/4/fossil
  17. 27 5
      sys/man/6/venti.conf
  18. 7 2
      sys/man/8/aliasmail
  19. 37 4
      sys/man/8/fossilcons
  20. 14 3
      sys/man/8/fs
  21. 50 35
      sys/man/8/ipconfig
  22. 23 2
      sys/man/8/ndb
  23. 39 25
      sys/man/8/prep
  24. 3 0
      sys/man/8/venti
  25. 30 0
      sys/man/8/ventiaux
  26. 0 58
      sys/man/8/x509
  27. 16 16
      sys/src/9/alphapc/dat.h
  28. 1 492
      sys/src/9/alphapc/devether.c
  29. 0 50
      sys/src/9/alphapc/errstr.h
  30. 0 51
      sys/src/9/bitsy/errstr.h
  31. 2 1
      sys/src/9/bitsy/l.s
  32. 1 1
      sys/src/9/bitsy/mem.h
  33. 1 0
      sys/src/9/bitsy/mmu.c
  34. 1 1
      sys/src/9/bitsy/sdata.c
  35. 1 1
      sys/src/9/bitsy/trap.c
  36. 0 1
      sys/src/9/boot/boot.c
  37. 2 0
      sys/src/9/boot/boot.h
  38. 1 0
      sys/src/9/boot/bootip.c
  39. 1 2
      sys/src/9/ip/igmp.c
  40. 1 5
      sys/src/9/ip/il.c
  41. 2 1
      sys/src/9/ip/loopbackmedium.c
  42. 33 35
      sys/src/9/ip/rudp.c
  43. 1 3
      sys/src/9/ip/tcp.c
  44. 36 38
      sys/src/9/ip/udp.c
  45. 0 50
      sys/src/9/mtx/errstr.h
  46. 4 1
      sys/src/9/pc/archmp.c
  47. 10 7
      sys/src/9/pc/devarch.c
  48. 2 2
      sys/src/9/pc/devfloppy.c
  49. 0 50
      sys/src/9/pc/errstr.h
  50. 2 0
      sys/src/9/pc/ether8139.c
  51. 3 7
      sys/src/9/pc/ether82543gc.c
  52. 1 3
      sys/src/9/pc/ether82557.c
  53. 0 3
      sys/src/9/pc/floppy.h
  54. 7 10
      sys/src/9/pc/i8253.c
  55. 2 1
      sys/src/9/pc/l.s
  56. 5 4
      sys/src/9/pc/main.c
  57. 3 2
      sys/src/9/pc/pc
  58. 2 1
      sys/src/9/pc/pcauth
  59. 7 3
      sys/src/9/pc/pcdisk
  60. 1 0
      sys/src/9/pc/pcflop
  61. 74 32
      sys/src/9/pc/sd53c8xx.c
  62. 1 1
      sys/src/9/pc/sdscsi.c
  63. 1 0
      sys/src/9/pc/vgas3.c
  64. 1 1
      sys/src/9/pc/wavelan.c
  65. 0 1
      sys/src/9/pc/wavelan.h
  66. 0 1
      sys/src/9/port/auth.c
  67. 1 1
      sys/src/9/port/cache.c
  68. 49 39
      sys/src/9/port/chan.c
  69. 4 4
      sys/src/9/port/cis.c
  70. 1 1
      sys/src/9/port/devaudio.c
  71. 1 1
      sys/src/9/port/devbridge.c
  72. 3 3
      sys/src/9/port/devcons.c
  73. 2 2
      sys/src/9/port/devmnt.c
  74. 4 4
      sys/src/9/port/devpnp.c
  75. 11 5
      sys/src/9/port/devrealtime.c
  76. 13 13
      sys/src/9/port/devsd.c
  77. 1 2
      sys/src/9/port/devsdp.c
  78. 5 3
      sys/src/9/port/devtls.c
  79. 3 4
      sys/src/9/port/devuart.c
  80. 25 8
      sys/src/9/port/edf.c
  81. 5 3
      sys/src/9/port/edf.h
  82. 1 0
      sys/src/9/port/error.h
  83. 5 0
      sys/src/9/port/initcode.c
  84. 45 12
      sys/src/9/port/mkbootrules
  85. 1 28
      sys/src/9/port/mkdevc
  86. 2 12
      sys/src/9/port/mkdevlist
  87. 1 1
      sys/src/9/port/page.c
  88. 2 1
      sys/src/9/port/pgrp.c
  89. 6 6
      sys/src/9/port/portclock.c
  90. 25 20
      sys/src/9/port/portdat.h
  91. 5 1
      sys/src/9/port/portfns.h
  92. 1 7
      sys/src/9/port/portmkfile
  93. 9 8
      sys/src/9/port/proc.c
  94. 4 2
      sys/src/9/port/qlock.c
  95. 5 2
      sys/src/9/port/realtimesub.c
  96. 0 1
      sys/src/9/port/sd.h
  97. 1 1
      sys/src/9/port/swap.c
  98. 342 36
      sys/src/9/port/sysfile.c
  99. 2 1
      sys/src/9/port/sysproc.c
  100. 0 0
      sys/src/cmd/auth/passwd.c

File diff suppressed because it is too large
+ 250 - 229
dist/replica/plan9.db


+ 264 - 0
dist/replica/plan9.log

@@ -12046,3 +12046,267 @@
 1055091688 3 c sys/src/9/pc/pccd - 664 sys sys 1055090302 1302
 1055091688 4 c sys/src/9/pc/vganvidia.c - 664 sys sys 1055090312 6543
 1055091688 5 d sys/src/9/pc/ether82543.c - 664 sys sys 1039803177 0
+1055689364 0 c sys/src/9/port/auth.c - 664 sys sys 1055688251 2308
+1055689364 1 c sys/src/9/port/cache.c - 664 sys sys 1055688274 9241
+1055689364 2 c sys/src/9/port/chan.c - 664 sys sys 1055688280 29137
+1055689364 3 c sys/src/9/port/cis.c - 664 sys sys 1055688285 8082
+1055689364 4 c sys/src/9/port/devaudio.c - 664 sys sys 1055688292 21132
+1055689364 5 c sys/src/9/port/devbridge.c - 664 sys sys 1055688301 24308
+1055689364 6 c sys/src/9/port/devcons.c - 664 sys sys 1055688321 20946
+1055689364 7 c sys/src/9/port/devmnt.c - 664 sys sys 1055688328 21594
+1055689364 8 c sys/src/9/port/devpnp.c - 664 sys sys 1055688361 13021
+1055689364 9 c sys/src/9/port/devrealtime.c - 664 sys sys 1055688366 16209
+1055689364 10 c sys/src/9/port/devsd.c - 664 sys sys 1055688396 28669
+1055689364 11 c sys/src/9/port/devsdp.c - 664 sys sys 1055688405 44800
+1055689364 12 c sys/src/9/port/devtls.c - 664 sys sys 1055688453 43764
+1055689364 13 c sys/src/9/port/devuart.c - 664 sys sys 1055688473 11586
+1055689364 14 c sys/src/9/port/edf.c - 664 sys sys 1055688474 24743
+1055689364 15 c sys/src/9/port/page.c - 664 sys sys 1055688510 8107
+1055689364 16 c sys/src/9/port/pgrp.c - 664 sys sys 1055688510 3940
+1055689364 17 c sys/src/9/port/portclock.c - 664 sys sys 1055688512 3829
+1055689364 18 c sys/src/9/port/proc.c - 664 sys sys 1055688525 24316
+1055689364 19 c sys/src/9/port/qlock.c - 664 sys sys 1055688539 3311
+1055689364 20 c sys/src/9/port/swap.c - 664 sys sys 1055688551 6980
+1055689364 21 c sys/src/9/port/sysfile.c - 664 sys sys 1055688552 21766
+1055689364 22 c sys/src/9/port/sysproc.c - 664 sys sys 1055688564 15125
+1055689364 23 c sys/src/9/port/initcode.c - 664 sys sys 1055688491 574
+1055689364 24 c sys/src/9/port/realtimesub.c - 664 sys sys 1055688540 9185
+1055689364 25 a sys/src/cmd/ext2srv - 20000000775 sys sys 1055687763 0
+1055689364 26 a sys/src/cmd/ext2srv/chat.c - 664 sys sys 1055687746 827
+1055689364 27 a sys/src/cmd/ext2srv/dat.h - 664 sys sys 1055687746 5275
+1055689364 28 a sys/src/cmd/ext2srv/errstr.h - 664 sys sys 1055687747 565
+1055689364 29 a sys/src/cmd/ext2srv/ext2fs.c - 664 sys sys 1055687747 6063
+1055689364 30 a sys/src/cmd/ext2srv/ext2srv.man - 664 sys sys 1055687747 2409
+1055689364 31 a sys/src/cmd/ext2srv/ext2subs.c - 664 sys sys 1055687747 38701
+1055689364 32 a sys/src/cmd/ext2srv/fns.h - 664 sys sys 1055687748 1803
+1055689364 33 a sys/src/cmd/ext2srv/iobuf.c - 664 sys sys 1055687748 2854
+1055689364 34 a sys/src/cmd/ext2srv/mkfile - 664 sys sys 1055687748 194
+1055689364 35 a sys/src/cmd/ext2srv/readme - 664 sys sys 1055687748 1700
+1055689364 36 a sys/src/cmd/ext2srv/version - 664 sys sys 1055687763 870
+1055689364 37 a sys/src/cmd/ext2srv/xfile.c - 664 sys sys 1055687749 2543
+1055689364 38 a sys/src/cmd/ext2srv/xfssrv.c - 664 sys sys 1055687749 1292
+1055691165 0 c sys/src/9/pc/archmp.c - 664 sys sys 1055689883 2239
+1055691165 1 c sys/src/9/pc/devarch.c - 664 sys sys 1055689884 17647
+1055691165 2 c sys/src/9/pc/devfloppy.c - 664 sys sys 1055689885 20024
+1055691165 3 c sys/src/9/pc/ether8139.c - 664 sys sys 1055689886 18012
+1055691165 4 c sys/src/9/pc/ether82543gc.c - 664 sys sys 1055689887 32296
+1055691165 5 c sys/src/9/pc/ether82557.c - 664 sys sys 1055689889 29634
+1055691165 6 c sys/src/9/pc/i8253.c - 664 sys sys 1055689890 6219
+1055691165 7 c sys/src/9/pc/main.c - 664 sys sys 1055689890 14496
+1055691165 8 c sys/src/9/pc/sd53c8xx.c - 664 sys sys 1055689891 52089
+1055691165 9 c sys/src/9/pc/sdscsi.c - 664 sys sys 1055689892 7406
+1055691165 10 c sys/src/9/pc/vgas3.c - 664 sys sys 1055689893 12082
+1055691165 11 c sys/src/9/pc/wavelan.c - 664 sys sys 1055689894 27253
+1055692967 0 a sys/man/4/ext2srv - 664 sys sys 1055692986 2409
+1055692967 1 c sys/man/8/prep - 664 sys sys 1055692961 13573
+1055692967 2 c sys/src/cmd/disk/prep/prep.c - 664 sys sys 1055692957 10634
+1055694769 0 c sys/man/1/dd - 664 sys sys 1055693436 3346
+1055694769 1 c sys/src/cmd/dd.c - 664 sys sys 1055693435 11721
+1055700173 0 c sys/src/cmd/auth/passwd.c - 664 sys sys 1055699009 2761
+1055700173 1 c sys/src/cmd/auth/secstore/secchk.c - 664 sys sys 1055698993 560
+1055700173 2 c sys/src/cmd/eqn/eqn.c - 664 sys sys 1055698950 19576
+1055700173 3 c sys/src/cmd/exportfs/exportfs.c - 664 sys sys 1055698967 15466
+1055700173 4 c sys/src/cmd/hget.c - 664 sys sys 1055699046 22029
+1055700173 5 c sys/src/cmd/iostats/statsrv.c - 664 sys sys 1055699098 10756
+1055700173 6 c sys/src/cmd/ip/imap4d/msg.c - 664 sys sys 1055699143 31357
+1055700173 7 c sys/src/cmd/ip/ppp/ppp.c - 664 sys sys 1055699160 59236
+1055700173 8 c sys/src/cmd/ip/snoopy/ether.c - 664 sys sys 1055699192 1979
+1055700173 9 c sys/src/cmd/ip/snoopy/il.c - 664 sys sys 1055699197 2246
+1055700173 10 c sys/src/cmd/ip/snoopy/ip.c - 664 sys sys 1055699194 4291
+1055700173 11 c sys/src/cmd/ip/snoopy/tcp.c - 664 sys sys 1055699196 3593
+1055700173 12 c sys/src/cmd/ip/snoopy/udp.c - 664 sys sys 1055699195 1718
+1055700173 13 a sys/src/cmd/mk/acid - 664 sys sys 1055698806 10395
+1055700173 14 c sys/src/cmd/mk/file.c - 664 sys sys 1055698807 1310
+1055700173 15 c sys/src/cmd/mk/fns.h - 664 sys sys 1055698809 2199
+1055700173 16 c sys/src/cmd/mk/mk.h - 664 sys sys 1055698812 3735
+1055700173 17 c sys/src/cmd/mk/mkfile - 664 sys sys 1055698812 376
+1055700173 18 c sys/src/cmd/mk/plan9.c - 664 sys sys 1055698813 6818
+1055700173 19 a sys/src/cmd/mk/xyz - 775 sys sys 1055698814 134938
+1055700173 20 c sys/src/cmd/nntpfs.c - 664 sys sys 1055699250 18903
+1055700173 21 c sys/src/cmd/ql/asm.c - 664 sys sys 1055699283 12469
+1055700173 22 c sys/src/cmd/ql/asmout.c - 664 sys sys 1055699283 30140
+1055700173 23 c sys/src/cmd/ql/obj.c - 664 sys sys 1055699284 23016
+1055700173 24 c sys/src/cmd/ramfs.c - 664 sys sys 1055699293 15087
+1055700173 25 c sys/src/cmd/rc/code.c - 664 sys sys 1055698766 8158
+1055700173 26 c sys/src/cmd/rc/exec.c - 664 sys sys 1055698767 16060
+1055700173 27 c sys/src/cmd/rc/exec.h - 664 sys sys 1055698767 2779
+1055700173 28 a sys/src/cmd/rc/fmtquote.c - 664 sys sys 1055698768 3609
+1055700173 29 c sys/src/cmd/rc/fns.h - 664 sys sys 1055698768 1377
+1055700173 30 c sys/src/cmd/rc/getflags.c - 664 sys sys 1055698770 3954
+1055700173 31 c sys/src/cmd/rc/glob.c - 664 sys sys 1055698770 4540
+1055700173 32 a sys/src/cmd/rc/havefork.c - 664 sys sys 1055698771 3473
+1055700173 33 a sys/src/cmd/rc/haventfork.c - 664 sys sys 1055698771 3122
+1055700173 34 c sys/src/cmd/rc/here.c - 664 sys sys 1055698771 2497
+1055700173 35 c sys/src/cmd/rc/io.c - 664 sys sys 1055698773 3623
+1055700173 36 c sys/src/cmd/rc/lex.c - 664 sys sys 1055698774 6042
+1055700173 37 c sys/src/cmd/rc/mkfile - 664 sys sys 1055698774 812
+1055700173 38 c sys/src/cmd/rc/pcmd.c - 664 sys sys 1055698775 2628
+1055700173 39 c sys/src/cmd/rc/pfnc.c - 664 sys sys 1055698776 1303
+1055700173 40 c sys/src/cmd/rc/plan9.c - 664 sys sys 1055698776 9382
+1055700173 41 c sys/src/cmd/rc/simple.c - 664 sys sys 1055698777 8993
+1055700173 42 c sys/src/cmd/rc/subr.c - 664 sys sys 1055698779 1206
+1055700173 43 c sys/src/cmd/rc/trap.c - 664 sys sys 1055698780 871
+1055700173 44 c sys/src/cmd/rc/tree.c - 664 sys sys 1055698780 2071
+1055700173 45 c sys/src/cmd/rc/unix.c - 664 sys sys 1055698781 8726
+1055700173 46 c sys/src/cmd/rc/var.c - 664 sys sys 1055698781 1298
+1055700173 47 a sys/src/cmd/rc/win32.c - 664 sys sys 1055698781 8699
+1055700173 48 c sys/src/cmd/rtstats/edfproc.c - 664 sys sys 1055699325 3109
+1055700173 49 c sys/src/cmd/unix/u9fs/u9fs.c - 664 sys sys 1055699455 30811
+1055700173 50 c sys/src/cmd/upas/common/libsys.c - 664 sys sys 1055699577 14010
+1055700173 51 c sys/src/cmd/upas/common/sys.h - 664 sys sys 1055699577 2223
+1055700173 52 c sys/src/cmd/upas/fs/pop3.c - 664 sys sys 1055699607 11699
+1055700173 53 c sys/src/cmd/usb/usbd/usbd.c - 664 sys sys 1055699682 5493
+1055700173 54 c sys/src/cmd/vac/vacfs.c - 664 sys sys 1055699701 13458
+1055700173 55 c sys/src/cmd/vl/asm.c - 664 sys sys 1055699754 30723
+1055700173 56 c sys/src/cmd/vl/list.c - 664 sys sys 1055699765 4753
+1055700173 57 c sys/src/cmd/ed.c - 664 sys sys 1055698917 21942
+1055700173 58 c sys/src/cmd/ls.c - 664 sys sys 1055699219 5284
+1055700173 59 c sys/src/cmd/stats.c - 664 sys sys 1055699395 27161
+1055700173 60 c sys/src/fs/dev/juke.c - 664 sys sys 1055699807 22892
+1055700173 61 c sys/src/fs/pc/trap.c - 664 sys sys 1055699801 7946
+1055700173 62 c sys/src/fs/port/portdat.h - 664 sys sys 1055699797 16701
+1055700173 63 c sys/src/libc/port/pool.c - 664 sys sys 1055699981 27944
+1055700173 64 c sys/src/libc/power/tas.s - 664 sys sys 1055700129 337
+1055700173 65 c sys/src/libmp/port/letomp.c - 664 sys sys 1055700222 432
+1055700173 66 c sys/src/libmp/port/mpaux.c - 664 sys sys 1055700209 2650
+1055700173 67 c sys/src/libmp/port/mpcmp.c - 664 sys sys 1055700210 465
+1055700173 68 d sys/src/cmd/ip/8.ipconfig - 775 sys sys 1051207029 0
+1055700173 69 d sys/src/cmd/ip/ipconfig.8 - 664 sys sys 1051207027 0
+1055701974 0 c 386/lib/libstdio.a - 664 sys sys 1055700387 128500
+1055701974 1 c 386/lib/libthread.a - 664 sys sys 1055700446 71726
+1055701974 2 c lib/vgadb - 664 sys sys 1055701446 27652
+1055701974 3 c rc/bin/ps2gif - 775 sys sys 1055701384 107
+1055701974 4 c rc/bin/stock - 775 sys sys 1055701355 288
+1055701974 5 c sys/include/String.h - 664 sys sys 1055701304 1291
+1055701974 6 c sys/include/stdio.h - 664 sys sys 1055700381 4199
+1055701974 7 c sys/man/1/ar - 664 sys sys 1055701045 3149
+1055701974 8 c sys/man/2/string - 664 sys sys 1055701090 5306
+1055701974 9 c sys/man/3/fs - 664 sys sys 1055701106 2706
+1055701974 10 c sys/man/3/realtime - 664 sys sys 1055701120 13121
+1055701974 11 c sys/man/4/fossil - 664 sys sys 1055701130 9208
+1055701974 12 c sys/man/8/aliasmail - 664 sys sys 1055701148 1353
+1055701974 13 c sys/man/8/fs - 664 sys sys 1055701170 15029
+1055701974 14 c sys/man/8/ipconfig - 664 sys sys 1055701180 4766
+1055701974 15 c sys/man/8/ndb - 664 sys sys 1055701183 9379
+1055701974 16 c sys/man/8/ventiaux - 664 sys sys 1055701197 9975
+1055701974 17 c sys/src/9/alphapc/dat.h - 664 sys sys 1055701016 5095
+1055701974 18 c sys/src/9/alphapc/devether.c - 664 sys sys 1055701009 28
+1055701974 19 c sys/src/9/bitsy/l.s - 664 sys sys 1055700934 18211
+1055701974 20 c sys/src/9/bitsy/mem.h - 664 sys sys 1055700932 8049
+1055701974 21 c sys/src/9/bitsy/mmu.c - 664 sys sys 1055700931 11228
+1055701974 22 c sys/src/9/bitsy/sdata.c - 664 sys sys 1055700868 44660
+1055701974 23 c sys/src/9/bitsy/trap.c - 664 sys sys 1055700865 19128
+1055701974 24 c sys/src/9/boot/boot.c - 664 sys sys 1055700840 5316
+1055701974 25 c sys/src/9/ip/igmp.c - 664 sys sys 1055700768 5175
+1055701974 26 c sys/src/9/ip/il.c - 664 sys sys 1055700772 26893
+1055701974 27 c sys/src/9/ip/loopbackmedium.c - 664 sys sys 1055701769 1671
+1055701974 28 c sys/src/9/ip/rudp.c - 664 sys sys 1055700790 21415
+1055701974 29 c sys/src/9/ip/tcp.c - 664 sys sys 1055700797 65217
+1055701974 30 c sys/src/9/ip/udp.c - 664 sys sys 1055700791 13069
+1055701974 31 c sys/src/9/pc/floppy.h - 664 sys sys 1055700609 3835
+1055701974 32 c sys/src/9/pc/l.s - 664 sys sys 1055700610 20868
+1055701974 33 c sys/src/9/pc/main.c - 664 sys sys 1055700611 14507
+1055701974 34 c sys/src/9/pc/pc - 664 sys sys 1055700612 1360
+1055701974 35 c sys/src/9/pc/pcauth - 664 sys sys 1055700612 609
+1055701974 36 c sys/src/9/pc/pcdisk - 664 sys sys 1055700613 1432
+1055701974 37 c sys/src/9/pc/pcflop - 664 sys sys 1055700671 1410
+1055701974 38 c sys/src/9/pc/wavelan.h - 664 sys sys 1055700615 6151
+1055701974 39 c sys/src/9/port/devcons.c - 664 sys sys 1055700516 20933
+1055701974 40 c sys/src/9/port/edf.h - 664 sys sys 1055700516 4469
+1055701974 41 c sys/src/9/port/error.h - 664 sys sys 1055700517 2630
+1055701974 42 c sys/src/9/port/mkdevc - 775 sys sys 1055700518 3446
+1055701974 43 c sys/src/9/port/mkdevlist - 775 sys sys 1055700519 510
+1055701974 44 c sys/src/9/port/portdat.h - 664 sys sys 1055700521 21390
+1055701974 45 c sys/src/9/port/portfns.h - 664 sys sys 1055700522 10769
+1055701974 46 c sys/src/9/port/portmkfile - 664 sys sys 1055700523 2057
+1055701974 47 c sys/src/9/port/sd.h - 664 sys sys 1055700523 2686
+1055701974 48 c sys/src/9/port/mkbootrules - 775 sys sys 1055700518 923
+1055701974 49 c sys/src/cmd/ndb/cs.c - 664 sys sys 1055701923 32739
+1055701974 50 c sys/src/cmd/ndb/dblookup.c - 664 sys sys 1055701929 17465
+1055701974 51 c sys/src/cmd/ndb/dn.c - 664 sys sys 1055701925 25919
+1055701974 52 a sys/src/cmd/ndb/dnarea.c - 664 sys sys 1055701929 2126
+1055701974 53 a sys/src/cmd/ndb/dnnotify.c - 664 sys sys 1055701929 3062
+1055701974 54 c sys/src/cmd/ndb/dnresolve.c - 664 sys sys 1055701926 15331
+1055701974 55 c sys/src/cmd/ndb/dns.c - 664 sys sys 1055701923 15221
+1055701974 56 c sys/src/cmd/ndb/dns.h - 664 sys sys 1055701923 8875
+1055701974 57 c sys/src/cmd/ndb/dnsdebug.c - 664 sys sys 1055701923 8359
+1055701974 58 c sys/src/cmd/ndb/dnudpserver.c - 664 sys sys 1055701924 5277
+1055701974 59 c sys/src/cmd/ndb/mkfile - 664 sys sys 1055701930 1877
+1055701974 60 c sys/src/cmd/sh.C - 664 sys sys 1055701754 10303
+1055701974 61 a sys/src/libString/s_rdinstack.c - 664 sys sys 1055701320 2259
+1055701974 62 c sys/src/libmp/port/mpexp.c - 664 sys sys 1055700261 1269
+1055701974 63 c sys/src/libmp/port/mpleft.c - 664 sys sys 1055700262 906
+1055701974 64 c sys/src/libmp/port/mpright.c - 664 sys sys 1055700262 872
+1055701974 65 c sys/src/libmp/port/mptoi.c - 664 sys sys 1055700264 580
+1055701974 66 c sys/src/libmp/port/mpveccmp.c - 664 sys sys 1055700265 378
+1055701974 67 c sys/src/libmp/port/strtomp.c - 664 sys sys 1055700266 3003
+1055701974 68 c sys/src/libndb/dnsquery.c - 664 sys sys 1055700336 2759
+1055701974 69 c sys/src/libstdio/fseek.c - 664 sys sys 1055700343 408
+1055701974 70 a sys/src/libstdio/fseeko.c - 664 sys sys 1055700377 415
+1055701974 71 a sys/src/libstdio/ftello.c - 664 sys sys 1055700384 318
+1055701974 72 c sys/src/libstdio/mkfile - 664 sys sys 1055700381 945
+1055701974 73 c sys/src/libthread/exit.c - 664 sys sys 1055700450 1318
+1055701974 74 c sys/src/libthread/note.c - 664 sys sys 1055700452 2265
+1055701974 75 c sys/src/libthread/threadimpl.h - 664 sys sys 1055700447 4689
+1055701974 76 d sys/man/8/x509 - 664 sys sys 1037581047 0
+1055701974 77 d sys/src/9/alphapc/errstr.h - 664 sys sys 1015012784 0
+1055701974 78 d sys/src/9/bitsy/errstr.h - 664 sys sys 1053021020 0
+1055701974 79 d sys/src/9/mtx/errstr.h - 664 sys sys 1018721285 0
+1055701974 80 d sys/src/9/pc/errstr.h - 664 sys sys 1022588155 0
+1055703779 0 c sys/src/cmd/upas/alias/aliasmail.c - 664 sys sys 1055702824 5442
+1055703779 1 c sys/src/cmd/upas/filterkit/deliver.c - 664 sys sys 1055702834 1978
+1055703779 2 c sys/src/cmd/upas/marshal/marshal.c - 664 sys sys 1055702829 32370
+1055703779 3 c sys/src/cmd/upas/ned/nedmail.c - 664 sys sys 1055703158 42722
+1055703779 4 c sys/src/cmd/upas/smtp/mxdial.c - 664 sys sys 1055703150 4887
+1055703779 5 c sys/src/cmd/upas/smtp/spam.c - 664 sys sys 1055702858 9221
+1055703779 6 c sys/src/cmd/fossil/9.h - 664 sys sys 1055703747 4129
+1055703779 7 c sys/src/cmd/fossil/9fsys.c - 664 sys sys 1055703733 29755
+1055703779 8 c sys/src/cmd/fossil/9p.c - 664 sys sys 1055703732 21416
+1055703779 9 c sys/src/cmd/fossil/9srv.c - 664 sys sys 1055703734 3589
+1055703779 10 c sys/src/cmd/fossil/9user.c - 664 sys sys 1055703735 17240
+1055703779 11 c sys/src/cmd/fossil/Ccons.c - 664 sys sys 1055703737 6620
+1055703779 12 c sys/src/cmd/fossil/cache.c - 664 sys sys 1055703739 42854
+1055703779 13 a sys/src/cmd/fossil/conf.rc - 775 sys sys 1055703747 1407
+1055703779 14 c sys/src/cmd/fossil/disk.c - 664 sys sys 1055703739 5809
+1055703779 15 c sys/src/cmd/fossil/file.c - 664 sys sys 1055703740 27846
+1055703779 16 c sys/src/cmd/fossil/fns.h - 664 sys sys 1055703743 3039
+1055703779 17 c sys/src/cmd/fossil/fossil.c - 664 sys sys 1055703731 2113
+1055703779 18 c sys/src/cmd/fossil/fs.c - 664 sys sys 1055703741 21075
+1055703779 19 c sys/src/cmd/fossil/fs.h - 664 sys sys 1055703744 1398
+1055703779 20 c sys/src/cmd/fossil/history - 664 sys sys 1055703793 1400
+1055703779 21 c sys/src/cmd/fossil/mkfile - 664 sys sys 1055703730 1842
+1055703779 22 c sys/src/cmd/fossil/source.c - 664 sys sys 1055703742 18778
+1055705583 0 c sys/man/1/nedmail - 664 sys sys 1055704205 11322
+1055705583 1 c sys/man/8/fossilcons - 664 sys sys 1055703814 14677
+1055705583 2 c sys/src/9/boot/boot.h - 664 sys sys 1055703887 1773
+1055705583 3 c sys/src/9/boot/bootip.c - 664 sys sys 1055703889 3414
+1055705583 4 c sys/src/libauthsrv/readnvram.c - 664 sys sys 1055705106 8446
+1055707382 0 c sys/man/6/venti.conf - 664 sys sys 1055707400 1898
+1055707382 1 c sys/man/8/ndb - 664 sys sys 1055706144 9838
+1055707382 2 c sys/man/8/venti - 664 sys sys 1055707404 5274
+1055707382 3 c sys/man/8/ventiaux - 664 sys sys 1055707404 10528
+1055707382 4 c sys/src/cmd/venti/buildindex.c - 664 sys sys 1055707428 3174
+1055707382 5 c sys/src/cmd/venti/checkindex.c - 664 sys sys 1055707429 4115
+1055707382 6 c sys/src/cmd/venti/clumpstats.c - 664 sys sys 1055707430 2239
+1055707382 7 c sys/src/cmd/venti/config.c - 664 sys sys 1055707438 4957
+1055707382 8 c sys/src/cmd/venti/copy.c - 664 sys sys 1055707434 3517
+1055707382 9 c sys/src/cmd/venti/dat.h - 664 sys sys 1055707422 15323
+1055707382 10 c sys/src/cmd/venti/findscore.c - 664 sys sys 1055707431 2597
+1055707382 11 c sys/src/cmd/venti/fmtarenas.c - 664 sys sys 1055707424 2177
+1055707382 12 c sys/src/cmd/venti/fmtindex.c - 664 sys sys 1055707425 2534
+1055707382 13 c sys/src/cmd/venti/fns.h - 664 sys sys 1055707422 6793
+1055707382 14 c sys/src/cmd/venti/icache.c - 664 sys sys 1055707439 3942
+1055707382 15 c sys/src/cmd/venti/ifile.c - 664 sys sys 1055707440 2288
+1055707382 16 c sys/src/cmd/venti/lump.c - 664 sys sys 1055707441 3844
+1055707382 17 c sys/src/cmd/venti/lumpqueue.c - 664 sys sys 1055707442 2263
+1055707382 18 c sys/src/cmd/venti/mkfile - 664 sys sys 1055707420 1782
+1055707382 19 c sys/src/cmd/venti/rdarena.c - 664 sys sys 1055707432 1621
+1055707382 20 c sys/src/cmd/venti/read.c - 664 sys sys 1055707434 1723
+1055707382 21 c sys/src/cmd/venti/syncindex.c - 664 sys sys 1055707433 983
+1055707382 22 c sys/src/cmd/venti/venti.c - 664 sys sys 1055707423 4509
+1055709063 0 c sys/man/6/venti.conf - 664 sys sys 1055707590 1917
+1055709063 1 c sys/man/8/fossilcons - 664 sys sys 1055707854 14700
+1055709063 2 a sys/src/cmd/venti/conf.rc - 775 sys sys 1055707446 1416
+1055709063 3 c sys/src/cmd/venti/syncarena.c - 664 sys sys 1055707444 4116
+1055709063 4 c sys/src/cmd/venti/utils.c - 664 sys sys 1055707445 4602
+1055719875 0 c sys/src/libauthsrv/readnvram.c - 664 sys sys 1055718668 8534

+ 1 - 0
lib/vgadb

@@ -128,6 +128,7 @@ ctlr
 	0xC0044="S3 86C765 Video BIOS"
 	0xC0044="Stealth64 Video 2001"
 	0xC993F="S3 86C765 Video BIOS. Version 1.03-08"
+	0xC0044="Phoenix S3 TRIO32 Enhanced VGA BIOS. Version 1.3-08"
 	link=vga
 	hwgc=s3hwgc
 	ctlr=trio64 linear=1

+ 1 - 1
rc/bin/ps2gif

@@ -1,2 +1,2 @@
 #!/bin/rc
-cat $1|/bin/gs -dNOPAUSE -dQUIET '-sOUTPUTFILE='/fd/1 '-sDEVICE=inferno' - quit.ps| togif
+cat $1|/bin/gs -dNOPAUSE -dQUIET '-sOUTPUTFILE='/fd/1 '-sDEVICE=inferno' - quit.ps| crop | togif

+ 1 - 1
rc/bin/stock

@@ -8,7 +8,7 @@ hget 'http://quote.yahoo.com/d/quotes.csv?s='^$stock^'&f=snl1d1c1v&e=.exe' |
 	sed 's/ +"/"/;s/
//' |
 	switch(`{date}){
 	case *'Apr 1 '*
-		sed 's/("LU","LUCENT TECH"),([^,]*),(.*)$/\1,65.35,\3/'
+		sed 's/("LU","LUCENT TECH"),([^,]*),(.*)$/\1,2.35,\3/'
 	case *
 		cat
 	}

+ 4 - 0
sys/include/String.h

@@ -37,4 +37,8 @@ extern String*	s_grow(String*, int);
 extern int	s_read(Biobuf*, String*, int);
 extern char	*s_read_line(Biobuf*, String*);
 extern char	*s_getline(Biobuf*, String*);
+typedef struct Sinstack Sinstack;
+extern char	*s_rdinstack(Sinstack*, String*);
+extern Sinstack	*s_allocinstack(char*);
+extern void	s_freeinstack(Sinstack*);
 #endif BGETC

+ 4 - 2
sys/include/stdio.h

@@ -101,9 +101,11 @@ int ungetc(int, FILE *);
 long fread(void *, long, long, FILE *);
 long fwrite(const void *, long, long, FILE *);
 int fgetpos(FILE *, fpos_t *);
-int fseek(FILE *, long int, int);
+int fseek(FILE *, long, int);
+int fseeko(FILE *, long long, int);
 int fsetpos(FILE *, const fpos_t *);
-long int ftell(FILE *);
+long ftell(FILE *);
+long long ftello(FILE *);
 void rewind(FILE *);
 void clearerr(FILE *);
 int feof(FILE *);

+ 10 - 10
sys/man/1/ar

@@ -120,16 +120,16 @@ showing
 .B
 	mode uid/gid size date name
 .TP
-.B c
-Create.
-Normally
-.I ar
-will create a new archive when
-.I afile
-does not exist, and give a warning.
-Option 
-.B c
-discards any old contents and suppresses the warning.
+.\" .B c
+.\" Create.
+.\" Normally
+.\" .I ar
+.\" will create a new archive when
+.\" .I afile
+.\" does not exist, and give a warning.
+.\" Option 
+.\" .B c
+.\" discards any old contents and suppresses the warning.
 .TP
 .B l
 Local.

+ 9 - 0
sys/man/1/dd

@@ -82,6 +82,15 @@ truncates the output file when it opens it;
 .B -trunc
 .B 0
 opens it without truncation.
+.TP
+.BI -quiet\  n\^
+By default,
+.I dd
+prints the number of blocks read and written
+once it is finished.
+.B -quiet
+.B 1
+silences this summary.
 .HP
 \fL-conv\ ascii\ \ \ \ \fRConvert
 .SM EBCDIC

+ 19 - 1
sys/man/1/nedmail

@@ -243,6 +243,14 @@ Append the message to the specified mailbox.
 If
 .I mfile
 doesn't start with a `/', it is interpreted relative to the directory in which the mailbox resides.
+If
+.I mfile
+is a directory then the destination is a file in that directry.
+If the MIME header specifies a file name, that one is used.
+Otherwise, one is generated using
+.IR mktemp (2)
+and the string
+.BR att.XXXXXXXXXXX .
 .TP
 .B q
 Put undeleted mail back in the mailbox and stop.
@@ -263,10 +271,20 @@ Remove mark for deletion.
 .B x
 Exit, without changing the mailbox file.
 .TP
+.B y
+Synchronize with the mail box.  Any deleted
+messages are purged and any new messages read.
+This is equivalent to quiting nedmail and restarting.
+.TP
 .BI | command
 Run the
 .I command
-with the message as standard input.
+with the message body as standard input.
+.TP
+.BI || command
+Run the
+.I command
+with the whole message as standard input.
 .TP
 .BI ! command
 Escape to the shell to do

+ 6 - 0
sys/man/2/authsrv

@@ -131,6 +131,12 @@ On x86s and Alphas
 successively opens the following areas stopping with the
 first to succeed:
 .PP
+\- the partition named by the
+.B $nvram
+environment variable
+(commonly set via
+.IR plan9.ini (8))
+.br
 \- the partition
 .B #S/sdC0/nvram
 .br

+ 5 - 0
sys/man/2/string

@@ -225,6 +225,11 @@ The string is null terminated.
 reads up to the next newline and returns
 a pointer to the beginning of the bytes read.  Leading
 spaces and tabs and the trailing newline are all discarded.
+.I S_getline
+will recursively read through files included with
+.B #include
+and discard all other lines beginning with
+.BR # .
 .SH SOURCE
 .B /sys/src/libString
 .SH SEE ALSO

+ 1 - 1
sys/man/3/fs

@@ -1,6 +1,6 @@
 .TH FS 3 
 .SH NAME
-fs \- file system devices.
+fs \- file system devices
 .SH SYNOPSIS
 .nf
 .B bind -b #k /dev

+ 11 - 8
sys/man/3/realtime

@@ -70,7 +70,7 @@ a machine- and architecture-dependent unit called
 .IR tick ).
 Every $T$ nanoseconds, the task is
 .I released
-— i.e., it becomes schedulable — and it received a
+— i.e., it becomes schedulable — and it receives a
 .I slice
 of $C$ nsec.
 When the task is released, its
@@ -109,8 +109,8 @@ deadline.  When a task is released it can, therefore, preempt a task
 that has a later deadline, but was released earlier.
 .PP
 Real-time tasks sharing resources, however, may need to be prevented
-from preempting each other.  They can do this by declaring a shared
-resource.  The scheduler will not preempt one task with another that
+from preempting each other.  They must do this by declaring their shared
+resources.  The scheduler will not preempt one task with another that
 shares a common resource.  To do this, the scheduler needs to know the
 names of the sharable resources used by each of the tasks, the amount
 of time the resources are used, and the way in which resource usage is
@@ -124,13 +124,16 @@ it is not legal to acquire $A$, acquire $B$, release $A$ and release $B$
 in that order.
 .PP
 During the admission test, information about resource sharing is used
-to calculate secondary deadlines for each task, called
+to calculate
 .IR "inherited deadlines" ,
-$Δ$, which is the minimum of the deadlines $D$ of each of the tasks
-that shares a resource currently held by the current task.
+for each task.  A resource's
+.IR "inherited deadline" ,
+$Δ$, is the minimum of the deadlines $D$ of each of the tasks
+that shares that resource.  A task's $Δ$ is the minimum of the
+resource $Δ$s of all resources held by the task.
 .PP
-Acquiring a resource will lower the $Δ$ of the task (or keep it the
-same); releasing one will increase the $Δ$ (or keep it the same).
+Acquiring a resource may lower the $Δ$ of the task; releasing one
+may increase it.
 .PP
 The scheduler allows a released task $T$ to preempt running task $T'$
 iff $d < d' ^ D < Δ'$; the first half of the condition says that the

+ 110 - 0
sys/man/4/ext2srv

@@ -0,0 +1,110 @@
+.TH EXT2SRV 4
+.SH NAME
+ext2srv \- ext2 file system
+.SH SYNOPSIS
+.B ext2srv
+[
+.B -vrs
+] [
+.B -f
+.I file
+] [
+.B -p
+.I passwd
+] [
+.B -g
+.I group
+] [
+.I service
+]
+.SH DESCRIPTION
+.I Ext2srv
+is a file server that interprets the Linux Second Extended File System.
+A single instance of
+.I ext2srv
+can provide access to multiple ext2 partitions simultaneously.
+.PP
+.I Ext2srv
+posts a file descriptor named
+.I service
+(default
+.BR ext2 )
+in the
+.B /srv
+directory.
+To access an ext2 file system on a device, use
+.B mount
+with the
+.I spec
+argument
+(see
+.IR bind (1))
+the name of the file holding the raw ext2 file system, typically the disk or partition.
+If
+.I spec
+is undefined in the
+.BR mount ,
+.I ext2srv
+will use
+.I file
+as the default name for the device holding the file system.
+.PP
+Normally
+.I ext2srv
+creates a pipe to act as the communications channel between
+itself and its clients.
+The
+.B -s
+flag instructs
+.I ext2srv
+to use its standard input and output instead.
+This flag also prevents the creation of an explicit service file in
+.BR /srv .
+.PP
+The
+.B -v
+flag causes verbose output for debugging, while
+the
+.B -r
+flag (recommended) makes the file system read-only.
+The optional
+.B -p
+and
+.B -g
+flags specify Unix-format password (respectively group) files
+that give the mapping between the numeric user- and group-ID
+numbers in the ext2 file system and the strings reported by Plan 9 status
+inquiries.
+.PP
+There is no authentication or permission checking.
+Anyone who can access the ext2 file system will have full access
+to all its files, including write access if
+.I ext2srv
+is not started with the
+.B -r
+flag, irrespective of file ownership and permission flags.
+.PP
+Some file system state is cached in memory, and may
+be flushed only when the file system is unmounted.
+Therefore if
+.I ext2srv
+is stopped or the machine is rebooted while an ext2 file system
+is still mounted,
+the superblock on the device will have been marked `not valid'
+(unless the
+.B -r
+flag was used),
+and a
+.I fsck
+will be required before that file system may be mounted again.
+.SH BUGS
+There is no authentication or permission checking.
+The implementation has not tracked any changes to the ext2
+specification since it was written.
+There may be other bugs.
+It is advisable to use
+.I ext2srv
+in read-only mode whenever possible.
+.SH AUTHOR
+Bodet Laurent (bl@mime.univ-paris8.fr),
+with later updates by Russ Cox and Richard Miller.

+ 47 - 4
sys/man/4/fossil

@@ -10,6 +10,10 @@ fossil \- archival file server
 .B -c
 .I cmd
 ]...
+[
+.B -f
+.I file
+]
 .PP
 .B fossil/flchk
 [
@@ -46,6 +50,15 @@ fossil \- archival file server
 .I score
 ]
 .I file
+.PP
+.B fossil/conf
+[
+.B -w
+]
+.I file
+[
+.I config
+]
 .SH DESCRIPTION
 Fossil
 will become the main file system for Plan 9.
@@ -152,6 +165,8 @@ Authentication can be disabled using the
 .B -A
 flag to
 .B open
+or
+.B srv
 (see
 .IR fossilcons (8)).
 .PP
@@ -213,6 +228,13 @@ which starts a file server console on
 See
 .IR fossilcons (8)
 for more information.
+.TP
+.BI -f " file
+Read and execute console commands stored in the Fossil disk 
+.IR file .
+.I Conf
+.RI ( q.v. )
+reads and writes the command set stored in the disk.
 .PD
 .PP
 .I Flchk
@@ -321,6 +343,27 @@ rather than by
 .IR vac (1),
 so that the appropriate snapshot metadata is present.
 .PD
+.PP
+.I Conf
+reads or writes the configuration branded on the Fossil disk
+.IR file .
+By default, it reads the configuration from the disk and prints it to
+standard output.
+If the
+.B -w
+flag is given,
+.I conf
+reads a new configuration from 
+.I config
+(or else from standard input)
+and writes it to the disk.
+The Plan 9 kernel boot process runs
+.RB `` fossil
+.B -f
+.IR disk ''
+to start a Fossil file server.
+The disk is just a convenient place to store configuration
+information.
 .SH EXAMPLES
 .PP
 Place the root of the archive file system on
@@ -345,7 +388,7 @@ checking turned off, create a users file, and mount the server:
 .IP
 .EX
 fossil/flfmt /dev/sdC0/fossil
-cat >flproto <<EOF
+fossil/conf -w /dev/sdC0/fossil <<EOF
 fsys main config /dev/sdC0/fossil
 fsys main open -AWP
 fsys main
@@ -355,7 +398,7 @@ users -w /active/adm/users
 srv -p fscons
 srv fossil
 EOF
-fossil/fossil -c '. flproto'
+fossil/fossil -f /dev/sdC0/fossil
 mount /srv/fossil /n/fossil
 .EE
 .LP
@@ -415,5 +458,5 @@ Changing to the new format will require reformatting
 the disk as in the example above,
 but note that this will preserve most of the file system
 (all but
-.B /snapshot
-) with little effort.
+.BR /snapshot )
+with little effort.

+ 27 - 5
sys/man/6/venti.conf

@@ -9,9 +9,11 @@ a disk partition, in which they reside.  The configuration
 file is the only location that file names are used.  Internally,
 venti uses the names assigned when the components were formatted
 with 
-.IR fmtarenas (8)
+.I fmtarenas
 or 
-.IR fmtisect (8).
+.I fmtisect
+(see
+.IR ventiaux (8)).
 In particular, by changing the configuration a
 component can be copied to a different file.
 .PP
@@ -26,17 +28,37 @@ Names the index for the system.
 .BI arenas " file
 .I File
 contains a collection of arenas, formatted using
-.IR fmtarenas (8).
+.IR fmtarenas .
 .TP
 .BI isect " file
 .I File
 contains an index section, formatted using
-.IR fmtisect (8).
+.IR fmtisect .
 .PP
 After formatting a venti system using
-.IR fmtindex (8),
+.IR fmtindex ,
 the order of arenas and index sections should not be changed.
 Additional arenas can be appended to the configuration.
+.PP
+The configuration file optionally holds configuration parameters
+for the venti server itself.
+These are:
+.TP
+.BI mem " cachesize
+.TP
+.BI bcmem " blockcachesize
+.TP
+.BI icmem " indexcachesize
+.TP
+.BI addr " ventiaddress
+.TP
+.BI httpaddr " httpaddress
+.TP
+.B queuewrites
+.PD
+See 
+.IR venti (8)
+for descriptions of these variables.
 .SH EXAMPLE
 .EX
 # a sample venti configuration file

+ 7 - 2
sys/man/8/aliasmail

@@ -13,9 +13,14 @@ is normally invoked by a rule in in the
 upas rewrite file,
 .IR rewrite (6).
 .PP
-Each line of an alias file begins with
+If a line of an alias file begins with
+.BR #include ,
+the line is replaced by the contents of the file whose name follows.
+Other lines, beginning with
 .B #
-(comment) or with a name.
+are ignored as comment.
+.PP
+Otherwise, lines begin with a name.
 The rest of a name line gives the expansion.
 The expansion may contain multiple addresses and may be continued
 to another line by appending a backslash.

+ 37 - 4
sys/man/8/fossilcons

@@ -179,7 +179,7 @@ con /srv/fscons
 ]
 .B epoch
 [
-.B -y
+.B -ry
 ]
 .I n
 .PP
@@ -233,6 +233,10 @@ con /srv/fscons
 .B -s
 .I interval
 ]
+[
+.B -t
+.I timeout
+]
 .PP
 [
 .B fsys
@@ -479,9 +483,12 @@ adm:adm:adm:sys
 none:none::
 noworld:noworld::
 sys:sys::
+glenda:glenda:glenda:
 .PP
-These users are mandatory and must appear in all user files.
-It is not possible to rename these unames.
+Except
+.BR glenda ,
+these users are mandatory: they must appear in all user
+files and cannot be renamed.
 .EE
 .PP
 The
@@ -746,6 +753,20 @@ the archiver should take care
 of those snapshots (moving the blocks from disk to Venti)
 if you give it more time.
 .PP
+The
+.B -r
+flag to epoch causes it to remove any now-inaccessible
+snapshot directories once it has changed the epoch.
+This flag only makes sense in conjunction with the
+.B -y
+flag.
+.PP
+.I Epoch
+is a very low-level way to retire snapshots.
+The preferred way is by setting an automatic timer
+with
+.IR snaptime .
+.PP
 .I Halt
 suspends file system activity;
 .I unhalt
@@ -785,6 +806,9 @@ An archival snapshot is taken once a day, at
 while temporary snapshots are taken at multiples of
 .I interval
 minutes.
+Temporary snapshots are discarded once they are
+.I timeout
+minutes old.
 With no arguments,
 .I snaptime
 prints the current snapshot times.
@@ -800,7 +824,16 @@ or
 of
 .L none
 can be used to disable that kind of automatic snapshot.
-By default, both are disabled.
+The
+.B -t
+option sets the snapshot timeout.
+If
+.I timeout
+is
+.LR none ,
+temporary snapshots are not automatically discarded.
+By default, all three times are set to
+.LR none .
 .PP
 .I Stat
 displays metadata for each of the named

+ 14 - 3
sys/man/8/fs

@@ -266,6 +266,17 @@ to be advanced to the current WORM on the next dump.
 This is a discredited idea to try to keep operating
 on the knee of the cache working set.
 Buy more cache disk.
+.TP
+.B trim
+reduces the file system's
+.I fsize
+to fit the device containing the file system.
+This is useful after copying a partially-full file system
+into a slightly smaller device.
+Running
+.B "check free"
+afterward will construct a new free list that contains no
+blocks outside the new, smaller file system.
 .PP
 .I Clean
 prints the block numbers in
@@ -359,13 +370,13 @@ The optional
 .I platter
 limits affected blocks to those on that platter.
 .TP
-.BR prchain " [\fIstart\fP] [\fLback\fP]
+.BR prchain " [\fIstart\fP] [\fIback-flag\fP]
 Print the chain of superblocks for the directory containing the
 roots of the dumped file systems, starting at block number
 .I start
 (default 0) going forward (backwards if
-.B back
-is supplied).
+.I back-flag
+is supplied and is non-zero).
 .TP
 .BR searchtag " [\fIstart\fP] [\fItag\fP] [\fIblocks\fP]
 Reads the WORM device starting at block

+ 50 - 35
sys/man/8/ipconfig

@@ -3,9 +3,11 @@
 ipconfig, rip \- Internet configuration and routing
 .SH SYNOPSIS
 .B ip/ipconfig
-.RB [ -ndDrG ]
+.RB [ -DGPdnr ]
 .RB [ -b
 .IR baud ]
+.RB [ -c
+.IR ctl ]
 .RB [ -m
 .IR mtu ]
 .RB [ -g
@@ -39,6 +41,7 @@ in the command line or obtained via DHCP.  If DHCP is
 requested, it will also obtain the addresses of DNS
 servers, NTP servers, gateways, a Plan 9 file server,
 and a Plan 9 authentication server.  If this is the first
+non-loopback
 interface on the IP stack, the information will be
 written to
 .B /net/ndb
@@ -79,40 +82,6 @@ IP stack.
 .PP
 The options are:
 .TP
-.B x
-use the IP stack mounted at
-.I netmtpt
-instead of at
-.BR /net .
-.TP
-.B g
-the default gateway.
-.TP
-.B d
-use DHCP to determine any unspecified configuration parameters.
-.TP
-.B r
-by default, 
-.I ipconfig
-exits after trying DHCP for 15 seconds with no answer.
-This option directs
-.I ipconfig
-instead to fork a background
-process that keeps trying forever.
-.TP
-.B h
-the hostname to add to DHCP requests.  Some DHCP
-servers, such as the one used by COMCAST, will not respond
-unless a correct hostname is in the request.
-.TP
-.B n
-determine parameters but don't configure the interface.
-.TP
-.B b
-the baud rate to use on a serial line
-when configuring
-.BR PPP .
-.TP
 .B D
 turn on debugging.
 .TP
@@ -126,9 +95,55 @@ interpret as the Plan 9 file server and auth server.
 Replies to these options contain a list of IP addresses for possible
 file servers and auth servers.
 .TP
+.B P
+write configuration information to
+.BR /net/ndb ,
+even if other network interfaces are already configured
+.TP
+.B b
+the baud rate to use on a serial line
+when configuring
+.BR PPP .
+.TP
+.B c
+write the control string
+.I ctl
+to the ethernet device control file before starting to configure it.
+May be repeated to specify multiple control writes.
+.TP
+.B d
+use DHCP to determine any unspecified configuration parameters.
+.TP
+.B g
+the default gateway.
+.TP
+.B h
+the hostname to add to DHCP requests.  Some DHCP
+servers, such as the one used by COMCAST, will not respond
+unless a correct hostname is in the request.
+.TP
 .B m
 the maximum IP packet size to use on this
 interface.
+.TP
+.B n
+determine parameters but don't configure the interface.
+.TP
+.B r
+by default, 
+.I ipconfig
+exits after trying DHCP for 15 seconds with no answer.
+This option directs
+.I ipconfig
+instead to fork a background
+process that keeps trying forever.
+.TP
+.B x
+use the IP stack mounted at
+.I netmtpt
+instead of at
+.BR /net .
+.PD
 .PP
 If DHCP is requested, a process is forked
 off to renew the lease before it

+ 23 - 2
sys/man/8/ndb

@@ -43,13 +43,16 @@ query, mkhash, mkdb, cs, csquery, dns, dnsquery, ipquery, dnsdebug, mkhosts \- n
 .br
 .B ndb/dns
 [
-.B -rs
+.B -rsn
 ] [
 .B -f
 .I dbfile
 ] [
 .B -x
 .I netmtpt
+] [
+.B -z
+.I program
 ]
 .br
 .B ndb/dnsquery
@@ -192,6 +195,15 @@ network.
 .B -s
 also answer domain requests sent to UDP port 53.
 .TP
+.B -n
+whenever a zone that we serve changes, send UDP NOTIFY
+messages to any dns slaves for that zone.
+.TP
+.B -z
+whenever we receive a UDP NOTIFY message, run
+.I program
+with the domain name of the area as its argument.
+.TP
 .B -r
 defer to other servers to resolve queries.
 .PP
@@ -251,6 +263,8 @@ dom=cs.bell-labs.com soa=
 	mb=presotto@plan9.bell-labs.com
 	mx=mail.research.bell-labs.com pref=20
 	mx=plan9.bell-labs.com pref=10
+	dnsslave=nslocum.cs.bell-labs.com
+	dnsslave=vex.cs.bell-labs.com
 
 .EE
 Here, the
@@ -266,6 +280,13 @@ and
 .B ttl
 define the area refresh interval and the minimum TTL for
 records in this domain.
+The
+.B dnsslave
+entries specify slave DNS servers that should be notified
+when the domain changes.  The notification also requires
+the
+.B -n
+flag.
 .PP
 You can also serve reverse lookups (returning the name that
 goes with an IP address) by adding an
@@ -284,7 +305,7 @@ dom=104.135.in-addr.arpa soa=
 Notice the form of the reverse address, i.e., it's the bytes of the
 address range you are serving reversed and with
 .B .in-addr.arpa
-appended.  This is a standard form for an IPv4 PTR record name.
+appended.  This is a standard form for a domain name in an IPv4 PTR record.
 .PP
 If such an entry exists in the database, reverse addresses will
 automaticly be generated from any IP addresses in the database

+ 39 - 25
sys/man/8/prep

@@ -4,9 +4,13 @@ prep, fdisk, format, mbr \- prepare hard and floppy diskettes, flashes
 .SH SYNOPSIS
 .B disk/prep
 [
-.B -abcfnprw
+.B -bcfnprw
 ]
 [
+.B -a
+.I name
+]...
+[
 .B -s 
 .I sectorsize
 ]
@@ -91,7 +95,7 @@ do not overlap.
 The Plan 9 partition often contains a number of
 conventionally named subpartitions.
 They include:
-.TF cache
+.TF arenas
 .TP 
 .B 9fat
 A small FAT file system used to hold
@@ -109,16 +113,39 @@ See the discussion of the
 option to
 .IR format .
 .TP
+.B arenas
+A
+.IR venti (8)
+arenas partition.
+.TP
 .B cache
 A
 .IR cfs (4)
 file system cache.
 .TP
+.B fossil
+A
+.IR fossil (4)
+file system.
+.TP
 .B fs
 A
 .IR kfs (4)
 file system.
 .TP
+.B isect
+A
+.IR venti (8)
+index section.
+.TP
+.B nvram
+A one-sector partition used to simulate non-volatile RAM on PCs.
+.TP
+.B other
+A non-archived
+.IR fossil (4)
+file system.
+.TP
 .B swap
 A 
 .IR swap (8)
@@ -158,29 +185,16 @@ Plan 9 partition already exists.
 If no other partition on the disk is marked active (i.e. marked as the boot partition),
 .I fdisk
 will mark the new partition active.
-.I Prep
-will create 
-.BR 9fat ,
-.BR swap ,
-and
-.B fs
-partitions, doing
-nothing if the disk
-has already been partitioned.
-If the
-.B -c
-option is present, 
-.I prep
-will also create a 
-.B cache
-partition.
-If the
-.B -n
-option is present,
+.IR Prep 's
+.B -a
+flag takes the name of a partition to create.
+(See the list above for partition names.)
+It can be repeated to specify a list of partitions to create.
+If the disk is currently unpartitioned, 
 .I prep
-will create a one-sector
-.B nvram
-partition.
+will create the named partitions on the disk,
+attempting to use the entire disk in a sensible manner.
+The partition names must be from the list given above.
 .TP
 .B -b
 Start with a blank disk, ignoring any extant partition table.
@@ -649,7 +663,7 @@ Initialize the blank hard disk
 .EX
 disk/mbr -m /386/mbr /dev/sdC0/data
 disk/fdisk -baw /dev/sdC0/data
-disk/prep -baw /dev/sdC0/plan9
+disk/prep -bw -a^(9fat fs cache swap) /dev/sdC0/plan9
 disk/format -b /386/pbs -d -r 2 /dev/sdC0/9fat 9load 9pcdisk plan9.ini
 .EE
 .PP

+ 3 - 0
sys/man/8/venti

@@ -201,6 +201,9 @@ The units for the various cache sizes above can be specified by appending a
 or
 .LR g
 to indicate kilobytes, megabytes, or gigabytes respectively.
+The command line options override options found in the
+.IR venti.conf (6)
+file.
 .PP
 .I Sync
 connects to a running Venti server and executes a sync rpc

+ 30 - 0
sys/man/8/ventiaux

@@ -3,6 +3,7 @@
 buildindex,
 checkarenas,
 checkindex,
+conf,
 copy,
 fmtarenas,
 fmtindex,
@@ -41,6 +42,15 @@ write \- Venti maintenance and debugging commands
 .I venti.config
 .I tmp
 .PP
+.B venti/conf
+[
+.B -w
+]
+.I partition
+[
+.I configfile
+]
+.PP
 .B venti/copy
 [
 .B -f
@@ -464,6 +474,26 @@ children are also already on
 .IR dst .
 Without this flag, the copy often transfers many times more
 data than necessary.
+.PP
+To make it easier to bootstrap servers, the configuration
+file can be stored at the beginning of any Venti partitions using
+.IR conf .
+A partition so branded with a configuration file can
+be used in place of a configuration file when invoking any
+of the venti commands.
+By default,
+.I conf
+prints the configuration stored in
+.IR partition .
+When invoked with the
+.B -w
+flag,
+.I conf
+reads a configuration file from 
+.I configfile
+(or else standard input)
+and stores it in
+.IR partition .
 .SH SOURCE
 .B /sys/src/cmd/venti
 .SH "SEE ALSO"

+ 0 - 58
sys/man/8/x509

@@ -1,58 +0,0 @@
-.TH X509 8
-.SH NAME
-X509gen \- create a self-signed X.509 certificate
-.SH SYNOPSIS
-.B aux/X509gen
-[
-.B -e
-.I s
-]
-[
-.B -p
-]
-.I key.secret
-.I subj
-.SH DESCRIPTION
-.I X509gen
-writes a self-signed X.509 certificate to standard output,
-given an RSA public/private key pair
-.I key.secret
-and an issuer/subject string
-.IR subj ,
-also known as a "Distinguished Name" and conventionally of the form:
-.EX
-   C=US ST=NJ L=07922 O=Lucent OU='Bell Labs' CN=G.R.Emlin
-.EE
-Of course, to pass
-.I subj
-to
-.I x509gen
-using
-.IR rc (1)
-the string would be quoted as in:
-.EX
-   'C=US ST=NJ L=07922 O=Lucent OU=''Bell Labs'' CN=G.R.Emlin'
-.EE
-The key pair can be generated by
-.I aux/ssh_genkey
-(see
-.IR ssh (1)).
-.PP
-Command-line options are:
-.TP
-.B -e
-number of seconds for which certificate should be valid,
-by default 3 years.
-.TP
-.B -p
-write certificate in PEM format (instead of the default DER format)
-.SH SOURCE
-.B /sys/src/cmd/aux/X509gen.c
-.SH "SEE ALSO"
-.br
-.IR ssh (1),
-.IR rsa (2)
-.SH BUGS
-Web browsers and email clients in other operating systems
-expect certificates to be issued by a well known
-root certificate authority.

+ 16 - 16
sys/src/9/alphapc/dat.h

@@ -160,7 +160,7 @@ struct Mach
 	int	load;
 	int	intr;
 	int	flushmmu;		/* make current proc flush it's mmu state */
-	int		ilockdepth;
+	int	ilockdepth;
 
 	ulong	spuriousintr;
 	int	lastintr;
@@ -197,18 +197,18 @@ struct PCArch
 	int	(*intrvecno)(int);
 	int	(*intrdisable)(int);
 
-	int		(*_inb)(int);
+	int	(*_inb)(int);
 	ushort	(*_ins)(int);
 	ulong	(*_inl)(int);
-	void		(*_outb)(int, int);
-	void		(*_outs)(int, ushort);
-	void		(*_outl)(int, ulong);
-	void		(*_insb)(int, void*, int);
-	void		(*_inss)(int, void*, int);
-	void		(*_insl)(int, void*, int);
-	void		(*_outsb)(int, void*, int);
-	void		(*_outss)(int, void*, int);
-	void		(*_outsl)(int, void*, int);
+	void	(*_outb)(int, int);
+	void	(*_outs)(int, ushort);
+	void	(*_outl)(int, ulong);
+	void	(*_insb)(int, void*, int);
+	void	(*_inss)(int, void*, int);
+	void	(*_insl)(int, void*, int);
+	void	(*_outsb)(int, void*, int);
+	void	(*_outss)(int, void*, int);
+	void	(*_outsl)(int, void*, int);
 };
 
 /*
@@ -217,9 +217,9 @@ struct PCArch
 #define NISAOPT		8
 
 struct ISAConf {
-	char		*type;
+	char	*type;
 	ulong	port;
-	ulong	irq;
+	int	irq;
 	ulong	dma;
 	ulong	mem;
 	ulong	size;
@@ -242,13 +242,13 @@ extern register Proc	*up;
  */
 typedef struct {
 	ulong	port;	
-	int		size;
+	int	size;
 } port_t;
 
 struct DevConf
 {
 	ulong	intnum;	/* interrupt number */
-	char		*type;	/* card type, malloced */
-	int		nports;	/* Number of ports */
+	char	*type;	/* card type, malloced */
+	int	nports;	/* Number of ports */
 	port_t	*ports;	/* The ports themselves */
 };

+ 1 - 492
sys/src/9/alphapc/devether.c

@@ -1,492 +1 @@
-#include "u.h"
-#include "../port/lib.h"
-#include "mem.h"
-#include "dat.h"
-#include "fns.h"
-#include "io.h"
-#include "ureg.h"
-#include "../port/error.h"
-#include "../port/netif.h"
-
-#include "etherif.h"
-
-static volatile Ether *etherxx[MaxEther];
-
-Chan*
-etherattach(char* spec)
-{
-	ulong ctlrno;
-	char *p;
-	Chan *chan;
-
-	ctlrno = 0;
-	if(spec && *spec){
-		ctlrno = strtoul(spec, &p, 0);
-		if((ctlrno == 0 && p == spec) || *p || (ctlrno >= MaxEther))
-			error(Ebadarg);
-	}
-	if(etherxx[ctlrno] == 0)
-		error(Enodev);
-
-	chan = devattach('l', spec);
-	chan->dev = ctlrno;
-	if(etherxx[ctlrno]->attach)
-		etherxx[ctlrno]->attach(etherxx[ctlrno]);
-	return chan;
-}
-
-static Walkqid*
-etherwalk(Chan* chan, Chan* nchan, char** name, int nname)
-{
-	return netifwalk(etherxx[chan->dev], chan, nchan, name, nname);
-}
-
-static int
-etherstat(Chan* chan, uchar* dp, int n)
-{
-	return netifstat(etherxx[chan->dev], chan, dp, n);
-}
-
-static Chan*
-etheropen(Chan* chan, int omode)
-{
-	return netifopen(etherxx[chan->dev], chan, omode);
-}
-
-static void
-ethercreate(Chan*, char*, int, ulong)
-{
-}
-
-static void
-etherclose(Chan* chan)
-{
-	netifclose(etherxx[chan->dev], chan);
-}
-
-static long
-etherread(Chan* chan, void* buf, long n, vlong off)
-{
-	Ether *ether;
-	ulong offset = off;
-
-	ether = etherxx[chan->dev];
-	if((chan->qid.type & QTDIR) == 0 && ether->ifstat){
-		/*
-		 * With some controllers it is necessary to reach
-		 * into the chip to extract statistics.
-		 */
-		if(NETTYPE(chan->qid.path) == Nifstatqid)
-			return ether->ifstat(ether, buf, n, offset);
-		else if(NETTYPE(chan->qid.path) == Nstatqid)
-			ether->ifstat(ether, buf, 0, offset);
-	}
-
-	return netifread(ether, chan, buf, n, offset);
-}
-
-static Block*
-etherbread(Chan* chan, long n, ulong offset)
-{
-	return netifbread(etherxx[chan->dev], chan, n, offset);
-}
-
-static int
-etherwstat(Chan* chan, uchar* dp, int n)
-{
-	return netifwstat(etherxx[chan->dev], chan, dp, n);
-}
-
-static void
-etherrtrace(Netfile* f, Etherpkt* pkt, int len)
-{
-	int i, n;
-	Block *bp;
-
-	if(qwindow(f->in) <= 0)
-		return;
-	if(len > 58)
-		n = 58;
-	else
-		n = len;
-	bp = iallocb(64);
-	if(bp == nil)
-		return;
-	memmove(bp->wp, pkt->d, n);
-	i = TK2MS(MACHP(0)->ticks);
-	bp->wp[58] = len>>8;
-	bp->wp[59] = len;
-	bp->wp[60] = i>>24;
-	bp->wp[61] = i>>16;
-	bp->wp[62] = i>>8;
-	bp->wp[63] = i;
-	bp->wp += 64;
-	qpass(f->in, bp);
-}
-
-Block*
-etheriq(Ether* ether, Block* bp, int fromwire)
-{
-	Etherpkt *pkt;
-	ushort type;
-	int len, multi, tome, fromme;
-	Netfile **ep, *f, **fp, *fx;
-	Block *xbp;
-
-	ether->inpackets++;
-
-	pkt = (Etherpkt*)bp->rp;
-	len = BLEN(bp);
-	type = (pkt->type[0]<<8)|pkt->type[1];
-	fx = 0;
-	ep = &ether->f[Ntypes];
-
-	multi = pkt->d[0] & 1;
-	/* check for valid multcast addresses */
-	if(multi && memcmp(pkt->d, ether->bcast, sizeof(pkt->d)) && ether->prom == 0){
-		if(!activemulti(ether, pkt->d, sizeof(pkt->d))){
-			if(fromwire){
-				freeb(bp);
-				bp = 0;
-			}
-			return bp;
-		}
-	}
-
-	/* is it for me? */
-	tome = memcmp(pkt->d, ether->ea, sizeof(pkt->d)) == 0;
-	fromme = memcmp(pkt->s, ether->ea, sizeof(pkt->s)) == 0;
-
-	/*
-	 * Multiplex the packet to all the connections which want it.
-	 * If the packet is not to be used subsequently (fromwire != 0),
-	 * attempt to simply pass it into one of the connections, thereby
-	 * saving a copy of the data (usual case hopefully).
-	 */
-	for(fp = ether->f; fp < ep; fp++){
-		if(f = *fp)
-		if(f->type == type || f->type < 0)
-		if(tome || multi || f->prom){
-			/* Don't want to hear bridged packets */
-			if(f->bridge && !fromwire && !fromme)
-				continue;
-			if(!f->headersonly){
-				if(fromwire && fx == 0)
-					fx = f;
-				else if(xbp = iallocb(len)){
-					memmove(xbp->wp, pkt, len);
-					xbp->wp += len;
-					if(qpass(f->in, xbp) < 0)
-						ether->soverflows++;
-				}
-				else
-					ether->soverflows++;
-			}
-			else
-				etherrtrace(f, pkt, len);
-		}
-	}
-
-	if(fx){
-		if(qpass(fx->in, bp) < 0)
-			ether->soverflows++;
-		return 0;
-	}
-	if(fromwire){
-		freeb(bp);
-		return 0;
-	}
-
-	return bp;
-}
-
-static int
-etheroq(Ether* ether, Block* bp)
-{
-	int len, loopback, s;
-	Etherpkt *pkt;
-
-	ether->outpackets++;
-
-	/*
-	 * Check if the packet has to be placed back onto the input queue,
-	 * i.e. if it's a loopback or broadcast packet or the interface is
-	 * in promiscuous mode.
-	 * If it's a loopback packet indicate to etheriq that the data isn't
-	 * needed and return, etheriq will pass-on or free the block.
-	 * To enable bridging to work, only packets that were originated
-	 * by this interface are fed back.
-	 */
-	pkt = (Etherpkt*)bp->rp;
-	len = BLEN(bp);
-	loopback = memcmp(pkt->d, ether->ea, sizeof(pkt->d)) == 0;
-	if(loopback || memcmp(pkt->d, ether->bcast, sizeof(pkt->d)) == 0 || ether->prom){
-		s = splhi();
-		etheriq(ether, bp, 0);
-		splx(s);
-	}
-
-	if(!loopback){
-		qbwrite(ether->oq, bp);
-		ether->transmit(ether);
-	} else
-		freeb(bp);
-
-	return len;
-}
-
-static long
-etherwrite(Chan* chan, void* buf, long n, vlong)
-{
-	Ether *ether;
-	Block *bp;
-	int nn;
-
-	ether = etherxx[chan->dev];
-	if(NETTYPE(chan->qid.path) != Ndataqid) {
-		nn = netifwrite(ether, chan, buf, n);
-		if(nn >= 0)
-			return nn;
-		if(n == sizeof("nonblocking")-1 && strncmp((char*)buf, "nonblocking", n) == 0){
-			qnoblock(ether->oq, 1);
-			return n;
-		}
-		if(ether->ctl!=nil)
-			return ether->ctl(ether,buf,n);
-
-		error(Ebadctl);
-	}
-
-	if(n > ether->maxmtu)
-		error(Etoobig);
-	if(n < ether->minmtu)
-		error(Etoosmall);
-
-	bp = allocb(n);
-	if(waserror()){
-		freeb(bp);
-		nexterror();
-	}
-	memmove(bp->rp, buf, n);
-	memmove(bp->rp+Eaddrlen, ether->ea, Eaddrlen);
-	poperror();
-	bp->wp += n;
-
-	return etheroq(ether, bp);
-}
-
-static long
-etherbwrite(Chan* chan, Block* bp, ulong)
-{
-	Ether *ether;
-	long n;
-
-	n = BLEN(bp);
-	if(NETTYPE(chan->qid.path) != Ndataqid){
-		if(waserror()) {
-			freeb(bp);
-			nexterror();
-		}
-		n = etherwrite(chan, bp->rp, n, 0);
-		poperror();
-		freeb(bp);
-		return n;
-	}
-	ether = etherxx[chan->dev];
-
-	if(n > ether->maxmtu){
-		freeb(bp);
-		error(Etoobig);
-	}
-	if(n < ether->minmtu){
-		freeb(bp);
-		error(Etoosmall);
-	}
-
-	return etheroq(ether, bp);
-}
-
-static struct {
-	char*	type;
-	int	(*reset)(Ether*);
-} cards[MaxEther+1];
-
-void
-addethercard(char* t, int (*r)(Ether*))
-{
-	static int ncard;
-
-	if(ncard == MaxEther)
-		panic("too many ether cards");
-	cards[ncard].type = t;
-	cards[ncard].reset = r;
-	ncard++;
-}
-
-int
-parseether(uchar *to, char *from)
-{
-	char nip[4];
-	char *p;
-	int i;
-
-	p = from;
-	for(i = 0; i < Eaddrlen; i++){
-		if(*p == 0)
-			return -1;
-		nip[0] = *p++;
-		if(*p == 0)
-			return -1;
-		nip[1] = *p++;
-		nip[2] = 0;
-		to[i] = strtoul(nip, 0, 16);
-		if(*p == ':')
-			p++;
-	}
-	return 0;
-}
-
-static void
-etherreset(void)
-{
-	Ether *ether;
-	int i, n, ctlrno;
-	char name[32], buf[256];
-
-	for(ether = 0, ctlrno = 0; ctlrno < MaxEther; ctlrno++){
-		if(ether == 0)
-			ether = malloc(sizeof(Ether));
-		memset(ether, 0, sizeof(Ether));
-		ether->ctlrno = ctlrno;
-		ether->tbdf = BUSUNKNOWN;
-		ether->mbps = 10;
-		ether->minmtu = ETHERMINTU;
-		ether->maxmtu = ETHERMAXTU;
-		if(isaconfig("ether", ctlrno, ether) == 0)
-			continue;
-		for(n = 0; cards[n].type; n++){
-			if(cistrcmp(cards[n].type, ether->type))
-				continue;
-			for(i = 0; i < ether->nopt; i++){
-				if(strncmp(ether->opt[i], "ea=", 3))
-					continue;
-				if(parseether(ether->ea, &ether->opt[i][3]))
-					memset(ether->ea, 0, Eaddrlen);
-			}
-			if(cards[n].reset(ether))
-				break;
-
-			/*
-			 * IRQ2 doesn't really exist, it's used to gang the interrupt
-			 * controllers together. A device set to IRQ2 will appear on
-			 * the second interrupt controller as IRQ9.
-			 */
-			if(ether->irq == 2 && BUSTYPE(ether->tbdf) != BusPCI)
-				ether->irq = 9;
-			snprint(name, sizeof(name), "ether%d", ctlrno);
-			/*
-			 * If ether->irq is 0, it is a hack to indicate no
-			 * interrupt used by ethersink.
-			 */
-			if(ether->irq > 0)
-				intrenable(ether->irq, ether->interrupt,
-					ether, ether->tbdf, name);
-
-			i = sprint(buf, "#l%d (%s): %s: %dMbps port 0x%luX irq %lud",
-				ctlrno, name, ether->type, ether->mbps,
-				ether->port, ether->irq);
-			if(ether->mem)
-				i += sprint(buf+i, " addr 0x%luX", PADDR(ether->mem));
-			if(ether->size)
-				i += sprint(buf+i, " size 0x%luX", ether->size);
-			i += sprint(buf+i, ": %2.2uX%2.2uX%2.2uX%2.2uX%2.2uX%2.2uX",
-				ether->ea[0], ether->ea[1], ether->ea[2],
-				ether->ea[3], ether->ea[4], ether->ea[5]);
-			sprint(buf+i, "\n");
-			print(buf);
-
-			if(ether->mbps == 100){
-				netifinit(ether, name, Ntypes, 256*1024);
-				if(ether->oq == 0)
-					ether->oq = qopen(256*1024, Qmsg, 0, 0);
-			}
-			else{
-				netifinit(ether, name, Ntypes, 65*1024);
-				if(ether->oq == 0)
-					ether->oq = qopen(65*1024, Qmsg, 0, 0);
-			}
-			if(ether->oq == 0)
-				panic("etherreset %s", name);
-			ether->alen = Eaddrlen;
-			memmove(ether->addr, ether->ea, Eaddrlen);
-			memset(ether->bcast, 0xFF, Eaddrlen);
-
-			etherxx[ctlrno] = ether;
-			ether = 0;
-			break;
-		}
-	}
-	if(ether)
-		free(ether);
-}
-
-/* imported from ../pc; not ready for use yet */
-static void
-ethershutdown(void)
-{
-	Ether *ether;
-	int i;
-
-	for(i = 0; i < MaxEther; i++){
-		ether = etherxx[i];
-		if(ether == nil)
-			continue;
-		if(ether->shutdown == nil) {
-			print("#l%d: no shutdown fuction\n", i);
-			continue;
-		}
-		(*ether->shutdown)(ether);
-	}
-}
-
-
-#define POLY 0xedb88320
-
-/* really slow 32 bit crc for ethers */
-ulong
-ethercrc(uchar *p, int len)
-{
-	int i, j;
-	ulong crc, b;
-
-	crc = 0xffffffff;
-	for(i = 0; i < len; i++){
-		b = *p++;
-		for(j = 0; j < 8; j++){
-			crc = (crc>>1) ^ (((crc^b) & 1) ? POLY : 0);
-			b >>= 1;
-		}
-	}
-	return crc;
-}
-
-Dev etherdevtab = {
-	'l',
-	"ether",
-
-	etherreset,
-	devinit,
-	devshutdown,
-	etherattach,
-	etherwalk,
-	etherstat,
-	etheropen,
-	ethercreate,
-	etherclose,
-	etherread,
-	etherbread,
-	etherwrite,
-	etherbwrite,
-	devremove,
-	etherwstat,
-};
+#include "../pc/devether.c"

+ 0 - 50
sys/src/9/alphapc/errstr.h

@@ -1,50 +0,0 @@
-char Enoerror[] = "no error";
-char Emount[] = "inconsistent mount";
-char Eunmount[] = "not mounted";
-char Eunion[] = "not in union";
-char Emountrpc[] = "mount rpc error";
-char Eshutdown[] = "device shut down";
-char Enocreate[] = "mounted directory forbids creation";
-char Enonexist[] = "file does not exist";
-char Eexist[] = "file already exists";
-char Ebadsharp[] = "unknown device in # filename";
-char Enotdir[] = "not a directory";
-char Eisdir[] = "file is a directory";
-char Ebadchar[] = "bad character in file name";
-char Efilename[] = "file name syntax";
-char Eperm[] = "permission denied";
-char Ebadusefd[] = "inappropriate use of fd";
-char Ebadarg[] = "bad arg in system call";
-char Einuse[] = "device or object already in use";
-char Eio[] = "i/o error";
-char Etoobig[] = "read or write too large";
-char Etoosmall[] = "read or write too small";
-char Enoport[] = "network port not available";
-char Ehungup[] = "i/o on hungup channel";
-char Ebadctl[] = "bad process or channel control request";
-char Enodev[] = "no free devices";
-char Eprocdied[] = "process exited";
-char Enochild[] = "no living children";
-char Eioload[] = "i/o error in demand load";
-char Enovmem[] = "virtual memory allocation failed";
-char Ebadfd[] = "fd out of range or not open";
-char Enofd[] = "no free file descriptors";
-char Eisstream[] = "seek on a stream";
-char Ebadexec[] = "exec header invalid";
-char Etimedout[] = "connection timed out";
-char Econrefused[] = "connection refused";
-char Econinuse[] = "connection in use";
-char Eintr[] = "interrupted";
-char Enomem[] = "kernel allocate failed";
-char Enoswap[] = "swap space full";
-char Esoverlap[] = "segments overlap";
-char Emouseset[] = "mouse type already set";
-char Eshort[] = "i/o count too small";
-char Egreg[] = "ken has left the building";
-char Ebadspec[] = "bad attach specifier";
-char Enoreg[] = "process has no saved registers";
-char Enoattach[] = "mount/attach disallowed";
-char Eshortstat[] = "stat buffer too small";
-char Ebadstat[] = "malformed stat buffer";
-char Enegoff[] = "negative i/o offset";
-char Ecmdargs[] = "wrong #args in control message";

+ 0 - 51
sys/src/9/bitsy/errstr.h

@@ -1,51 +0,0 @@
-char Enoerror[] = "no error";
-char Emount[] = "inconsistent mount";
-char Eunmount[] = "not mounted";
-char Eismtpt[] = "is a mount point";
-char Eunion[] = "not in union";
-char Emountrpc[] = "mount rpc error";
-char Eshutdown[] = "device shut down";
-char Enocreate[] = "mounted directory forbids creation";
-char Enonexist[] = "file does not exist";
-char Eexist[] = "file already exists";
-char Ebadsharp[] = "unknown device in # filename";
-char Enotdir[] = "not a directory";
-char Eisdir[] = "file is a directory";
-char Ebadchar[] = "bad character in file name";
-char Efilename[] = "file name syntax";
-char Eperm[] = "permission denied";
-char Ebadusefd[] = "inappropriate use of fd";
-char Ebadarg[] = "bad arg in system call";
-char Einuse[] = "device or object already in use";
-char Eio[] = "i/o error";
-char Etoobig[] = "read or write too large";
-char Etoosmall[] = "read or write too small";
-char Enoport[] = "network port not available";
-char Ehungup[] = "i/o on hungup channel";
-char Ebadctl[] = "bad process or channel control request";
-char Enodev[] = "no free devices";
-char Eprocdied[] = "process exited";
-char Enochild[] = "no living children";
-char Eioload[] = "i/o error in demand load";
-char Enovmem[] = "virtual memory allocation failed";
-char Ebadfd[] = "fd out of range or not open";
-char Enofd[] = "no free file descriptors";
-char Eisstream[] = "seek on a stream";
-char Ebadexec[] = "exec header invalid";
-char Etimedout[] = "connection timed out";
-char Econrefused[] = "connection refused";
-char Econinuse[] = "connection in use";
-char Eintr[] = "interrupted";
-char Enomem[] = "kernel allocate failed";
-char Enoswap[] = "swap space full";
-char Esoverlap[] = "segments overlap";
-char Emouseset[] = "mouse type already set";
-char Eshort[] = "i/o count too small";
-char Egreg[] = "ken has left the building";
-char Ebadspec[] = "bad attach specifier";
-char Enoreg[] = "process has no saved registers";
-char Enoattach[] = "mount/attach disallowed";
-char Eshortstat[] = "stat buffer too small";
-char Ebadstat[] = "malformed stat buffer";
-char Enegoff[] = "negative i/o offset";
-char Ecmdargs[] = "wrong #args in control message";

+ 2 - 1
sys/src/9/bitsy/l.s

@@ -167,7 +167,8 @@ TEXT putttb(SB), $-4
  */
 TEXT mmuenable(SB), $-4
 	MRC	CpMMU, 0, R0, C(CpControl), C(0x0)
-	ORR	$(CpCmmuena|CpCdcache|CpCicache|CpCwb), R0
+	ORR	$(CpCmmuena|CpCdcache|CpCicache|CpCwb|CpCsystem), R0
+	BIC	$(CpCrom), R0
 	MCR     CpMMU, 0, R0, C(CpControl), C(0x0)
 	MOVW R0, R0
 	MOVW R0, R0

+ 1 - 1
sys/src/9/bitsy/mem.h

@@ -150,7 +150,7 @@
  *  Internal MMU coprocessor registers
  */
 #define CpCPUID		0		/* R: */
-#define CpControl	1		/* R: */
+#define CpControl	1		/* RW: */
 #define CpTTB		2		/* RW: translation table base */
 #define CpDAC		3		/* RW: domain access control */
 #define CpFSR		5		/* RW: fault status */

+ 1 - 0
sys/src/9/bitsy/mmu.c

@@ -27,6 +27,7 @@ enum
 	L1Buffered=	(1<<2),
 	L1DomShift=	5,
 	L1Domain0=	(0<<L1DomShift),
+	L1KernelRO=	(0x0<<10),
 	L1KernelRW=	(0x1<<10),
 	L1UserRO=	(0x2<<10),
 	L1UserRW=	(0x3<<10),

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

@@ -1775,7 +1775,7 @@ scsirio(SDreq* r)
 
 			while(waserror())
 				;
-			tsleep(&r->unit->rendez, return0, 0, 500);
+			tsleep(&up->sleep, return0, 0, 500);
 			poperror();
 			scsitest(r);
 			return 2;

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

@@ -434,7 +434,7 @@ trap(Ureg *ureg)
 				postnote(up, 1, buf, NDebug);
 			}
 		}else{
-			warnregs(ureg, "undefined instruction");
+			iprint("undefined instruction: pc=0x%lux, inst=0x%lux, 0x%lux, 0x%lux, 0x%lux, 0x%lux\n", ureg->pc, ((ulong*)ureg->pc)[-2], ((ulong*)ureg->pc)[-1], ((ulong*)ureg->pc)[0], ((ulong*)ureg->pc)[1], ((ulong*)ureg->pc)[2]);
 			panic("undefined instruction");
 		}
 		break;

+ 0 - 1
sys/src/9/boot/boot.c

@@ -44,7 +44,6 @@ boot(int argc, char *argv[])
 	bind("#ec", "/env", MREPL|MCREATE);
 	bind("#e", "/env", MAFTER);
 	bind("#s", "/srv", MREPL|MCREATE);
-
 #ifdef DEBUG
 	print("argc=%d\n", argc);
 	for(fd = 0; fd < argc; fd++)

+ 2 - 0
sys/src/9/boot/boot.h

@@ -70,5 +70,7 @@ extern int	connectpaq(void);
 extern void	configembed(Method*);
 extern int	connectembed(void);
 
+extern void	configip(void);
+
 /* hack for passing authentication address */
 extern char	*authaddr;

+ 1 - 0
sys/src/9/boot/bootip.c

@@ -56,6 +56,7 @@ configip(void)
 	bind("#l3", mpoint, MAFTER);
 	werrstr("");
 
+	print("ip...");
 	/* let ipconfig configure the ip interface */
 	switch(pid = fork()){
 	case -1:

+ 1 - 2
sys/src/9/ip/igmp.c

@@ -59,7 +59,6 @@ struct IGMP
 {
 	Lock;
 	Rendez	r;
-	Rendez	r0;
 	IGMPrep	*reports;
 };
 
@@ -159,7 +158,7 @@ igmpproc(void *a)
 				continue;
 			}
 
-			tsleep(&igmpalloc.r0, return0, 0, MSPTICK);
+			tsleep(&up->sleep, return0, 0, MSPTICK);
 		}
 		unlock(&igmpalloc);
 	}

+ 1 - 5
sys/src/9/ip/il.c

@@ -195,8 +195,6 @@ struct Ilpriv
 	ulong	dup;
 	ulong	dupb;
 
-	Rendez	ilr;
-
 	/* keeping track of the ack kproc */
 	int	ackprocstarted;
 	QLock	apl;
@@ -1127,13 +1125,11 @@ ilackproc(void *x)
 	Ilcb *ic;
 	Conv **s, *p;
 	Proto *il;
-	Ilpriv *ipriv;
 
 	il = x;
-	ipriv = il->priv;
 
 loop:
-	tsleep(&ipriv->ilr, return0, 0, Iltickms);
+	tsleep(&up->sleep, return0, 0, Iltickms);
 	for(s = il->conv; s && *s; s++) {
 		p = *s;
 		ic = (Ilcb*)p->ptcl;

+ 2 - 1
sys/src/9/ip/loopbackmedium.c

@@ -29,8 +29,9 @@ loopbackbind(Ipifc *ifc, int, char**)
 
 	lb = smalloc(sizeof(*lb));
 	lb->f = ifc->conv->p->f;
-	lb->q = qopen(128*1024, Qmsg, nil, nil);
+	lb->q = qopen(1024*1024, Qmsg, nil, nil);
 	ifc->arg = lb;
+	ifc->mbps = 1000;
 
 	kproc("loopbackread", loopbackread, ifc);
 

+ 33 - 35
sys/src/9/ip/rudp.c

@@ -30,6 +30,7 @@ enum
 	UDP_RHDRSIZE	= 36,	/* pseudo header + udp header + rudp header */
 	UDP_IPHDR	= 8,	/* ip header */
 	IP_UDPPROTO	= 254,
+	UDP_USEAD7	= 52,
 	UDP_USEAD6	= 36,
 	UDP_USEAD4	= 12,
 
@@ -146,7 +147,6 @@ struct Rudpstats
 typedef struct Rudppriv Rudppriv;
 struct Rudppriv
 {
-	Rendez	vous;
 	Ipht	ht;
 
 	/* MIB counters */
@@ -358,9 +358,9 @@ rudpkick(void *x)
 
 	ucb = (Rudpcb*)c->ptcl;
 	switch(ucb->headers) {
-	case 6:
+	case 7:
 		/* get user specified addresses */
-		bp = pullupblock(bp, UDP_USEAD6);
+		bp = pullupblock(bp, UDP_USEAD7);
 		if(bp == nil)
 			return;
 		ipmove(raddr, bp->rp);
@@ -370,18 +370,20 @@ rudpkick(void *x)
 		/* pick interface closest to dest */
 		if(ipforme(f, laddr) != Runi)
 			findlocalip(f, laddr, raddr);
+		bp->rp += IPaddrlen;		/* Ignore ifc address */
 		rport = nhgets(bp->rp);
-
-		bp->rp += 4;			/* Igonore local port */
+		bp->rp += 2+2;			/* Ignore local port */
 		break;
-	case 4:
-		bp = pullupblock(bp, UDP_USEAD4);
+	case 6:
+		/* get user specified addresses */
+		bp = pullupblock(bp, UDP_USEAD6);
 		if(bp == nil)
 			return;
-		v4tov6(raddr, bp->rp);
-		bp->rp += IPv4addrlen;
-		v4tov6(laddr, bp->rp);
-		bp->rp += IPv4addrlen;
+		ipmove(raddr, bp->rp);
+		bp->rp += IPaddrlen;
+		ipmove(laddr, bp->rp);
+		bp->rp += IPaddrlen;
+		/* pick interface closest to dest */
 		if(ipforme(f, laddr) != Runi)
 			findlocalip(f, laddr, raddr);
 		rport = nhgets(bp->rp);
@@ -415,8 +417,8 @@ rudpkick(void *x)
 	uh->frag[1] = 0;
 	hnputs(uh->udpplen, ptcllen);
 	switch(ucb->headers){
-	case 4:
 	case 6:
+	case 7:
 		v6tov4(uh->udpdst, raddr);
 		hnputs(uh->udpdport, rport);
 		v6tov4(uh->udpsrc, laddr);
@@ -488,6 +490,7 @@ rudpiput(Proto *rudp, Ipifc *ifc, Block *bp)
 	ushort rport, lport;
 	Rudppriv *upriv;
 	Fs *f;
+	uchar *p;
 
 	upriv = rudp->priv;
 	f = rudp->f;
@@ -565,27 +568,24 @@ rudpiput(Proto *rudp, Ipifc *ifc, Block *bp)
 		raddr, rport, laddr, lport, len);
 
 	switch(ucb->headers){
-	case 6:
+	case 7:
 		/* pass the src address */
-		bp = padblock(bp, UDP_USEAD6);
-		ipmove(bp->rp, raddr);
-		if(ipforme(f, laddr) == Runi)
-			ipmove(bp->rp+IPaddrlen, laddr);
-		else
-			ipmove(bp->rp+IPaddrlen, ifc->lifc->local);
-		hnputs(bp->rp+2*IPaddrlen, rport);
-		hnputs(bp->rp+2*IPaddrlen+2, lport);
+		bp = padblock(bp, UDP_USEAD7);
+		p = bp->rp;
+		ipmove(p, raddr); p += IPaddrlen;
+		ipmove(p, laddr); p += IPaddrlen;
+		ipmove(p, ifc->lifc->local); p += IPaddrlen;
+		hnputs(p, rport); p += 2;
+		hnputs(p, lport);
 		break;
-	case 4:
+	case 6:
 		/* pass the src address */
-		bp = padblock(bp, UDP_USEAD4);
-		v6tov4(bp->rp, raddr);
-		if(ipforme(f, laddr) == Runi)
-			v6tov4(bp->rp+IPv4addrlen, laddr);
-		else
-			v6tov4(bp->rp+IPv4addrlen, ifc->lifc->local);
-		hnputs(bp->rp + 2*IPv4addrlen, rport);
-		hnputs(bp->rp + 2*IPv4addrlen + 2, lport);
+		bp = padblock(bp, UDP_USEAD6);
+		p = bp->rp;
+		ipmove(p, raddr); p += IPaddrlen;
+		ipmove(p, ipforme(f, laddr)==Runi ? laddr : ifc->lifc->local); p += IPaddrlen;
+		hnputs(p, rport); p += 2;
+		hnputs(p, lport);
 		break;
 	default:
 		/* connection oriented rudp */
@@ -629,8 +629,8 @@ rudpctl(Conv *c, char **f, int n)
 	if(n < 1)
 		return rudpunknown;
 
-	if(strcmp(f[0], "headers4") == 0){
-		ucb->headers = 4;
+	if(strcmp(f[0], "headers++4") == 0){
+		ucb->headers = 7;
 		return nil;
 	} else if(strcmp(f[0], "headers") == 0){
 		ucb->headers = 6;
@@ -760,13 +760,11 @@ relackproc(void *a)
 	Proto *rudp;
 	Reliable *r;
 	Conv **s, *c;
-	Rudppriv *upriv;
 
 	rudp = (Proto *)a;
-	upriv = rudp->priv;
 
 loop:
-	tsleep(&upriv->vous, return0, 0, Rudptickms);
+	tsleep(&up->sleep, return0, 0, Rudptickms);
 
 	for(s = rudp->conv; *s; s++) {
 		c = *s;

+ 1 - 3
sys/src/9/ip/tcp.c

@@ -336,8 +336,6 @@ struct Tcppriv
 	QLock 	tl;
 	Tcptimer *timers;
 
-	Rendez	tcpr;			/* used by tcpackproc */
-
 	/* hash table for matching conversations */
 	Ipht	ht;
 
@@ -645,7 +643,7 @@ tcpackproc(void *a)
 	priv = tcp->priv;
 
 	for(;;) {
-		tsleep(&priv->tcpr, return0, 0, MSPTICK);
+		tsleep(&up->sleep, return0, 0, MSPTICK);
 
 		qlock(&priv->tl);
 		timeo = nil;

+ 36 - 38
sys/src/9/ip/udp.c

@@ -23,8 +23,8 @@ enum
 	UDP6_PHDR_OFF = 0,
 
 	IP_UDPPROTO	= 17,
+	UDP_USEAD7	= 52,
 	UDP_USEAD6	= 36,
-	UDP_USEAD4	= 12,
 
 	Udprxms		= 200,
 	Udptickms	= 100,
@@ -199,9 +199,9 @@ udpkick(void *x, Block *bp)
 
 	ucb = (Udpcb*)c->ptcl;
 	switch(ucb->headers) {
-	case 6:
+	case 7:
 		/* get user specified addresses */
-		bp = pullupblock(bp, UDP_USEAD6);
+		bp = pullupblock(bp, UDP_USEAD7);
 		if(bp == nil)
 			return;
 		ipmove(raddr, bp->rp);
@@ -211,37 +211,37 @@ udpkick(void *x, Block *bp)
 		/* pick interface closest to dest */
 		if(ipforme(f, laddr) != Runi)
 			findlocalip(f, laddr, raddr);
+		bp->rp += IPaddrlen;		/* Ignore ifc address */
 		rport = nhgets(bp->rp);
 		bp->rp += 2+2;			/* Ignore local port */
 		break;
-	case 4:
-		bp = pullupblock(bp, UDP_USEAD4);
+	case 6:
+		/* get user specified addresses */
+		bp = pullupblock(bp, UDP_USEAD6);
 		if(bp == nil)
 			return;
-		v4tov6(raddr, bp->rp);
-		bp->rp += IPv4addrlen;
-		v4tov6(laddr, bp->rp);
-		bp->rp += IPv4addrlen;
+		ipmove(raddr, bp->rp);
+		bp->rp += IPaddrlen;
+		ipmove(laddr, bp->rp);
+		bp->rp += IPaddrlen;
+		/* pick interface closest to dest */
 		if(ipforme(f, laddr) != Runi)
 			findlocalip(f, laddr, raddr);
 		rport = nhgets(bp->rp);
-		bp->rp += 2+2;
+		bp->rp += 2+2;			/* Ignore local port */
 		break;
 	default:
 		rport = 0;
 		break;
 	}
 
-	if(ucb->headers == 6) {
+	if(ucb->headers) {
 		if(memcmp(laddr, v4prefix, IPv4off) == 0 ||
 		    ipcmp(laddr, IPnoaddr) == 0)
 			version = 4;
 		else
 			version = 6;
-	}
-	else if(ucb->headers == 4)
-		version = 4;
-	else {
+	} else {
 		if( (memcmp(c->raddr, v4prefix, IPv4off) == 0 &&
 			memcmp(c->laddr, v4prefix, IPv4off) == 0)
 			|| ipcmp(c->raddr, IPnoaddr) == 0)
@@ -266,7 +266,7 @@ udpkick(void *x, Block *bp)
 		uh4->frag[0] = 0;
 		uh4->frag[1] = 0;
 		hnputs(uh4->udpplen, ptcllen);
-		if(ucb->headers == 4 || ucb->headers == 6) {
+		if(ucb->headers) {
 			v6tov4(uh4->udpdst, raddr);
 			hnputs(uh4->udpdport, rport);
 			v6tov4(uh4->udpsrc, laddr);
@@ -301,7 +301,7 @@ udpkick(void *x, Block *bp)
 		ptcllen = dlen + UDP_UDPHDR_SZ;
 		hnputl(uh6->viclfl, ptcllen);
 		uh6->hoplimit = IP_UDPPROTO;
-		if(ucb->headers == 6) {
+		if(ucb->headers) {
 			ipmove(uh6->udpdst, raddr);
 			hnputs(uh6->udpdport, rport);
 			ipmove(uh6->udpsrc, laddr);
@@ -347,6 +347,7 @@ udpiput(Proto *udp, Ipifc *ifc, Block *bp)
 	Fs *f;
 	int version;
 	int ottl, oviclfl, olen;
+	uchar *p;
 
 	upriv = udp->priv;
 	f = udp->f;
@@ -494,27 +495,24 @@ udpiput(Proto *udp, Ipifc *ifc, Block *bp)
 	       laddr, lport, len);
 
 	switch(ucb->headers){
-	case 6:
+	case 7:
 		/* pass the src address */
-		bp = padblock(bp, UDP_USEAD6);
-		ipmove(bp->rp, raddr);
-		if(ipforme(f, laddr) == Runi)
-			ipmove(bp->rp+IPaddrlen, laddr);
-		else
-			ipmove(bp->rp+IPaddrlen, ifc->lifc->local);
-		hnputs(bp->rp+2*IPaddrlen, rport);
-		hnputs(bp->rp+2*IPaddrlen+2, lport);
+		bp = padblock(bp, UDP_USEAD7);
+		p = bp->rp;
+		ipmove(p, raddr); p += IPaddrlen;
+		ipmove(p, laddr); p += IPaddrlen;
+		ipmove(p, ifc->lifc->local); p += IPaddrlen;
+		hnputs(p, rport); p += 2;
+		hnputs(p, lport);
 		break;
-	case 4:
+	case 6:
 		/* pass the src address */
-		bp = padblock(bp, UDP_USEAD4);
-		v6tov4(bp->rp, raddr);
-		if(ipforme(f, laddr) == Runi)
-			v6tov4(bp->rp+IPv4addrlen, laddr);
-		else
-			v6tov4(bp->rp+IPv4addrlen, ifc->lifc->local);
-		hnputs(bp->rp + 2*IPv4addrlen, rport);
-		hnputs(bp->rp + 2*IPv4addrlen + 2, lport);
+		bp = padblock(bp, UDP_USEAD6);
+		p = bp->rp;
+		ipmove(p, raddr); p += IPaddrlen;
+		ipmove(p, ipforme(f, laddr)==Runi ? laddr : ifc->lifc->local); p += IPaddrlen;
+		hnputs(p, rport); p += 2;
+		hnputs(p, lport);
 		break;
 	}
 
@@ -541,11 +539,11 @@ udpctl(Conv *c, char **f, int n)
 
 	ucb = (Udpcb*)c->ptcl;
 	if(n == 1){
-		if(strcmp(f[0], "headers4") == 0){
-			ucb->headers = 4;
+		if(strcmp(f[0], "oldheaders") == 0){
+			ucb->headers = 6;
 			return nil;
 		} else if(strcmp(f[0], "headers") == 0){
-			ucb->headers = 6;
+			ucb->headers = 7;
 			return nil;
 		}
 	}

+ 0 - 50
sys/src/9/mtx/errstr.h

@@ -1,50 +0,0 @@
-char Enoerror[] = "no error";
-char Emount[] = "inconsistent mount";
-char Eunmount[] = "not mounted";
-char Eunion[] = "not in union";
-char Emountrpc[] = "mount rpc error";
-char Eshutdown[] = "device shut down";
-char Enocreate[] = "mounted directory forbids creation";
-char Enonexist[] = "file does not exist";
-char Eexist[] = "file already exists";
-char Ebadsharp[] = "unknown device in # filename";
-char Enotdir[] = "not a directory";
-char Eisdir[] = "file is a directory";
-char Ebadchar[] = "bad character in file name";
-char Efilename[] = "file name syntax";
-char Eperm[] = "permission denied";
-char Ebadusefd[] = "inappropriate use of fd";
-char Ebadarg[] = "bad arg in system call";
-char Einuse[] = "device or object already in use";
-char Eio[] = "i/o error";
-char Etoobig[] = "read or write too large";
-char Etoosmall[] = "read or write too small";
-char Enoport[] = "network port not available";
-char Ehungup[] = "i/o on hungup channel";
-char Ebadctl[] = "bad process or channel control request";
-char Enodev[] = "no free devices";
-char Eprocdied[] = "process exited";
-char Enochild[] = "no living children";
-char Eioload[] = "i/o error in demand load";
-char Enovmem[] = "virtual memory allocation failed";
-char Ebadfd[] = "fd out of range or not open";
-char Enofd[] = "no free file descriptors";
-char Eisstream[] = "seek on a stream";
-char Ebadexec[] = "exec header invalid";
-char Etimedout[] = "connection timed out";
-char Econrefused[] = "connection refused";
-char Econinuse[] = "connection in use";
-char Eintr[] = "interrupted";
-char Enomem[] = "kernel allocate failed";
-char Enoswap[] = "swap space full";
-char Esoverlap[] = "segments overlap";
-char Emouseset[] = "mouse type already set";
-char Eshort[] = "i/o count too small";
-char Egreg[] = "ken has left the building";
-char Ebadspec[] = "bad attach specifier";
-char Enoreg[] = "process has no saved registers";
-char Enoattach[] = "mount/attach disallowed";
-char Eshortstat[] = "stat buffer too small";
-char Ebadstat[] = "malformed stat buffer";
-char Enegoff[] = "negative i/o offset";
-char Ecmdargs[] = "wrong #args in control message";

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

@@ -96,6 +96,9 @@ syncclock(void)
 {
 	uvlong x;
 
+	if(arch->fastclock != tscticks)
+		return;
+
 	if(m->machno == 0){
 		wrmsr(0x10, 0);
 		m->tscticks = 0;
@@ -130,6 +133,6 @@ PCArch archmp = {
 .reset=		mpshutdown,
 .intrinit=	mpinit,
 .intrenable=	mpintrenable,
-.fastclock=	tscticks,
+.fastclock=	i8253read,
 .timerset=	lapictimerset,
 };

+ 10 - 7
sys/src/9/pc/devarch.c

@@ -55,7 +55,7 @@ int narchdir = Qbase;
 int (*_pcmspecial)(char*, ISAConf*);
 void (*_pcmspecialclose)(int);
 
-extern int i8253dotimerset;
+static int dotimerset = 1;
 
 /*
  * Add a file to the #P listing.  Once added, you can't delete it.
@@ -111,9 +111,9 @@ ioinit(void)
 	ioalloc(0x10000, 1, 0, "dummy");
 	/*
 	 * Someone needs to explain why this was here...
+	 */
 	ioalloc(0x0fff, 1, 0, "dummy");	// i82557 is at 0x1000, the dummy
 					// entry is needed for swappable devs.
-	 */
 
 	if ((excluded = getconf("ioexclude")) != nil) {
 		char *s;
@@ -754,6 +754,7 @@ archctlread(Chan*, void *a, long nn, vlong offset)
 	n += snprint(buf+n, sizeof buf-n, "pge %s\n", getcr4()&0x80 ? "on" : "off");
 	n += snprint(buf+n, sizeof buf-n, "coherence %s\n",
 		coherence==wbflush ? "wbflush" : "nop");
+	n += snprint(buf+n, sizeof buf-n, "timerset %s\n", dotimerset ? "on" : "off");
 	buf[n] = 0;
 	return readstr(offset, a, nn, buf);
 }
@@ -808,10 +809,11 @@ archctlwrite(Chan*, void *a, long n, vlong)
 		break;
 	case CMi8253set:
 		if(strcmp(cb->f[1], "on") == 0)
-			i8253dotimerset = 1;
-		else if(strcmp(cb->f[1], "off") == 0)
-			i8253dotimerset = 0;
-		else
+			dotimerset = 1;
+		else if(strcmp(cb->f[1], "off") == 0){
+			dotimerset = 0;
+			(*arch->timerset)(0);
+		}else
 			cmderror(cb, "invalid i2853set ctl");
 		break;
 	}
@@ -895,5 +897,6 @@ fastticks(uvlong *hz)
 void
 timerset(uvlong x)
 {
-	(*arch->timerset)(x);
+	if(dotimerset)
+		(*arch->timerset)(x);
 }

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

@@ -509,7 +509,7 @@ floppykproc(void *)
 				qunlock(&fl);
 			}
 		}
-		tsleep(&fl.kr, return0, 0, 1000);
+		tsleep(&up->sleep, return0, 0, 1000);
 	}
 }
 
@@ -531,7 +531,7 @@ floppyon(FDrive *dp)
 	outb(Pdor, fl.motor | Fintena | Fena | dp->dev);
 	if(!alreadyon){
 		/* wait for drive to spin up */
-		tsleep(&dp->r, return0, 0, 750);
+		tsleep(&up->sleep, return0, 0, 750);
 
 		/* clear any pending interrupts */
 		floppysense();

+ 0 - 50
sys/src/9/pc/errstr.h

@@ -1,50 +0,0 @@
-char Enoerror[] = "no error";
-char Emount[] = "inconsistent mount";
-char Eunmount[] = "not mounted";
-char Eunion[] = "not in union";
-char Emountrpc[] = "mount rpc error";
-char Eshutdown[] = "device shut down";
-char Enocreate[] = "mounted directory forbids creation";
-char Enonexist[] = "file does not exist";
-char Eexist[] = "file already exists";
-char Ebadsharp[] = "unknown device in # filename";
-char Enotdir[] = "not a directory";
-char Eisdir[] = "file is a directory";
-char Ebadchar[] = "bad character in file name";
-char Efilename[] = "file name syntax";
-char Eperm[] = "permission denied";
-char Ebadusefd[] = "inappropriate use of fd";
-char Ebadarg[] = "bad arg in system call";
-char Einuse[] = "device or object already in use";
-char Eio[] = "i/o error";
-char Etoobig[] = "read or write too large";
-char Etoosmall[] = "read or write too small";
-char Enoport[] = "network port not available";
-char Ehungup[] = "i/o on hungup channel";
-char Ebadctl[] = "bad process or channel control request";
-char Enodev[] = "no free devices";
-char Eprocdied[] = "process exited";
-char Enochild[] = "no living children";
-char Eioload[] = "i/o error in demand load";
-char Enovmem[] = "virtual memory allocation failed";
-char Ebadfd[] = "fd out of range or not open";
-char Enofd[] = "no free file descriptors";
-char Eisstream[] = "seek on a stream";
-char Ebadexec[] = "exec header invalid";
-char Etimedout[] = "connection timed out";
-char Econrefused[] = "connection refused";
-char Econinuse[] = "connection in use";
-char Eintr[] = "interrupted";
-char Enomem[] = "kernel allocate failed";
-char Enoswap[] = "swap space full";
-char Esoverlap[] = "segments overlap";
-char Emouseset[] = "mouse type already set";
-char Eshort[] = "i/o count too small";
-char Egreg[] = "ken has left the building";
-char Ebadspec[] = "bad attach specifier";
-char Enoreg[] = "process has no saved registers";
-char Enoattach[] = "mount/attach disallowed";
-char Eshortstat[] = "stat buffer too small";
-char Ebadstat[] = "malformed stat buffer";
-char Enegoff[] = "negative i/o offset";
-char Ecmdargs[] = "wrong #args in control message";

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

@@ -636,6 +636,8 @@ static struct {
 } rtl8139pci[] = {
 	{ "rtl8139",	(0x8139<<16)|0x10EC, },	/* generic */
 	{ "smc1211",	(0x1211<<16)|0x1113, },	/* SMC EZ-Card */
+	{ "dfe-538tx",	(0x1300<<16)|0x1186, }, /* D-Link DFE-538TX */
+	{ "dfe-560txd",	(0x1340<<16)|0x1186, }, /* D-Link DFE-560TXD */
 	{ nil },
 };
 

+ 3 - 7
sys/src/9/pc/ether82543gc.c

@@ -377,7 +377,6 @@ typedef struct Ctlr {
 	Block*	tb[Ntdesc];		/* transmit buffers */
 	int	tdh;			/* transmit descriptor head */
 	int	tdt;			/* transmit descriptor tail */
-	Rendez	timer;			/* watchdog timer */
 	int	txstalled;		/* count of times unable to send */
 
 	int	txcw;
@@ -1228,8 +1227,7 @@ gc82543watchdog(void* arg)
 
 	edev = arg;
 	for(;;){
-		ctlr = edev->ctlr;
-		tsleep(&ctlr->timer, return0, 0, 1000);
+		tsleep(&up->sleep, return0, 0, 1000);
 
 		ctlr = edev->ctlr;