Browse Source

Plan 9 from Bell Labs 2006-11-08

David du Colombier 14 years ago
parent
commit
f3029d7f69

+ 16 - 15
dist/replica/_plan9.db

@@ -5436,7 +5436,7 @@ rc/bin/diffy - 775 sys sys 1140694870 277
 rc/bin/dircp - 775 sys sys 1107836261 193
 rc/bin/doc2ps - 775 sys sys 1069793831 244
 rc/bin/doc2txt - 775 sys sys 1025197880 563
-rc/bin/doctype - 775 sys sys 945617206 1726
+rc/bin/doctype - 775 sys sys 1162921755 1727
 rc/bin/dosmnt - 775 sys sys 1109288224 303
 rc/bin/eject - 775 sys sys 945617207 123
 rc/bin/fax - 775 sys sys 1127394677 2385
@@ -7559,7 +7559,7 @@ sys/man/2/symbol - 664 sys sys 950892874 9423
 sys/man/2/thread - 664 sys sys 1117034202 11640
 sys/man/2/time - 664 sys sys 1015091527 739
 sys/man/2/tmpfile - 664 sys sys 1048637161 1157
-sys/man/2/wait - 664 sys sys 1015091528 2481
+sys/man/2/wait - 664 sys sys 1162948415 2507
 sys/man/2/window - 664 sys sys 950593499 5522
 sys/man/3 - 20000000775 sys sys 1017251174 0
 sys/man/3/0intro - 664 sys sys 984709634 1873
@@ -7632,7 +7632,7 @@ sys/man/4/rdbfs - 664 sys sys 944959699 1123
 sys/man/4/rio - 664 sys sys 1023206844 8660
 sys/man/4/sacfs - 664 sys sys 964886843 907
 sys/man/4/snap - 664 sys sys 1017251244 1833
-sys/man/4/srv - 664 sys sys 1144690338 4672
+sys/man/4/srv - 664 sys sys 1162907929 4685
 sys/man/4/tapefs - 664 sys sys 1140965924 1861
 sys/man/4/telco - 664 sys sys 1015024814 4359
 sys/man/4/u9fs - 664 sys sys 1043769139 4748
@@ -7901,7 +7901,7 @@ sys/src/9/ip/igmp.c - 664 sys sys 1055700768 5175
 sys/src/9/ip/il.c - 664 sys sys 1134498903 27226
 sys/src/9/ip/inferno.c - 664 sys sys 1022588098 517
 sys/src/9/ip/ip.c - 664 sys sys 1101906449 15285
-sys/src/9/ip/ip.h - 664 sys sys 1146151712 15778
+sys/src/9/ip/ip.h - 664 sys sys 1162907930 15760
 sys/src/9/ip/ipaux.c - 664 sys sys 1079538100 12862
 sys/src/9/ip/ipifc.c - 664 sys sys 1146151712 34215
 sys/src/9/ip/ipmux.c - 664 sys sys 1047260566 15362
@@ -7915,7 +7915,7 @@ sys/src/9/ip/nullmedium.c - 664 sys sys 1086406910 492
 sys/src/9/ip/pktmedium.c - 664 sys sys 1084331746 1314
 sys/src/9/ip/ptclbsum.c - 664 sys sys 1022588099 1243
 sys/src/9/ip/rudp.c - 664 sys sys 1055700790 21415
-sys/src/9/ip/tcp.c - 664 sys sys 1087606219 65623
+sys/src/9/ip/tcp.c - 664 sys sys 1162907929 65581
 sys/src/9/ip/tripmedium.c - 664 sys sys 1045063515 7136
 sys/src/9/ip/udp.c - 664 sys sys 1077376216 13146
 sys/src/9/mkfile - 664 sys sys 1063857477 205
@@ -7949,7 +7949,7 @@ sys/src/9/mtx/uarti8250.c - 664 sys sys 1018721288 11590
 sys/src/9/pc - 20000000775 sys sys 1018721225 0
 sys/src/9/pc/a100p.cp - 444 sys sys 1159735144 21984
 sys/src/9/pc/apbootstrap.s - 664 sys sys 1131293655 3037
-sys/src/9/pc/apic.c - 664 sys sys 1131290206 8748
+sys/src/9/pc/apic.c - 664 sys sys 1162907929 8872
 sys/src/9/pc/apm.c - 664 sys sys 1131290210 3723
 sys/src/9/pc/apmjump.s - 664 sys sys 1032058947 1527
 sys/src/9/pc/archmp.c - 664 sys sys 1131290214 2357
@@ -7993,7 +7993,7 @@ sys/src/9/pc/ethermii.c - 664 sys sys 1084331434 4612
 sys/src/9/pc/ethermii.h - 664 sys sys 1086873891 3258
 sys/src/9/pc/etherrhine.c - 664 sys sys 1081706478 13799
 sys/src/9/pc/ethersink.c - 664 sys sys 1048644103 1076
-sys/src/9/pc/ethersmc.c - 664 sys sys 1071245461 15103
+sys/src/9/pc/ethersmc.c - 664 sys sys 1162951986 15116
 sys/src/9/pc/ethervgbe.c - 664 sys sys 1160066496 26838
 sys/src/9/pc/ethervt6102.c - 664 sys sys 1131907459 22286
 sys/src/9/pc/etherwavelan.c - 664 sys sys 1131290380 3747
@@ -8007,7 +8007,7 @@ sys/src/9/pc/initcode.s - 664 sys sys 1015014519 282
 sys/src/9/pc/io.h - 664 sys sys 1099761152 8095
 sys/src/9/pc/kbd.c - 664 sys sys 1132574883 12365
 sys/src/9/pc/l.s - 664 sys sys 1143129925 28552
-sys/src/9/pc/main.c - 664 sys sys 1155995697 15305
+sys/src/9/pc/main.c - 664 sys sys 1162952105 15321
 sys/src/9/pc/mem.h - 664 sys sys 1137622431 5203
 sys/src/9/pc/memory.c - 664 sys sys 1153172671 18773
 sys/src/9/pc/mkfile - 664 sys sys 1158794206 4004
@@ -9853,11 +9853,11 @@ sys/src/cmd/cc/compat.c - 664 sys sys 1132451523 454
 sys/src/cmd/cc/dcl.c - 664 sys sys 1143759352 27003
 sys/src/cmd/cc/dpchk.c - 664 sys sys 1107365037 7152
 sys/src/cmd/cc/funct.c - 664 sys sys 984718510 6167
-sys/src/cmd/cc/lex.c - 664 sys sys 1157898973 24195
+sys/src/cmd/cc/lex.c - 664 sys sys 1162952421 24538
 sys/src/cmd/cc/lexbody - 664 sys sys 1131293457 9188
 sys/src/cmd/cc/mac.c - 664 sys sys 944960808 36
 sys/src/cmd/cc/macbody - 664 sys sys 1144689980 12205
-sys/src/cmd/cc/mkfile - 664 sys sys 1143240308 564
+sys/src/cmd/cc/mkfile - 664 sys sys 1162952410 596
 sys/src/cmd/cc/omachcap.c - 664 sys sys 1143241829 78
 sys/src/cmd/cc/pgen.c - 664 sys sys 1143759337 8927
 sys/src/cmd/cc/pickle.c - 664 sys sys 1063855374 4829
@@ -14003,7 +14003,7 @@ sys/src/cmd/upas/filterkit/pipefrom.sample - 775 sys sys 1041184939 380
 sys/src/cmd/upas/filterkit/pipeto.sample - 664 sys sys 1045505695 1765
 sys/src/cmd/upas/filterkit/pipeto.sample-hold - 664 sys sys 1019837081 872
 sys/src/cmd/upas/filterkit/readaddrs.c - 664 sys sys 1143759341 1331
-sys/src/cmd/upas/filterkit/token.c - 664 sys sys 1018549521 1312
+sys/src/cmd/upas/filterkit/token.c - 664 sys sys 1162952184 1319
 sys/src/cmd/upas/fs - 20000000775 sys sys 988250018 0
 sys/src/cmd/upas/fs/dat.h - 664 sys sys 1143929916 4189
 sys/src/cmd/upas/fs/fs.c - 664 sys sys 1143946869 26924
@@ -14132,10 +14132,10 @@ sys/src/cmd/va/lex.c - 664 sys sys 1143293804 12095
 sys/src/cmd/va/mkfile - 664 sys sys 944961340 215
 sys/src/cmd/vac - 20000000775 sys sys 1019678788 0
 sys/src/cmd/vac/cache.c - 664 sys sys 1071245791 15806
-sys/src/cmd/vac/dat.h - 664 sys sys 1091904424 3994
+sys/src/cmd/vac/dat.h - 664 sys sys 1162951177 4029
 sys/src/cmd/vac/error.c - 664 sys sys 1036006057 633
 sys/src/cmd/vac/error.h - 664 sys sys 1036024048 327
-sys/src/cmd/vac/file.c - 664 sys sys 1162350655 19061
+sys/src/cmd/vac/file.c - 664 sys sys 1162951640 19943
 sys/src/cmd/vac/fns.h - 664 sys sys 1036006061 1746
 sys/src/cmd/vac/fs.c - 664 sys sys 1162327826 2902
 sys/src/cmd/vac/mkfile - 664 sys sys 1036024045 434
@@ -14149,8 +14149,8 @@ sys/src/cmd/vac/vac.c - 664 sys sys 1162350579 23803
 sys/src/cmd/vac/vac.h - 664 sys sys 1091904424 3598
 sys/src/cmd/vac/vacfs.c - 664 sys sys 1162402257 13621
 sys/src/cmd/vac/vactest.c - 664 sys sys 1036024047 2742
-sys/src/cmd/vac/vtdump.c - 664 sys sys 1162327892 7323
-sys/src/cmd/vac/vtread.c - 664 sys sys 1019678788 2052
+sys/src/cmd/vac/vtdump.c - 664 sys sys 1162951782 8007
+sys/src/cmd/vac/vtread.c - 664 sys sys 1162951740 2016
 sys/src/cmd/vac/wtest.c - 664 sys sys 1019678788 766
 sys/src/cmd/vc - 20000000775 sys sys 947099614 0
 sys/src/cmd/vc/cgen.c - 664 sys sys 1143241861 20147
@@ -15673,3 +15673,4 @@ usr/glenda/lib/profile - 664 glenda glenda 1105128663 890
 usr/glenda/readme.acme - 664 glenda glenda 1019860628 4753
 usr/glenda/readme.rio - 664 glenda glenda 1019860628 6370
 usr/glenda/tmp - 20000000775 glenda glenda 1018802620 0
+386/bin/8c - 775 sys sys 1162959070 365562

+ 16 - 16
dist/replica/plan9.db

@@ -15,7 +15,7 @@
 386/_9pcdisk.gz - 664 sys sys 1039764191 695837
 386/bin - 20000000775 sys sys 1018897690 0
 386/bin/8a - 775 sys sys 1148500566 116698
-386/bin/8c - 775 sys sys 1157916201 365445
+386/bin/8c - 775 sys sys 1162959070 365562
 386/bin/8l - 775 sys sys 1148500567 115711
 386/bin/9660srv - 775 sys sys 1148500567 104375
 386/bin/aan - 775 sys sys 1148500568 131392
@@ -5436,7 +5436,7 @@ rc/bin/diffy - 775 sys sys 1140694870 277
 rc/bin/dircp - 775 sys sys 1107836261 193
 rc/bin/doc2ps - 775 sys sys 1069793831 244
 rc/bin/doc2txt - 775 sys sys 1025197880 563
-rc/bin/doctype - 775 sys sys 945617206 1726
+rc/bin/doctype - 775 sys sys 1162921755 1727
 rc/bin/dosmnt - 775 sys sys 1109288224 303
 rc/bin/eject - 775 sys sys 945617207 123
 rc/bin/fax - 775 sys sys 1127394677 2385
@@ -7559,7 +7559,7 @@ sys/man/2/symbol - 664 sys sys 950892874 9423
 sys/man/2/thread - 664 sys sys 1117034202 11640
 sys/man/2/time - 664 sys sys 1015091527 739
 sys/man/2/tmpfile - 664 sys sys 1048637161 1157
-sys/man/2/wait - 664 sys sys 1015091528 2481
+sys/man/2/wait - 664 sys sys 1162948415 2507
 sys/man/2/window - 664 sys sys 950593499 5522
 sys/man/3 - 20000000775 sys sys 1017251174 0
 sys/man/3/0intro - 664 sys sys 984709634 1873
@@ -7632,7 +7632,7 @@ sys/man/4/rdbfs - 664 sys sys 944959699 1123
 sys/man/4/rio - 664 sys sys 1023206844 8660
 sys/man/4/sacfs - 664 sys sys 964886843 907
 sys/man/4/snap - 664 sys sys 1017251244 1833
-sys/man/4/srv - 664 sys sys 1144690338 4672
+sys/man/4/srv - 664 sys sys 1162907929 4685
 sys/man/4/tapefs - 664 sys sys 1140965924 1861
 sys/man/4/telco - 664 sys sys 1015024814 4359
 sys/man/4/u9fs - 664 sys sys 1043769139 4748
@@ -7901,7 +7901,7 @@ sys/src/9/ip/igmp.c - 664 sys sys 1055700768 5175
 sys/src/9/ip/il.c - 664 sys sys 1134498903 27226
 sys/src/9/ip/inferno.c - 664 sys sys 1022588098 517
 sys/src/9/ip/ip.c - 664 sys sys 1101906449 15285
-sys/src/9/ip/ip.h - 664 sys sys 1146151712 15778
+sys/src/9/ip/ip.h - 664 sys sys 1162907930 15760
 sys/src/9/ip/ipaux.c - 664 sys sys 1079538100 12862
 sys/src/9/ip/ipifc.c - 664 sys sys 1146151712 34215
 sys/src/9/ip/ipmux.c - 664 sys sys 1047260566 15362
@@ -7915,7 +7915,7 @@ sys/src/9/ip/nullmedium.c - 664 sys sys 1086406910 492
 sys/src/9/ip/pktmedium.c - 664 sys sys 1084331746 1314
 sys/src/9/ip/ptclbsum.c - 664 sys sys 1022588099 1243
 sys/src/9/ip/rudp.c - 664 sys sys 1055700790 21415
-sys/src/9/ip/tcp.c - 664 sys sys 1087606219 65623
+sys/src/9/ip/tcp.c - 664 sys sys 1162907929 65581
 sys/src/9/ip/tripmedium.c - 664 sys sys 1045063515 7136
 sys/src/9/ip/udp.c - 664 sys sys 1077376216 13146
 sys/src/9/mkfile - 664 sys sys 1063857477 205
@@ -7949,7 +7949,7 @@ sys/src/9/mtx/uarti8250.c - 664 sys sys 1018721288 11590
 sys/src/9/pc - 20000000775 sys sys 1018721225 0
 sys/src/9/pc/a100p.cp - 444 sys sys 1159735144 21984
 sys/src/9/pc/apbootstrap.s - 664 sys sys 1131293655 3037
-sys/src/9/pc/apic.c - 664 sys sys 1131290206 8748
+sys/src/9/pc/apic.c - 664 sys sys 1162907929 8872
 sys/src/9/pc/apm.c - 664 sys sys 1131290210 3723
 sys/src/9/pc/apmjump.s - 664 sys sys 1032058947 1527
 sys/src/9/pc/archmp.c - 664 sys sys 1131290214 2357
@@ -7993,7 +7993,7 @@ sys/src/9/pc/ethermii.c - 664 sys sys 1084331434 4612
 sys/src/9/pc/ethermii.h - 664 sys sys 1086873891 3258
 sys/src/9/pc/etherrhine.c - 664 sys sys 1081706478 13799
 sys/src/9/pc/ethersink.c - 664 sys sys 1048644103 1076
-sys/src/9/pc/ethersmc.c - 664 sys sys 1071245461 15103
+sys/src/9/pc/ethersmc.c - 664 sys sys 1162951986 15116
 sys/src/9/pc/ethervgbe.c - 664 sys sys 1160066496 26838
 sys/src/9/pc/ethervt6102.c - 664 sys sys 1131907459 22286
 sys/src/9/pc/etherwavelan.c - 664 sys sys 1131290380 3747
@@ -8007,7 +8007,7 @@ sys/src/9/pc/initcode.s - 664 sys sys 1015014519 282
 sys/src/9/pc/io.h - 664 sys sys 1099761152 8095
 sys/src/9/pc/kbd.c - 664 sys sys 1132574883 12365
 sys/src/9/pc/l.s - 664 sys sys 1143129925 28552
-sys/src/9/pc/main.c - 664 sys sys 1155995697 15305
+sys/src/9/pc/main.c - 664 sys sys 1162952105 15321
 sys/src/9/pc/mem.h - 664 sys sys 1137622431 5203
 sys/src/9/pc/memory.c - 664 sys sys 1153172671 18773
 sys/src/9/pc/mkfile - 664 sys sys 1158794206 4004
@@ -9853,11 +9853,11 @@ sys/src/cmd/cc/compat.c - 664 sys sys 1132451523 454
 sys/src/cmd/cc/dcl.c - 664 sys sys 1143759352 27003
 sys/src/cmd/cc/dpchk.c - 664 sys sys 1107365037 7152
 sys/src/cmd/cc/funct.c - 664 sys sys 984718510 6167
-sys/src/cmd/cc/lex.c - 664 sys sys 1157898973 24195
+sys/src/cmd/cc/lex.c - 664 sys sys 1162952421 24538
 sys/src/cmd/cc/lexbody - 664 sys sys 1131293457 9188
 sys/src/cmd/cc/mac.c - 664 sys sys 944960808 36
 sys/src/cmd/cc/macbody - 664 sys sys 1144689980 12205
-sys/src/cmd/cc/mkfile - 664 sys sys 1143240308 564
+sys/src/cmd/cc/mkfile - 664 sys sys 1162952410 596
 sys/src/cmd/cc/omachcap.c - 664 sys sys 1143241829 78
 sys/src/cmd/cc/pgen.c - 664 sys sys 1143759337 8927
 sys/src/cmd/cc/pickle.c - 664 sys sys 1063855374 4829
@@ -14003,7 +14003,7 @@ sys/src/cmd/upas/filterkit/pipefrom.sample - 775 sys sys 1041184939 380
 sys/src/cmd/upas/filterkit/pipeto.sample - 664 sys sys 1045505695 1765
 sys/src/cmd/upas/filterkit/pipeto.sample-hold - 664 sys sys 1019837081 872
 sys/src/cmd/upas/filterkit/readaddrs.c - 664 sys sys 1143759341 1331
-sys/src/cmd/upas/filterkit/token.c - 664 sys sys 1018549521 1312
+sys/src/cmd/upas/filterkit/token.c - 664 sys sys 1162952184 1319
 sys/src/cmd/upas/fs - 20000000775 sys sys 988250018 0
 sys/src/cmd/upas/fs/dat.h - 664 sys sys 1143929916 4189
 sys/src/cmd/upas/fs/fs.c - 664 sys sys 1143946869 26924
@@ -14132,10 +14132,10 @@ sys/src/cmd/va/lex.c - 664 sys sys 1143293804 12095
 sys/src/cmd/va/mkfile - 664 sys sys 944961340 215
 sys/src/cmd/vac - 20000000775 sys sys 1019678788 0
 sys/src/cmd/vac/cache.c - 664 sys sys 1071245791 15806
-sys/src/cmd/vac/dat.h - 664 sys sys 1091904424 3994
+sys/src/cmd/vac/dat.h - 664 sys sys 1162951177 4029
 sys/src/cmd/vac/error.c - 664 sys sys 1036006057 633
 sys/src/cmd/vac/error.h - 664 sys sys 1036024048 327
-sys/src/cmd/vac/file.c - 664 sys sys 1162350655 19061
+sys/src/cmd/vac/file.c - 664 sys sys 1162951640 19943
 sys/src/cmd/vac/fns.h - 664 sys sys 1036006061 1746
 sys/src/cmd/vac/fs.c - 664 sys sys 1162327826 2902
 sys/src/cmd/vac/mkfile - 664 sys sys 1036024045 434
@@ -14149,8 +14149,8 @@ sys/src/cmd/vac/vac.c - 664 sys sys 1162350579 23803
 sys/src/cmd/vac/vac.h - 664 sys sys 1091904424 3598
 sys/src/cmd/vac/vacfs.c - 664 sys sys 1162402257 13621
 sys/src/cmd/vac/vactest.c - 664 sys sys 1036024047 2742
-sys/src/cmd/vac/vtdump.c - 664 sys sys 1162327892 7323
-sys/src/cmd/vac/vtread.c - 664 sys sys 1019678788 2052
+sys/src/cmd/vac/vtdump.c - 664 sys sys 1162951782 8007
+sys/src/cmd/vac/vtread.c - 664 sys sys 1162951740 2016
 sys/src/cmd/vac/wtest.c - 664 sys sys 1019678788 766
 sys/src/cmd/vc - 20000000775 sys sys 947099614 0
 sys/src/cmd/vc/cgen.c - 664 sys sys 1143241861 20147

+ 16 - 0
dist/replica/plan9.log

@@ -31701,3 +31701,19 @@
 1162845005 0 c sys/src/cmd/auth/lib/getexpiration.c - 664 sys sys 1162844529 1574
 1162859406 0 c sys/src/9/pc/uartpci.c - 664 sys sys 1162859151 3617
 1162872004 0 c 386/bin/auth/changeuser - 775 sys sys 1162871997 97582
+1162908006 0 c sys/man/4/srv - 664 sys sys 1162907929 4685
+1162908006 1 c sys/src/9/ip/ip.h - 664 sys sys 1162907930 15760
+1162908006 2 c sys/src/9/ip/tcp.c - 664 sys sys 1162907929 65581
+1162908006 3 c sys/src/9/pc/apic.c - 664 sys sys 1162907929 8872
+1162922406 0 c rc/bin/doctype - 775 sys sys 1162921755 1727
+1162949406 0 c sys/man/2/wait - 664 sys sys 1162948415 2507
+1162951205 0 c sys/src/cmd/vac/dat.h - 664 sys sys 1162951177 4029
+1162953007 0 c sys/src/9/pc/ethersmc.c - 664 sys sys 1162951986 15116
+1162953007 1 c sys/src/9/pc/main.c - 664 sys sys 1162952105 15321
+1162953007 2 c sys/src/cmd/cc/lex.c - 664 sys sys 1162952421 24538
+1162953007 3 c sys/src/cmd/cc/mkfile - 664 sys sys 1162952410 596
+1162953007 4 c sys/src/cmd/upas/filterkit/token.c - 664 sys sys 1162952184 1319
+1162953007 5 c sys/src/cmd/vac/file.c - 664 sys sys 1162951640 19943
+1162953007 6 c sys/src/cmd/vac/vtdump.c - 664 sys sys 1162951782 8007
+1162953007 7 c sys/src/cmd/vac/vtread.c - 664 sys sys 1162951740 2016
+1162960205 0 c 386/bin/8c - 775 sys sys 1162959070 365562

+ 1 - 1
rc/bin/doctype

@@ -67,7 +67,7 @@ END {
 	if (man) x = x "-man"
 	else if (ms) x = x "-ms"
 	else if (mm) x = x "-mm"
-	if (lbits) x = x "-mbits"
+	if (lbits) x = x " -mbits"
 	if (pictures) x = x " -mpictures"
 	x = x " '$opt' '$dev' " files
 	print x

+ 2 - 0
sys/man/2/wait

@@ -105,6 +105,8 @@ returns
 .BR -1 .
 .SH SOURCE
 .B /sys/src/libc/9syscall
+.br
+.B /sys/src/libc/9sys
 .SH "SEE ALSO"
 .IR fork (2),
 .IR exits (2),

+ 1 - 0
sys/man/4/srv

@@ -181,6 +181,7 @@ script; examine it to see what local conventions apply.
 .I Srvssh
 is an
 .IR rc (1)
+command that
 connects to a remote Unix system via 
 .IR ssh (1)
 and starts

+ 0 - 1
sys/src/9/ip/ip.h

@@ -646,6 +646,5 @@ extern Chan*	chandial(char*, char*, char*, Chan**);
 /*
  *  global to all of the stack
  */
-extern int	debug;
 extern void	(*igmpreportfn)(Ipifc*, uchar*);
 

+ 23 - 23
sys/src/9/ip/tcp.c

@@ -54,7 +54,7 @@ enum
 	TCP_CONNECT	= 1,		/* Outgoing connection */
 	SYNACK_RXTIMER	= 250,		/* ms between SYNACK retransmits */
 
-	TCPREXMTTHRESH  = 3,            /* dupack threshhold for rxt */
+	TCPREXMTTHRESH	= 3,		/* dupack threshhold for rxt */
 
 	FORCE		= 1,
 	CLONE		= 2,
@@ -285,7 +285,7 @@ struct Limbo
 };
 
 int	tcp_irtt = DEF_RTT;	/* Initial guess at round trip time */
-ushort	tcp_mss  = DEF_MSS;	/* Maximum segment size to be sent */
+ushort	tcp_mss = DEF_MSS;	/* Maximum segment size to be sent */
 
 enum {
 	/* MIB stats */
@@ -350,7 +350,7 @@ struct Tcppriv
 	ulong	stats[Nstats];
 };
 
-/* 
+/*
  *  Setting tcpporthogdefense to non-zero enables Dong Lin's
  *  solution to hijacked systems staking out port's as a form
  *  of DoS attack.
@@ -375,7 +375,7 @@ void	tcprcvwin(Conv*);
 void	tcpacktimer(void*);
 void	tcpkeepalive(void*);
 void	tcpsetkacounter(Tcpctl*);
-void    tcprxmit(Conv*);
+void	tcprxmit(Conv*);
 void	tcpsettimer(Tcpctl*);
 void	tcpsynackrtt(Conv*);
 void	tcpsetscale(Conv*, Tcpctl*, ushort, ushort);
@@ -711,7 +711,7 @@ backoff(int n)
 }
 
 void
-localclose(Conv *s, char *reason)	 /*  called with tcb locked */
+localclose(Conv *s, char *reason)	/* called with tcb locked */
 {
 	Tcpctl *tcb;
 	Reseq *rp,*rp1;
@@ -1804,8 +1804,8 @@ update(Conv *s, Tcp *seg)
 	/*
 	 *  update window
 	 */
-	if( seq_gt(seg->ack, tcb->snd.wl2)
-	||  (tcb->snd.wl2 == seg->ack && seg->wnd > tcb->snd.wnd)){
+	if(seq_gt(seg->ack, tcb->snd.wl2)
+	|| (tcb->snd.wl2 == seg->ack && seg->wnd > tcb->snd.wnd)){
 		tcb->snd.wnd = seg->wnd;
 		tcb->snd.wl2 = seg->ack;
 	}
@@ -1821,9 +1821,9 @@ update(Conv *s, Tcp *seg)
 		return;
 	}
 
-        /*
+	/*
 	 *  any positive ack turns off fast rxt,
-         *  (should we do new-reno on partial acks?)
+	 *  (should we do new-reno on partial acks?)
 	 */
 	if(!tcb->snd.recovery || seq_ge(seg->ack, tcb->snd.rxt)) {
 		tcb->snd.dupacks = 0;
@@ -1925,7 +1925,7 @@ tcpiput(Proto *tcp, Ipifc*, Block *bp)
 
 	f = tcp->f;
 	tpriv = tcp->priv;
-	
+
 	tpriv->stats[InSegs]++;
 
 	h4 = (Tcp4hdr*)(bp->rp);
@@ -1939,7 +1939,7 @@ tcpiput(Proto *tcp, Ipifc*, Block *bp)
 
 		h4->Unused = 0;
 		hnputs(h4->tcplen, length-TCP4_PKT);
-		if(!(bp->flag & Btcpck) && (h4->tcpcksum[0] || h4->tcpcksum[1]) && 
+		if(!(bp->flag & Btcpck) && (h4->tcpcksum[0] || h4->tcpcksum[1]) &&
 			ptclcsum(bp, TCP4_IPLEN, length-TCP4_IPLEN)) {
 			tpriv->stats[CsumErrs]++;
 			tpriv->stats[InErrs]++;
@@ -1978,7 +1978,7 @@ tcpiput(Proto *tcp, Ipifc*, Block *bp)
 		h6->ploadlen[0] = h6->ploadlen[1] = h6->proto = 0;
 		h6->ttl = proto;
 		hnputl(h6->vcf, length);
-		if((h6->tcpcksum[0] || h6->tcpcksum[1]) && 
+		if((h6->tcpcksum[0] || h6->tcpcksum[1]) &&
 			ptclcsum(bp, TCP6_IPLEN, length+TCP6_PHDRSIZE)) {
 			tpriv->stats[CsumErrs]++;
 			tpriv->stats[InErrs]++;
@@ -2277,7 +2277,7 @@ reset:
 					qpassnolim(s->rq, bp);
 					bp = nil;
 
-					/* 
+					/*
 					 *  Force an ack every 2 data messages.  This is
 					 *  a hack for rob to make his home system run
 					 *  faster.
@@ -2412,20 +2412,20 @@ tcpoutput(Conv *s)
 
 	for(msgs = 0; msgs < 100; msgs++) {
 		tcb = (Tcpctl*)s->ptcl;
-	
+
 		switch(tcb->state) {
 		case Listen:
 		case Closed:
 		case Finwait2:
 			return;
 		}
-	
+
 		/* force an ack when a window has opened up */
 		if(tcb->rcv.blocked && tcb->rcv.wnd > 0){
 			tcb->rcv.blocked = 0;
 			tcb->flags |= FORCE;
 		}
-	
+
 		sndcnt = qlen(s->wq)+tcb->flgcnt;
 		sent = tcb->snd.ptr - tcb->snd.una;
 
@@ -2841,7 +2841,7 @@ int
 addreseq(Tcpctl *tcb, Tcppriv *tpriv, Tcp *seg, Block *bp, ushort length)
 {
 	Reseq *rp, *rp1;
-	int i;
+	int i, rqlen;
 	static int once;
 
 	rp = malloc(sizeof(Reseq));
@@ -2864,9 +2864,9 @@ addreseq(Tcpctl *tcb, Tcppriv *tpriv, Tcp *seg, Block *bp, ushort length)
 		return 0;
 	}
 
-	length = 0;
+	rqlen = 0;
 	for(i = 0;; i++) {
-		length += rp1->length;
+		rqlen += rp1->length;
 		if(rp1->next == nil || seq_lt(seg->seq, rp1->next->seg.seq)) {
 			rp->next = rp1->next;
 			rp1->next = rp;
@@ -2876,8 +2876,8 @@ addreseq(Tcpctl *tcb, Tcppriv *tpriv, Tcp *seg, Block *bp, ushort length)
 		}
 		rp1 = rp1->next;
 	}
-	if(length > QMAX && once++ == 0){
-		print("very long tcp resequence queue: %d\n", length);
+	if(rqlen > QMAX && once++ == 0){
+		print("very long tcp resequence queue: %d\n", rqlen);
 		for(rp1 = tcb->reseq, i = 0; i < 10 && rp1 != nil; rp1 = rp1->next, i++)
 			print("0x%lux 0x%lux 0x%ux\n", rp1->seg.seq, rp1->seg.ack,
 				rp1->seg.flags);
@@ -2994,7 +2994,7 @@ tcpadvise(Proto *tcp, Block *bp, char *msg)
 		v4tov6(source, h4->tcpsrc);
 		psource = nhgets(h4->tcpsport);
 		pdest = nhgets(h4->tcpdport);
-	} 
+	}
 	else {
 		ipmove(dest, h6->tcpdst);
 		ipmove(source, h6->tcpsrc);
@@ -3122,7 +3122,7 @@ tcpsettimer(Tcpctl *tcb)
 
 	/* round trip dependency */
 	x = backoff(tcb->backoff) *
-	    (tcb->mdev + (tcb->srtt>>LOGAGAIN) + MSPTICK) / MSPTICK;
+		(tcb->mdev + (tcb->srtt>>LOGAGAIN) + MSPTICK) / MSPTICK;
 
 	/* bounded twixt 1/2 and 64 seconds */
 	if(x < 500/MSPTICK)

+ 12 - 1
sys/src/9/pc/apic.c

@@ -24,7 +24,7 @@ enum {					/* Local APIC registers */
 	LapicICRLO	= 0x0300,	/* Interrupt Command */
 	LapicICRHI	= 0x0310,	/* Interrupt Command [63:32] */
 	LapicTIMER	= 0x0320,	/* Local Vector Table 0 (TIMER) */
-	LapicPCINT	= 0x0340,	/* Performance COunter LVT */
+	LapicPCINT	= 0x0340,	/* Performance Counter LVT */
 	LapicLINT0	= 0x0350,	/* Local Vector Table 1 (LINT0) */
 	LapicLINT1	= 0x0360,	/* Local Vector Table 2 (LINT1) */
 	LapicERROR	= 0x0370,	/* Local Vector Table 3 (ERROR) */
@@ -389,3 +389,14 @@ lapicintroff(void)
 	lapicw(LapicTPR, 0xFF);
 }
 
+void
+lapicnmienable(void)
+{
+	lapicw(LapicPCINT, ApicNMI);
+}
+
+void
+lapicnmidisable(void)
+{
+	lapicw(LapicPCINT, ApicIMASK);
+}

+ 1 - 0
sys/src/9/pc/ethersmc.c

@@ -713,6 +713,7 @@ reset(Ether* ether)
 	if (ctlr == 0) {
 		iofree(ether->port);
 		pcmspecialclose(slot);
+		return -1;
 	}
 
 	ilock(ctlr);

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

@@ -512,7 +512,7 @@ matherror(Ureg *ur, void*)
 	fpenv(&up->fpsave);
 	mathnote();
 
-	if(ur->pc & KZERO)
+	if((ur->pc & 0xf0000000) == KZERO)
 		panic("fp: status %ux fppc=0x%lux pc=0x%lux",
 			up->fpsave.status, up->fpsave.pc, ur->pc);
 }

+ 19 - 5
sys/src/cmd/cc/lex.c

@@ -92,7 +92,12 @@ main(int argc, char *argv[])
 	}
 	if(argc > 1 && !systemtype(Windows)) {
 		nproc = 1;
-		if(p = getenv("NPROC"))
+		/*
+		 * if we're writing acid to standard output, don't compile
+		 * concurrently, to avoid interleaving output.
+		 */
+		if(((!debug['a'] && !debug['Z']) || debug['n']) &&
+		    (p = getenv("NPROC")) != nil)
 			nproc = atol(p);	/* */
 		c = 0;
 		nout = 0;
@@ -148,6 +153,7 @@ compile(char *file, char **defs, int ndef)
 	char ofile[400], incfile[20];
 	char *p, *av[100], opt[256];
 	int i, c, fd[2];
+	static int first = 1;
 
 	strcpy(ofile, file);
 	p = utfrrune(ofile, pathchar());
@@ -187,11 +193,18 @@ compile(char *file, char **defs, int ndef)
 			setinclude("/sys/include");
 		}
 	}
-	Binit(&diagbuf, 1, OWRITE);
+	if (first)
+		Binit(&diagbuf, 1, OWRITE);
+	/*
+	 * if we're writing acid to standard output, don't keep scratching
+	 * outbuf.
+	 */
 	if((debug['a'] || debug['Z']) && !debug['n']) {
-		outfile = 0;
-		Binit(&outbuf, dup(1, -1), OWRITE);
-		dup(2, 1);
+		if (first) {
+			outfile = 0;
+			Binit(&outbuf, dup(1, -1), OWRITE);
+			dup(2, 1);
+		}
 	} else {
 		c = mycreat(outfile, 0664);
 		if(c < 0) {
@@ -202,6 +215,7 @@ compile(char *file, char **defs, int ndef)
 		Binit(&outbuf, c, OWRITE);
 	}
 	newio();
+	first = 0;
 
 	/* Use an ANSI preprocessor */
 	if(debug['p']) {

+ 5 - 2
sys/src/cmd/cc/mkfile

@@ -23,6 +23,9 @@ HFILES=cc.h\
 
 YFILES=cc.y\
 
+CURCC=6c 8c qc vc
+OTHERCC=1c 2c 5c 7c kc
+
 </sys/src/cmd/mklib
 
 install:V:	$LIB
@@ -35,13 +38,13 @@ mac.$O:	macbody
 
 everything:V:
 	# mk the current compilers
-	for(DIR in cc 8c vc qc){
+	for(DIR in cc $CURCC){
 		cd ../$DIR
 		mk nuke
 		mk install
 	}
 	# mk all the others with those
-	for(DIR in cc 1c 2c 5c 7c 8c kc qc vc){
+	for(DIR in cc $CURCC $OTHERCC){
 		cd ../$DIR
 		mk nuke
 		mk installall

+ 1 - 1
sys/src/cmd/upas/filterkit/token.c

@@ -7,7 +7,7 @@
 void
 usage(void)
 {
-	fprint(2, "usage: %s key [token]\n", argv0);
+	fprint(2, "usage: %s key [token [file]]\n", argv0);
 	exits("usage");
 }
 

+ 3 - 1
sys/src/cmd/vac/dat.h

@@ -34,6 +34,8 @@ struct Source {
 	Cache *cache;	/* immutable */
 	int readOnly;	/* immutable */
 
+	VacFile *vf;	/* pointer back */
+
 	Lump *lump;	/* lump containing venti dir entry */
 	ulong block;	/* block number within parent: immutable */
 	int entry;	/* which entry in the block: immutable */
@@ -99,7 +101,7 @@ enum {
  * 	For Active*, no child has a parent of a greater generation
  *	For Snap*, there is a snap parent of given generation and there are
  *		no parents of greater gen - implies no children of a greater gen
- *	For *RO, the lump is fixed - no change ca be made - all pointers
+ *	For *RO, the lump is fixed - no change can be made - all pointers
  *		are valid venti addresses
  *	For *A, the lump is on the venti server
  *	There are no pointers to Zombie lumps

+ 64 - 20
sys/src/cmd/vac/file.c

@@ -30,6 +30,8 @@ struct VacFile {
 	VacFile *down;		/* children */
 };
 
+char *vfName(VacFile *, char *);
+
 static int vfMetaFlush(VacFile*);
 static ulong msAlloc(Source *ms, ulong, int n);
 
@@ -38,7 +40,6 @@ vfRUnlock(VacFile *vf)
 {
 	vtRUnlock(vf->lk);
 }
-	
 
 static int
 vfRLock(VacFile *vf)
@@ -154,7 +155,7 @@ mbSearch(MetaBlock *mb, char *elem, int *ri, MetaEntry *me)
 			*ri = i;
 			return 1;
 		}
-	
+
 		if(x < 0)
 			b = i+1;
 		else /* x > 0 */
@@ -162,7 +163,7 @@ mbSearch(MetaBlock *mb, char *elem, int *ri, MetaEntry *me)
 	}
 
 	assert(b == t);
-	
+
 	*ri = b;	/* b is the index to insert this entry */
 	memset(me, 0, sizeof(*me));
 
@@ -261,10 +262,10 @@ static void
 vfFree(VacFile *vf)
 {
 	sourceFree(vf->source);
-	vtLockFree(vf->lk);	
+	vtLockFree(vf->lk);
 	sourceFree(vf->msource);
 	vdCleanup(&vf->dir);
-	
+
 	vtMemFree(vf);
 }
 
@@ -300,7 +301,7 @@ dirLookup(VacFile *vf, char *elem)
 			nvf->block = i;
 			return nvf;
 		}
-		
+
 		lumpDecRef(u, 1);
 		u = nil;
 	}
@@ -311,6 +312,14 @@ Err:
 	return nil;
 }
 
+/* point r back at vf */
+static void
+pointback(Source *r, VacFile *vf)
+{
+	assert(r->vf == nil);
+	r->vf = vf;
+}
+
 VacFile *
 vfRoot(VacFS *fs, uchar *score)
 {
@@ -381,13 +390,16 @@ vfRoot(VacFS *fs, uchar *score)
 
 	mr = vfAlloc(fs);
 	mr->msource = r2;
+	pointback(r2, mr);
 	r2 = nil;
 
 	root = vfAlloc(fs);
 	root->up = mr;
 	root->source = r0;
+	pointback(r0, root);
 	r0 = nil;
 	root->msource = r1;
+	pointback(r1, root);
 	r1 = nil;
 
 	mr->down = root;
@@ -466,10 +478,12 @@ vfWalk(VacFile *vf, char *elem)
 	nvf->source = sourceOpen(vf->source, nvf->dir.entry, vf->fs->readOnly);
 	if(nvf->source == nil)
 		goto Err;
+	pointback(nvf->source, nvf);
 	if(nvf->dir.mode & ModeDir) {
 		nvf->msource = sourceOpen(vf->source, nvf->dir.mentry, vf->fs->readOnly);
 		if(nvf->msource == nil)
 			goto Err;
+		pointback(nvf->msource, nvf);
 	}
 
 	/* link in and up parent ref count */
@@ -569,7 +583,7 @@ vfCreate(VacFile *vf, char *elem, ulong mode, char *user)
 		if(mr == nil)
 			goto Err;
 	}
-	
+
 	dir = &nvf->dir;
 	dir->elem = vtStrDup(elem);
 	dir->entry = r->block*pr->epb + r->entry;
@@ -601,7 +615,7 @@ vfCreate(VacFile *vf, char *elem, ulong mode, char *user)
 	p = mbAlloc(&mb, n);
 	if(p == nil)
 		goto Err;
-		
+
 	if(!mbSearch(&mb, elem, &i, &me))
 		goto Err;
 	assert(me.p == nil);
@@ -614,7 +628,9 @@ vfCreate(VacFile *vf, char *elem, ulong mode, char *user)
 	lumpDecRef(u, 1);
 
 	nvf->source = r;
+	pointback(r, nvf);
 	nvf->msource = mr;
+	pointback(mr, vf);
 
 	/* link in and up parent ref count */
 	nvf->next = vf->down;
@@ -639,7 +655,6 @@ Err:
 	return 0;
 }
 
-
 int
 vfRead(VacFile *vf, void *buf, int cnt, vlong offset)
 {
@@ -801,7 +816,7 @@ ulong
 vfGetMcount(VacFile *vf)
 {
 	ulong mcount;
-	
+
 	vfMetaLock(vf);
 	mcount = vf->dir.mcount;
 	vfMetaUnlock(vf);
@@ -860,9 +875,9 @@ print("deleting %d entry\n", i);
 	mbDelete(&mb, i, &me);
 	memset(me.p, 0, me.size);
 	mbPack(&mb);
-	
+
 	lumpDecRef(u, 1);
-	
+
 	vf->removed = 1;
 	vf->block = NilBlock;
 
@@ -906,7 +921,7 @@ Err:
 
 int
 vfRemove(VacFile *vf, char *user)
-{	
+{
 	/* can not remove the root */
 	if(vfIsRoot(vf)) {
 		vtSetError(ERoot);
@@ -918,7 +933,7 @@ vfRemove(VacFile *vf, char *user)
 
 	if(vfIsDir(vf) && !vfCheckEmpty(vf))
 		goto Err;
-			
+
 	assert(vf->down == nil);
 
 	sourceRemove(vf->source);
@@ -927,14 +942,14 @@ vfRemove(VacFile *vf, char *user)
 		sourceRemove(vf->msource);
 		vf->msource = nil;
 	}
-	
+
 	vfUnlock(vf);
-	
+
 	if(!vfMetaRemove(vf, user))
 		return 0;
-	
+
 	return 1;
-		
+
 Err:
 	vfUnlock(vf);
 	return 0;
@@ -995,6 +1010,7 @@ vfGetVtEntry(VacFile *vf, VtEntry *e)
 	return res;
 }
 
+#ifdef notdef
 int
 vfGetBlockScore(VacFile *vf, ulong bn, uchar score[VtScoreSize])
 {
@@ -1019,6 +1035,7 @@ vfGetBlockScore(VacFile *vf, ulong bn, uchar score[VtScoreSize])
 
 	return ret;
 }
+#endif
 
 VacFile *
 vfGetParent(VacFile *vf)
@@ -1041,7 +1058,7 @@ vdeAlloc(VacFile *vf)
 
 	ds = vtMemAllocZ(sizeof(VacDirEnum));
 	ds->file = vf;
-	
+
 	return ds;
 }
 
@@ -1089,7 +1106,7 @@ fprint(2, "gen mismatch\n");
 
 	*size = e.size;
 	lumpDecRef(u, 1);
-	return 1;	
+	return 1;
 
 Err:
 	lumpDecRef(u, 1);
@@ -1219,3 +1236,30 @@ vacfs(VacFile *vf)
 		return nil;
 	return vf->fs;
 }
+
+/*
+ * path may be nil; it's the right-hand part of the path so far.
+ * result is malloced, path must be malloced or nil.
+ */
+char *
+vfName(VacFile *vf, char *path)
+{
+	char *nname, *rname, *elem;
+
+	if (vf == nil || vf == vf->up) {		/* at the root? */
+		if (path == nil)
+			return strdup("/");
+		return path;
+	}
+	elem = vf->dir.elem;
+	if (elem != nil && path != nil)
+		rname = smprint("%s/%s", elem, path);
+	else if (elem != nil)
+		rname = strdup(elem);
+	else
+		return vfName(vf->up, path);
+	nname = vfName(vf->up, rname);
+	if (nname != rname)
+		free(rname);
+	return nname;
+}

+ 31 - 6
sys/src/cmd/vac/vtdump.c

@@ -132,7 +132,7 @@ void
 sourcePrint(Source *s, int indent, int entry)
 {
 	int i;
-	uvlong size;
+	uvlong size, dsize;
 	int ne;
 
 	for(i=0; i<indent; i++)
@@ -141,8 +141,15 @@ sourcePrint(Source *s, int indent, int entry)
 	if(s->active) {
 		/* dir size in directory entries */
 		if(s->dir) {
+			dsize = s->dsize;
+			if (dsize <= 0) {
+				fprint(2, "%s: non-positive dsize %d in dir %V\n",
+					argv0, s->dsize, s->score);
+				dsize = 1;	/* don't divide by zero */
+			}
 			ne = s->dsize/VtEntrySize;
-			size = ne*(s->size/s->dsize) + (s->size%s->dsize)/VtEntrySize;
+			size = ne*(s->size/dsize) +
+				(s->size%dsize)/VtEntrySize;
 		} else 
 			size = s->size;
 		if(cmp) {
@@ -178,14 +185,13 @@ parse(Source *s, uchar *p)
 	s->active = 1;
 	s->gen = dir.gen;
 	s->psize = dir.psize;
-	s->dsize = dir.size;
+	s->dsize = dir.dsize;
 	s->size = dir.size;
 	memmove(s->score, dir.score, VtScoreSize);
 	if(dir.flags & VtEntryDir)
 		s->dir = 1;
 	s->depth = dir.depth;
 	return 1;
-
 }
 
 int
@@ -199,6 +205,7 @@ sourceRead(Source *s, ulong block, uchar *p, int n)
 	memmove(score, s->score, VtScoreSize);
 
 	np = s->psize/VtScoreSize;
+	assert(np > 0);
 	for(i=0; i<s->depth; i++) {
 		elem[i] = block % np;
 		block /= np;
@@ -246,6 +253,11 @@ dumpFileContents(Source *s)
 	nb = (s->size + s->dsize - 1)/s->dsize;
 	lb = s->size%s->dsize;
 	for(i=0; i<nb; i++) {
+		if (s->dsize > sizeof buf) {
+			fprint(2, "%s: implausibly large s->dsize %d for %V\n",
+				argv0, s->dsize, s->score);
+			continue;
+		}
 		memset(buf, 0, s->dsize);
 		n = sourceRead(s, i, buf, s->dsize);
 		if(n < 0) {	
@@ -268,6 +280,11 @@ dumpFile(Source *s, int indent)
 
 	nb = (s->size + s->dsize - 1)/s->dsize;
 	for(i=0; i<nb; i++) {
+		if (s->dsize > sizeof buf) {
+			fprint(2, "%s: implausibly large s->dsize %d for %V\n",
+				argv0, s->dsize, s->score);
+			continue;
+		}
 		memset(buf, 0, s->dsize);
 		n = sourceRead(s, i, buf, s->dsize);
 		if(n < 0) {	
@@ -288,12 +305,20 @@ dumpDir(Source *s, int indent)
 	uchar buf[VtMaxLumpSize];
 	Source ss;
 
-	if (s->dsize == 0)
-		sysfatal("dumpDir: zero s->dsize");
+	if (s->dsize <= 0) {
+		fprint(2, "%s: dumpDir %V: non-positive s->dsize %d\n",
+			argv0, s->score, s->dsize);
+		return 1;
+	}
 	pb = s->dsize/VtEntrySize;
 	ne = pb*(s->size/s->dsize) + (s->size%s->dsize)/VtEntrySize;
 	nb = (s->size + s->dsize - 1)/s->dsize;
 	for(i=0; i<nb; i++) {
+		if (s->dsize > sizeof buf) {
+			fprint(2, "%s: implausibly large s->dsize %d for %V\n",
+				argv0, s->dsize, s->score);
+			continue;
+		}
 		memset(buf, 0, s->dsize);
 		n = sourceRead(s, i, buf, s->dsize);
 		if(n < 0) {	

+ 5 - 4
sys/src/cmd/vac/vtread.c

@@ -18,7 +18,6 @@ struct Source
 
 int bsize;
 Biobuf *bout;
-VtRootLump root;
 int ver;
 int cmp;
 int all;
@@ -33,7 +32,6 @@ ulong vtGetUint32(uchar *p);
 uvlong vtGetUint48(uchar *p);
 void usage(void);
 int parseScore(uchar *score, char *buf, int n);
-void readRoot(VtRootLump*, uchar *score, char *file);
 void parse1(Source*, uchar*);
 void parse2(Source*, uchar*);
 int dumpDir(Source*, int indent);
@@ -53,6 +51,9 @@ main(int argc, char *argv[])
 	case 't':
 		type = atoi(ARGF());
 		break;
+	default:
+		usage();
+		break;
 	}ARGEND
 
 	vtAttach();
@@ -68,7 +69,7 @@ main(int argc, char *argv[])
 	fmtinstall('V', vtScoreFmt);
 	fmtinstall('R', vtErrFmt);
 
-	z = vtDial(host);
+	z = vtDial(host, 0);
 	if(z == nil)
 		vtFatal("could not connect to server: %s", vtGetError());
 
@@ -93,7 +94,7 @@ main(int argc, char *argv[])
 void
 usage(void)
 {
-	fprint(2, "%s: -t type score\n", argv0);
+	fprint(2, "%s: [-t type] score\n", argv0);
 	exits("usage");
 }