Browse Source

Plan 9 from Bell Labs 2008-03-20

David du Colombier 16 years ago
parent
commit
837e72a82e

+ 15 - 9
dist/replica/_plan9.db

@@ -320,6 +320,7 @@
 386/bin/ip/tftpd - 775 sys sys 1204292520 131963
 386/bin/ip/tftpd - 775 sys sys 1204292520 131963
 386/bin/ip/traceroute - 775 sys sys 1198211710 72783
 386/bin/ip/traceroute - 775 sys sys 1198211710 72783
 386/bin/ip/udpecho - 775 sys sys 1178508500 43095
 386/bin/ip/udpecho - 775 sys sys 1178508500 43095
+386/bin/ip/wol - 775 sys sys 1205983484 47866
 386/bin/join - 775 sys sys 1168402330 114382
 386/bin/join - 775 sys sys 1168402330 114382
 386/bin/jpg - 775 sys sys 1179372097 174971
 386/bin/jpg - 775 sys sys 1179372097 174971
 386/bin/kbmap - 775 sys sys 1197732770 144079
 386/bin/kbmap - 775 sys sys 1197732770 144079
@@ -5845,7 +5846,7 @@ sys/games - 20000000775 sys sys 1117225532 0
 sys/games/lib - 20000000775 sys sys 1165337608 0
 sys/games/lib - 20000000775 sys sys 1165337608 0
 sys/games/lib/4scores - 10000000666 sys sys 1118680448 0
 sys/games/lib/4scores - 10000000666 sys sys 1118680448 0
 sys/games/lib/5scores - 10000000666 sys sys 1118680453 0
 sys/games/lib/5scores - 10000000666 sys sys 1118680453 0
-sys/games/lib/fortunes - 664 sys sys 1203873355 268816
+sys/games/lib/fortunes - 664 sys sys 1205934831 268872
 sys/games/lib/mahjongg - 20000000775 sys sys 1095792278 0
 sys/games/lib/mahjongg - 20000000775 sys sys 1095792278 0
 sys/games/lib/mahjongg/backgrounds - 20000000775 sys sys 1095792293 0
 sys/games/lib/mahjongg/backgrounds - 20000000775 sys sys 1095792293 0
 sys/games/lib/mahjongg/backgrounds/default.bit - 664 sys sys 1095792293 346803
 sys/games/lib/mahjongg/backgrounds/default.bit - 664 sys sys 1095792293 346803
@@ -7430,7 +7431,7 @@ sys/man/1/leak - 664 sys sys 1196638935 4373
 sys/man/1/lens - 664 sys sys 1196638932 1272
 sys/man/1/lens - 664 sys sys 1196638932 1272
 sys/man/1/lex - 664 sys sys 1196638932 1520
 sys/man/1/lex - 664 sys sys 1196638932 1520
 sys/man/1/look - 664 sys sys 1196638932 1357
 sys/man/1/look - 664 sys sys 1196638932 1357
-sys/man/1/lp - 664 sys sys 1196638935 3329
+sys/man/1/lp - 664 sys sys 1205952886 3350
 sys/man/1/ls - 664 sys sys 1196638932 2890
 sys/man/1/ls - 664 sys sys 1196638932 2890
 sys/man/1/mail - 664 sys sys 1196638935 2158
 sys/man/1/mail - 664 sys sys 1196638935 2158
 sys/man/1/man - 664 sys sys 1196638932 2006
 sys/man/1/man - 664 sys sys 1196638932 2006
@@ -7452,7 +7453,7 @@ sys/man/1/ns - 664 sys sys 1196638935 895
 sys/man/1/p - 664 sys sys 1196638933 504
 sys/man/1/p - 664 sys sys 1196638933 504
 sys/man/1/page - 664 sys sys 1196638935 5839
 sys/man/1/page - 664 sys sys 1196638935 5839
 sys/man/1/passwd - 664 sys sys 1201730866 1591
 sys/man/1/passwd - 664 sys sys 1201730866 1591
-sys/man/1/patch - 664 sys sys 1196638936 2588
+sys/man/1/patch - 664 sys sys 1205952914 3356
 sys/man/1/pcc - 664 sys sys 1196638933 3478
 sys/man/1/pcc - 664 sys sys 1196638933 3478
 sys/man/1/pic - 664 sys sys 1196638933 8229
 sys/man/1/pic - 664 sys sys 1196638933 8229
 sys/man/1/pipefile - 664 sys sys 1196638936 1861
 sys/man/1/pipefile - 664 sys sys 1196638936 1861
@@ -7754,7 +7755,7 @@ sys/man/4/snap - 664 sys sys 1196638944 1908
 sys/man/4/srv - 664 sys sys 1196638944 4970
 sys/man/4/srv - 664 sys sys 1196638944 4970
 sys/man/4/tapefs - 664 sys sys 1196638944 1861
 sys/man/4/tapefs - 664 sys sys 1196638944 1861
 sys/man/4/telco - 664 sys sys 1196638944 4359
 sys/man/4/telco - 664 sys sys 1196638944 4359
-sys/man/4/u9fs - 664 sys sys 1196638944 4748
+sys/man/4/u9fs - 664 sys sys 1205964618 5225
 sys/man/4/upasfs - 664 sys sys 1196638944 6212
 sys/man/4/upasfs - 664 sys sys 1196638944 6212
 sys/man/4/usb - 664 sys sys 1203552814 5677
 sys/man/4/usb - 664 sys sys 1203552814 5677
 sys/man/4/usbd - 664 sys sys 1202846392 1035
 sys/man/4/usbd - 664 sys sys 1202846392 1035
@@ -7805,6 +7806,7 @@ sys/man/6/regexp - 664 sys sys 1196638945 2050
 sys/man/6/rewrite - 664 sys sys 1196638945 3235
 sys/man/6/rewrite - 664 sys sys 1196638945 3235
 sys/man/6/smtpd - 664 sys sys 1196638945 8178
 sys/man/6/smtpd - 664 sys sys 1196638945 8178
 sys/man/6/snap - 664 sys sys 1196638945 2402
 sys/man/6/snap - 664 sys sys 1196638945 2402
+sys/man/6/style - 664 sys sys 1205985568 2659
 sys/man/6/thumbprint - 664 sys sys 1196638945 1124
 sys/man/6/thumbprint - 664 sys sys 1196638945 1124
 sys/man/6/users - 664 sys sys 1196638945 1392
 sys/man/6/users - 664 sys sys 1196638945 1392
 sys/man/6/utf - 664 sys sys 1196638945 2430
 sys/man/6/utf - 664 sys sys 1196638945 2430
@@ -7850,11 +7852,11 @@ sys/man/8/getflags - 664 sys sys 1196638947 1713
 sys/man/8/gpsfs - 664 sys sys 1196638947 4918
 sys/man/8/gpsfs - 664 sys sys 1196638947 4918
 sys/man/8/httpd - 664 sys sys 1196638947 6866
 sys/man/8/httpd - 664 sys sys 1196638947 6866
 sys/man/8/init - 664 sys sys 1196638947 1430
 sys/man/8/init - 664 sys sys 1196638947 1430
-sys/man/8/ipconfig - 664 sys sys 1204424262 8203
+sys/man/8/ipconfig - 664 sys sys 1205960389 8284
 sys/man/8/ipserv - 664 sys sys 1202161489 3268
 sys/man/8/ipserv - 664 sys sys 1202161489 3268
 sys/man/8/kfscmd - 664 sys sys 1196638947 4514
 sys/man/8/kfscmd - 664 sys sys 1196638947 4514
 sys/man/8/listen - 664 sys sys 1205796105 4090
 sys/man/8/listen - 664 sys sys 1205796105 4090
-sys/man/8/lp - 664 sys sys 1196638947 2491
+sys/man/8/lp - 664 sys sys 1205960257 2490
 sys/man/8/mk9660 - 664 sys sys 1196638947 3946
 sys/man/8/mk9660 - 664 sys sys 1196638947 3946
 sys/man/8/mkfs - 664 sys sys 1196638947 3427
 sys/man/8/mkfs - 664 sys sys 1196638947 3427
 sys/man/8/mkpaqfs - 664 sys sys 1196638947 890
 sys/man/8/mkpaqfs - 664 sys sys 1196638947 890
@@ -7897,6 +7899,7 @@ sys/man/8/venti - 664 sys sys 1197570117 12190
 sys/man/8/venti-backup - 664 sys sys 1202925137 2290
 sys/man/8/venti-backup - 664 sys sys 1202925137 2290
 sys/man/8/venti-fmt - 664 sys sys 1196638948 8626
 sys/man/8/venti-fmt - 664 sys sys 1196638948 8626
 sys/man/8/vga - 664 sys sys 1196638948 4129
 sys/man/8/vga - 664 sys sys 1196638948 4129
+sys/man/8/wol - 664 sys sys 1205960109 743
 sys/man/fonts - 664 sys sys 1196638948 218
 sys/man/fonts - 664 sys sys 1196638948 218
 sys/man/index.html - 664 sys sys 1196638948 1859
 sys/man/index.html - 664 sys sys 1196638948 1859
 sys/man/mkfile - 664 sys sys 1196638948 2264
 sys/man/mkfile - 664 sys sys 1196638948 2264
@@ -12547,7 +12550,7 @@ sys/src/cmd/ip/ipconfig/mkfile - 664 sys sys 1204591120 575
 sys/src/cmd/ip/ipconfig/ppp.c - 664 sys sys 1184880751 1046
 sys/src/cmd/ip/ipconfig/ppp.c - 664 sys sys 1184880751 1046
 sys/src/cmd/ip/linklocal.c - 664 sys sys 1197673397 1751
 sys/src/cmd/ip/linklocal.c - 664 sys sys 1197673397 1751
 sys/src/cmd/ip/measure.c - 664 sys sys 944961011 3733
 sys/src/cmd/ip/measure.c - 664 sys sys 944961011 3733
-sys/src/cmd/ip/mkfile - 664 sys sys 1185920805 1267
+sys/src/cmd/ip/mkfile - 664 sys sys 1205960050 1273
 sys/src/cmd/ip/ping.c - 664 sys sys 1198188930 10554
 sys/src/cmd/ip/ping.c - 664 sys sys 1198188930 10554
 sys/src/cmd/ip/ppp - 20000000775 sys sys 1065963823 0
 sys/src/cmd/ip/ppp - 20000000775 sys sys 1065963823 0
 sys/src/cmd/ip/ppp/block.c - 664 sys sys 1015090266 5353
 sys/src/cmd/ip/ppp/block.c - 664 sys sys 1015090266 5353
@@ -12621,6 +12624,7 @@ sys/src/cmd/ip/telnetd.c - 664 sys sys 1135487948 11772
 sys/src/cmd/ip/tftpd.c - 664 sys sys 1106943821 7646
 sys/src/cmd/ip/tftpd.c - 664 sys sys 1106943821 7646
 sys/src/cmd/ip/traceroute.c - 664 sys sys 1198186109 8747
 sys/src/cmd/ip/traceroute.c - 664 sys sys 1198186109 8747
 sys/src/cmd/ip/udpecho.c - 664 sys sys 1178483004 789
 sys/src/cmd/ip/udpecho.c - 664 sys sys 1178483004 789
+sys/src/cmd/ip/wol.c - 664 sys sys 1205960041 1615
 sys/src/cmd/join.c - 664 sys sys 1158251357 7550
 sys/src/cmd/join.c - 664 sys sys 1158251357 7550
 sys/src/cmd/jpg - 20000000775 sys sys 1132458749 0
 sys/src/cmd/jpg - 20000000775 sys sys 1132458749 0
 sys/src/cmd/jpg/bmp.c - 664 sys sys 1108852826 4222
 sys/src/cmd/jpg/bmp.c - 664 sys sys 1108852826 4222
@@ -14110,7 +14114,7 @@ sys/src/cmd/unix/u9fs/fcallconv.c - 664 sys sys 1043768485 5467
 sys/src/cmd/unix/u9fs/makefile - 664 sys sys 1048969298 1064
 sys/src/cmd/unix/u9fs/makefile - 664 sys sys 1048969298 1064
 sys/src/cmd/unix/u9fs/oldfcall.c - 664 sys sys 1015092352 7595
 sys/src/cmd/unix/u9fs/oldfcall.c - 664 sys sys 1015092352 7595
 sys/src/cmd/unix/u9fs/oldfcall.h - 664 sys sys 1015092352 914
 sys/src/cmd/unix/u9fs/oldfcall.h - 664 sys sys 1015092352 914
-sys/src/cmd/unix/u9fs/plan9.h - 664 sys sys 1095185027 5748
+sys/src/cmd/unix/u9fs/plan9.h - 664 sys sys 1205963190 5772
 sys/src/cmd/unix/u9fs/print.c - 664 sys sys 1095185028 1329
 sys/src/cmd/unix/u9fs/print.c - 664 sys sys 1095185028 1329
 sys/src/cmd/unix/u9fs/random.c - 664 sys sys 1015092352 812
 sys/src/cmd/unix/u9fs/random.c - 664 sys sys 1015092352 812
 sys/src/cmd/unix/u9fs/readn.c - 664 sys sys 1015092353 220
 sys/src/cmd/unix/u9fs/readn.c - 664 sys sys 1015092353 220
@@ -14120,7 +14124,7 @@ sys/src/cmd/unix/u9fs/safecpy.c - 664 sys sys 1043768486 212
 sys/src/cmd/unix/u9fs/strecpy.c - 664 sys sys 1015092353 193
 sys/src/cmd/unix/u9fs/strecpy.c - 664 sys sys 1015092353 193
 sys/src/cmd/unix/u9fs/sun-inttypes.h - 664 sys sys 1039110816 441
 sys/src/cmd/unix/u9fs/sun-inttypes.h - 664 sys sys 1039110816 441
 sys/src/cmd/unix/u9fs/tokenize.c - 664 sys sys 1015092353 602
 sys/src/cmd/unix/u9fs/tokenize.c - 664 sys sys 1015092353 602
-sys/src/cmd/unix/u9fs/u9fs.c - 664 sys sys 1095185027 30960
+sys/src/cmd/unix/u9fs/u9fs.c - 664 sys sys 1205963230 31901
 sys/src/cmd/unix/u9fs/u9fs.h - 664 sys sys 1043768488 649
 sys/src/cmd/unix/u9fs/u9fs.h - 664 sys sys 1043768488 649
 sys/src/cmd/unix/u9fs/u9fsauth.h - 664 sys sys 1015092354 126
 sys/src/cmd/unix/u9fs/u9fsauth.h - 664 sys sys 1015092354 126
 sys/src/cmd/unix/u9fs/utfrune.c - 664 sys sys 1015092354 387
 sys/src/cmd/unix/u9fs/utfrune.c - 664 sys sys 1015092354 387
@@ -15869,3 +15873,5 @@ usr/glenda/lib/profile - 664 glenda glenda 1105128663 890
 usr/glenda/readme.acme - 664 glenda glenda 1019860628 4753
 usr/glenda/readme.acme - 664 glenda glenda 1019860628 4753
 usr/glenda/readme.rio - 664 glenda glenda 1019860628 6370
 usr/glenda/readme.rio - 664 glenda glenda 1019860628 6370
 usr/glenda/tmp - 20000000775 glenda glenda 1018802620 0
 usr/glenda/tmp - 20000000775 glenda glenda 1018802620 0
+sys/src/9/pc/sdata.c - 664 sys sys 1205986828 53185
+sys/src/cmd/ndb/query.c - 664 sys sys 1205986702 1913

+ 15 - 11
dist/replica/plan9.db

@@ -320,6 +320,7 @@
 386/bin/ip/tftpd - 775 sys sys 1204292520 131963
 386/bin/ip/tftpd - 775 sys sys 1204292520 131963
 386/bin/ip/traceroute - 775 sys sys 1198211710 72783
 386/bin/ip/traceroute - 775 sys sys 1198211710 72783
 386/bin/ip/udpecho - 775 sys sys 1178508500 43095
 386/bin/ip/udpecho - 775 sys sys 1178508500 43095
+386/bin/ip/wol - 775 sys sys 1205983484 47866
 386/bin/join - 775 sys sys 1168402330 114382
 386/bin/join - 775 sys sys 1168402330 114382
 386/bin/jpg - 775 sys sys 1179372097 174971
 386/bin/jpg - 775 sys sys 1179372097 174971
 386/bin/kbmap - 775 sys sys 1197732770 144079
 386/bin/kbmap - 775 sys sys 1197732770 144079
@@ -5845,7 +5846,7 @@ sys/games - 20000000775 sys sys 1117225532 0
 sys/games/lib - 20000000775 sys sys 1165337608 0
 sys/games/lib - 20000000775 sys sys 1165337608 0
 sys/games/lib/4scores - 10000000666 sys sys 1118680448 0
 sys/games/lib/4scores - 10000000666 sys sys 1118680448 0
 sys/games/lib/5scores - 10000000666 sys sys 1118680453 0
 sys/games/lib/5scores - 10000000666 sys sys 1118680453 0
-sys/games/lib/fortunes - 664 sys sys 1203873355 268816
+sys/games/lib/fortunes - 664 sys sys 1205934831 268872
 sys/games/lib/mahjongg - 20000000775 sys sys 1095792278 0
 sys/games/lib/mahjongg - 20000000775 sys sys 1095792278 0
 sys/games/lib/mahjongg/backgrounds - 20000000775 sys sys 1095792293 0
 sys/games/lib/mahjongg/backgrounds - 20000000775 sys sys 1095792293 0
 sys/games/lib/mahjongg/backgrounds/default.bit - 664 sys sys 1095792293 346803
 sys/games/lib/mahjongg/backgrounds/default.bit - 664 sys sys 1095792293 346803
@@ -7430,7 +7431,7 @@ sys/man/1/leak - 664 sys sys 1196638935 4373
 sys/man/1/lens - 664 sys sys 1196638932 1272
 sys/man/1/lens - 664 sys sys 1196638932 1272
 sys/man/1/lex - 664 sys sys 1196638932 1520
 sys/man/1/lex - 664 sys sys 1196638932 1520
 sys/man/1/look - 664 sys sys 1196638932 1357
 sys/man/1/look - 664 sys sys 1196638932 1357
-sys/man/1/lp - 664 sys sys 1196638935 3329
+sys/man/1/lp - 664 sys sys 1205952886 3350
 sys/man/1/ls - 664 sys sys 1196638932 2890
 sys/man/1/ls - 664 sys sys 1196638932 2890
 sys/man/1/mail - 664 sys sys 1196638935 2158
 sys/man/1/mail - 664 sys sys 1196638935 2158
 sys/man/1/man - 664 sys sys 1196638932 2006
 sys/man/1/man - 664 sys sys 1196638932 2006
@@ -7452,7 +7453,7 @@ sys/man/1/ns - 664 sys sys 1196638935 895
 sys/man/1/p - 664 sys sys 1196638933 504
 sys/man/1/p - 664 sys sys 1196638933 504
 sys/man/1/page - 664 sys sys 1196638935 5839
 sys/man/1/page - 664 sys sys 1196638935 5839
 sys/man/1/passwd - 664 sys sys 1201730866 1591
 sys/man/1/passwd - 664 sys sys 1201730866 1591
-sys/man/1/patch - 664 sys sys 1196638936 2588
+sys/man/1/patch - 664 sys sys 1205952914 3356
 sys/man/1/pcc - 664 sys sys 1196638933 3478
 sys/man/1/pcc - 664 sys sys 1196638933 3478
 sys/man/1/pic - 664 sys sys 1196638933 8229
 sys/man/1/pic - 664 sys sys 1196638933 8229
 sys/man/1/pipefile - 664 sys sys 1196638936 1861
 sys/man/1/pipefile - 664 sys sys 1196638936 1861
@@ -7754,7 +7755,7 @@ sys/man/4/snap - 664 sys sys 1196638944 1908
 sys/man/4/srv - 664 sys sys 1196638944 4970
 sys/man/4/srv - 664 sys sys 1196638944 4970
 sys/man/4/tapefs - 664 sys sys 1196638944 1861
 sys/man/4/tapefs - 664 sys sys 1196638944 1861
 sys/man/4/telco - 664 sys sys 1196638944 4359
 sys/man/4/telco - 664 sys sys 1196638944 4359
-sys/man/4/u9fs - 664 sys sys 1196638944 4748
+sys/man/4/u9fs - 664 sys sys 1205964618 5225
 sys/man/4/upasfs - 664 sys sys 1196638944 6212
 sys/man/4/upasfs - 664 sys sys 1196638944 6212
 sys/man/4/usb - 664 sys sys 1203552814 5677
 sys/man/4/usb - 664 sys sys 1203552814 5677
 sys/man/4/usbd - 664 sys sys 1202846392 1035
 sys/man/4/usbd - 664 sys sys 1202846392 1035
@@ -7805,6 +7806,7 @@ sys/man/6/regexp - 664 sys sys 1196638945 2050
 sys/man/6/rewrite - 664 sys sys 1196638945 3235
 sys/man/6/rewrite - 664 sys sys 1196638945 3235
 sys/man/6/smtpd - 664 sys sys 1196638945 8178
 sys/man/6/smtpd - 664 sys sys 1196638945 8178
 sys/man/6/snap - 664 sys sys 1196638945 2402
 sys/man/6/snap - 664 sys sys 1196638945 2402
+sys/man/6/style - 664 sys sys 1205985568 2659
 sys/man/6/thumbprint - 664 sys sys 1196638945 1124
 sys/man/6/thumbprint - 664 sys sys 1196638945 1124
 sys/man/6/users - 664 sys sys 1196638945 1392
 sys/man/6/users - 664 sys sys 1196638945 1392
 sys/man/6/utf - 664 sys sys 1196638945 2430
 sys/man/6/utf - 664 sys sys 1196638945 2430
@@ -7850,11 +7852,11 @@ sys/man/8/getflags - 664 sys sys 1196638947 1713
 sys/man/8/gpsfs - 664 sys sys 1196638947 4918
 sys/man/8/gpsfs - 664 sys sys 1196638947 4918
 sys/man/8/httpd - 664 sys sys 1196638947 6866
 sys/man/8/httpd - 664 sys sys 1196638947 6866
 sys/man/8/init - 664 sys sys 1196638947 1430
 sys/man/8/init - 664 sys sys 1196638947 1430
-sys/man/8/ipconfig - 664 sys sys 1204424262 8203
+sys/man/8/ipconfig - 664 sys sys 1205960389 8284
 sys/man/8/ipserv - 664 sys sys 1202161489 3268
 sys/man/8/ipserv - 664 sys sys 1202161489 3268
 sys/man/8/kfscmd - 664 sys sys 1196638947 4514
 sys/man/8/kfscmd - 664 sys sys 1196638947 4514
 sys/man/8/listen - 664 sys sys 1205796105 4090
 sys/man/8/listen - 664 sys sys 1205796105 4090
-sys/man/8/lp - 664 sys sys 1196638947 2491
+sys/man/8/lp - 664 sys sys 1205960257 2490
 sys/man/8/mk9660 - 664 sys sys 1196638947 3946
 sys/man/8/mk9660 - 664 sys sys 1196638947 3946
 sys/man/8/mkfs - 664 sys sys 1196638947 3427
 sys/man/8/mkfs - 664 sys sys 1196638947 3427
 sys/man/8/mkpaqfs - 664 sys sys 1196638947 890
 sys/man/8/mkpaqfs - 664 sys sys 1196638947 890
@@ -7897,6 +7899,7 @@ sys/man/8/venti - 664 sys sys 1197570117 12190
 sys/man/8/venti-backup - 664 sys sys 1202925137 2290
 sys/man/8/venti-backup - 664 sys sys 1202925137 2290
 sys/man/8/venti-fmt - 664 sys sys 1196638948 8626
 sys/man/8/venti-fmt - 664 sys sys 1196638948 8626
 sys/man/8/vga - 664 sys sys 1196638948 4129
 sys/man/8/vga - 664 sys sys 1196638948 4129
+sys/man/8/wol - 664 sys sys 1205960109 743
 sys/man/fonts - 664 sys sys 1196638948 218
 sys/man/fonts - 664 sys sys 1196638948 218
 sys/man/index.html - 664 sys sys 1196638948 1859
 sys/man/index.html - 664 sys sys 1196638948 1859
 sys/man/mkfile - 664 sys sys 1196638948 2264
 sys/man/mkfile - 664 sys sys 1196638948 2264
@@ -8175,7 +8178,7 @@ sys/src/9/pc/screen.h - 664 sys sys 1147023549 4256
 sys/src/9/pc/sd53c8xx.c - 664 sys sys 1170456695 55276
 sys/src/9/pc/sd53c8xx.c - 664 sys sys 1170456695 55276
 sys/src/9/pc/sd53c8xx.i - 664 sys sys 1128547230 28453
 sys/src/9/pc/sd53c8xx.i - 664 sys sys 1128547230 28453
 sys/src/9/pc/sd53c8xx.n - 664 sys sys 1131290556 12657
 sys/src/9/pc/sd53c8xx.n - 664 sys sys 1131290556 12657
-sys/src/9/pc/sdata.c - 664 sys sys 1202251523 53036
+sys/src/9/pc/sdata.c - 664 sys sys 1205986828 53185
 sys/src/9/pc/sdiahci.c - 664 sys sys 1200348596 38496
 sys/src/9/pc/sdiahci.c - 664 sys sys 1200348596 38496
 sys/src/9/pc/sdmv50xx.c - 664 sys sys 1204232564 34031
 sys/src/9/pc/sdmv50xx.c - 664 sys sys 1204232564 34031
 sys/src/9/pc/sdmylex.c - 664 sys sys 1189229947 28395
 sys/src/9/pc/sdmylex.c - 664 sys sys 1189229947 28395
@@ -12547,7 +12550,7 @@ sys/src/cmd/ip/ipconfig/mkfile - 664 sys sys 1204591120 575
 sys/src/cmd/ip/ipconfig/ppp.c - 664 sys sys 1184880751 1046
 sys/src/cmd/ip/ipconfig/ppp.c - 664 sys sys 1184880751 1046
 sys/src/cmd/ip/linklocal.c - 664 sys sys 1197673397 1751
 sys/src/cmd/ip/linklocal.c - 664 sys sys 1197673397 1751
 sys/src/cmd/ip/measure.c - 664 sys sys 944961011 3733
 sys/src/cmd/ip/measure.c - 664 sys sys 944961011 3733
-sys/src/cmd/ip/mkfile - 664 sys sys 1185920805 1267
+sys/src/cmd/ip/mkfile - 664 sys sys 1205960050 1273
 sys/src/cmd/ip/ping.c - 664 sys sys 1198188930 10554
 sys/src/cmd/ip/ping.c - 664 sys sys 1198188930 10554
 sys/src/cmd/ip/ppp - 20000000775 sys sys 1065963823 0
 sys/src/cmd/ip/ppp - 20000000775 sys sys 1065963823 0
 sys/src/cmd/ip/ppp/block.c - 664 sys sys 1015090266 5353
 sys/src/cmd/ip/ppp/block.c - 664 sys sys 1015090266 5353
@@ -12621,6 +12624,7 @@ sys/src/cmd/ip/telnetd.c - 664 sys sys 1135487948 11772
 sys/src/cmd/ip/tftpd.c - 664 sys sys 1106943821 7646
 sys/src/cmd/ip/tftpd.c - 664 sys sys 1106943821 7646
 sys/src/cmd/ip/traceroute.c - 664 sys sys 1198186109 8747
 sys/src/cmd/ip/traceroute.c - 664 sys sys 1198186109 8747
 sys/src/cmd/ip/udpecho.c - 664 sys sys 1178483004 789
 sys/src/cmd/ip/udpecho.c - 664 sys sys 1178483004 789
+sys/src/cmd/ip/wol.c - 664 sys sys 1205960041 1615
 sys/src/cmd/join.c - 664 sys sys 1158251357 7550
 sys/src/cmd/join.c - 664 sys sys 1158251357 7550
 sys/src/cmd/jpg - 20000000775 sys sys 1132458749 0
 sys/src/cmd/jpg - 20000000775 sys sys 1132458749 0
 sys/src/cmd/jpg/bmp.c - 664 sys sys 1108852826 4222
 sys/src/cmd/jpg/bmp.c - 664 sys sys 1108852826 4222
@@ -12844,7 +12848,7 @@ sys/src/cmd/ndb/mkdb.c - 664 sys sys 957402054 2886
 sys/src/cmd/ndb/mkfile - 664 sys sys 1205354106 2000
 sys/src/cmd/ndb/mkfile - 664 sys sys 1205354106 2000
 sys/src/cmd/ndb/mkhash.c - 664 sys sys 1014926160 2899
 sys/src/cmd/ndb/mkhash.c - 664 sys sys 1014926160 2899
 sys/src/cmd/ndb/mkhosts.c - 664 sys sys 957402054 4294
 sys/src/cmd/ndb/mkhosts.c - 664 sys sys 957402054 4294
-sys/src/cmd/ndb/query.c - 664 sys sys 1188422202 1793
+sys/src/cmd/ndb/query.c - 664 sys sys 1205986702 1913
 sys/src/cmd/netstat.c - 664 sys sys 1128255434 4086
 sys/src/cmd/netstat.c - 664 sys sys 1128255434 4086
 sys/src/cmd/news.c - 664 sys sys 1014926614 3778
 sys/src/cmd/news.c - 664 sys sys 1014926614 3778
 sys/src/cmd/nfs.c - 664 sys sys 1050068720 31096
 sys/src/cmd/nfs.c - 664 sys sys 1050068720 31096
@@ -14110,7 +14114,7 @@ sys/src/cmd/unix/u9fs/fcallconv.c - 664 sys sys 1043768485 5467
 sys/src/cmd/unix/u9fs/makefile - 664 sys sys 1048969298 1064
 sys/src/cmd/unix/u9fs/makefile - 664 sys sys 1048969298 1064
 sys/src/cmd/unix/u9fs/oldfcall.c - 664 sys sys 1015092352 7595
 sys/src/cmd/unix/u9fs/oldfcall.c - 664 sys sys 1015092352 7595
 sys/src/cmd/unix/u9fs/oldfcall.h - 664 sys sys 1015092352 914
 sys/src/cmd/unix/u9fs/oldfcall.h - 664 sys sys 1015092352 914
-sys/src/cmd/unix/u9fs/plan9.h - 664 sys sys 1095185027 5748
+sys/src/cmd/unix/u9fs/plan9.h - 664 sys sys 1205963190 5772
 sys/src/cmd/unix/u9fs/print.c - 664 sys sys 1095185028 1329
 sys/src/cmd/unix/u9fs/print.c - 664 sys sys 1095185028 1329
 sys/src/cmd/unix/u9fs/random.c - 664 sys sys 1015092352 812
 sys/src/cmd/unix/u9fs/random.c - 664 sys sys 1015092352 812
 sys/src/cmd/unix/u9fs/readn.c - 664 sys sys 1015092353 220
 sys/src/cmd/unix/u9fs/readn.c - 664 sys sys 1015092353 220
@@ -14120,7 +14124,7 @@ sys/src/cmd/unix/u9fs/safecpy.c - 664 sys sys 1043768486 212
 sys/src/cmd/unix/u9fs/strecpy.c - 664 sys sys 1015092353 193
 sys/src/cmd/unix/u9fs/strecpy.c - 664 sys sys 1015092353 193
 sys/src/cmd/unix/u9fs/sun-inttypes.h - 664 sys sys 1039110816 441
 sys/src/cmd/unix/u9fs/sun-inttypes.h - 664 sys sys 1039110816 441
 sys/src/cmd/unix/u9fs/tokenize.c - 664 sys sys 1015092353 602
 sys/src/cmd/unix/u9fs/tokenize.c - 664 sys sys 1015092353 602
-sys/src/cmd/unix/u9fs/u9fs.c - 664 sys sys 1095185027 30960
+sys/src/cmd/unix/u9fs/u9fs.c - 664 sys sys 1205963230 31901
 sys/src/cmd/unix/u9fs/u9fs.h - 664 sys sys 1043768488 649
 sys/src/cmd/unix/u9fs/u9fs.h - 664 sys sys 1043768488 649
 sys/src/cmd/unix/u9fs/u9fsauth.h - 664 sys sys 1015092354 126
 sys/src/cmd/unix/u9fs/u9fsauth.h - 664 sys sys 1015092354 126
 sys/src/cmd/unix/u9fs/utfrune.c - 664 sys sys 1015092354 387
 sys/src/cmd/unix/u9fs/utfrune.c - 664 sys sys 1015092354 387

+ 16 - 0
dist/replica/plan9.log

@@ -18811,3 +18811,19 @@
 1205857803 1 c sys/man/4/usbdisk - 664 sys sys 1205857582 3044
 1205857803 1 c sys/man/4/usbdisk - 664 sys sys 1205857582 3044
 1205874004 0 c sys/src/cmd/stats.c - 664 sys sys 1205873637 28451
 1205874004 0 c sys/src/cmd/stats.c - 664 sys sys 1205873637 28451
 1205897405 0 c 386/bin/stats - 775 sys sys 1205897310 191360
 1205897405 0 c 386/bin/stats - 775 sys sys 1205897310 191360
+1205935204 0 c sys/games/lib/fortunes - 664 sys sys 1205934831 268872
+1205953204 0 c sys/man/1/lp - 664 sys sys 1205952886 3350
+1205953204 1 c sys/man/1/patch - 664 sys sys 1205952914 3356
+1205953204 2 a sys/man/6/style - 664 sys sys 1205952863 2619
+1205960405 0 c sys/man/8/ipconfig - 664 sys sys 1205960389 8284
+1205960405 1 c sys/man/8/lp - 664 sys sys 1205960257 2490
+1205960405 2 a sys/man/8/wol - 664 sys sys 1205960109 743
+1205960405 3 c sys/src/cmd/ip/mkfile - 664 sys sys 1205960050 1273
+1205960405 4 a sys/src/cmd/ip/wol.c - 664 sys sys 1205960041 1615
+1205964004 0 c sys/src/cmd/unix/u9fs/plan9.h - 664 sys sys 1205963190 5772
+1205964004 1 c sys/src/cmd/unix/u9fs/u9fs.c - 664 sys sys 1205963230 31901
+1205965804 0 c sys/man/4/u9fs - 664 sys sys 1205964618 5225
+1205983805 0 a 386/bin/ip/wol - 775 sys sys 1205983484 47866
+1205985604 0 c sys/man/6/style - 664 sys sys 1205985568 2659
+1205987404 0 c sys/src/9/pc/sdata.c - 664 sys sys 1205986828 53185
+1205987404 1 c sys/src/cmd/ndb/query.c - 664 sys sys 1205986702 1913

+ 1 - 0
sys/games/lib/fortunes

@@ -4216,3 +4216,4 @@ ADDITIONAL METAPHOR SPOILER ALERT: ``The Old Man and the Sea'' is not just about
 I claim that Mach people (and apparently FreeBSD) are incompetent idiots. Playing games with VM is bad. memory copies are _also_ bad, but quite frankly, memory copies often have _less_ downside than VM games, and bigger caches will only continue to drive that point home. - Linus Torvalds on vmsplice() versus COW
 I claim that Mach people (and apparently FreeBSD) are incompetent idiots. Playing games with VM is bad. memory copies are _also_ bad, but quite frankly, memory copies often have _less_ downside than VM games, and bigger caches will only continue to drive that point home. - Linus Torvalds on vmsplice() versus COW
 Nothing is more hateful to wisdom than excessive cleverness - Seneca (according to Poe)
 Nothing is more hateful to wisdom than excessive cleverness - Seneca (according to Poe)
 Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away. - Antoine de Saint-Exupery
 Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away. - Antoine de Saint-Exupery
+  bucket = Buckets + pe; /* bucket = &(Buckets[pe]); */

+ 8 - 6
sys/man/1/lp

@@ -15,7 +15,7 @@ is a generalized output printing service.
 It can be used to queue files for printing,
 It can be used to queue files for printing,
 check a queue, or kill jobs in a queue.
 check a queue, or kill jobs in a queue.
 The options are:
 The options are:
-.TF -p\ \fIproc\fP
+.TF -d\ \fIde\fP
 .TP
 .TP
 .BI -d " dest"
 .BI -d " dest"
 Select the destination printer.
 Select the destination printer.
@@ -60,7 +60,7 @@ entry in
 .LR /sys/lib/lp/devices .
 .LR /sys/lib/lp/devices .
 .TP
 .TP
 .B -k
 .B -k
-Kill the job(s) given as subsequent arguments instead of file names
+Kill the job(s) given as subsequent arguments, instead of file names,
 for the given destination.
 for the given destination.
 .TP
 .TP
 .BI -p " proc"
 .BI -p " proc"
@@ -88,7 +88,7 @@ before running this command.
 .PP
 .PP
 The remaining options may be used to affect the output at a given device.
 The remaining options may be used to affect the output at a given device.
 These options may not be applicable to all devices.
 These options may not be applicable to all devices.
-.TF "-p\ \fIproc\fP"
+.TF "-p\ \fIpr\fP"
 .TP
 .TP
 .BI -c " n"
 .BI -c " n"
 Print
 Print
@@ -106,11 +106,11 @@ Suppress printing of header page.
 Select paper input tray.
 Select paper input tray.
 .I n
 .I n
 may be a number 0-9, the word
 may be a number 0-9, the word
-.I man
+.L man
 for the manual feed slot, and/or
 for the manual feed slot, and/or
-.I simplex
+.L simplex
 or
 or
-.I duplex
+.L duplex
 to get single or double sided output.
 to get single or double sided output.
 Multiple input tray options may be specified if they are
 Multiple input tray options may be specified if they are
 separated by commas.
 separated by commas.
@@ -176,7 +176,9 @@ Print a file in a small font at 100 lines per page.
 lp -dstdout /dev/windows/3/window > doc.ps
 lp -dstdout /dev/windows/3/window > doc.ps
 Convert an image to a postscript file.
 Convert an image to a postscript file.
 .SH SOURCE
 .SH SOURCE
+.nf
 .B /rc/bin/lp
 .B /rc/bin/lp
+.B /sys/src/cmd/lp
 .SH SEE ALSO
 .SH SEE ALSO
 .IR lp (8)
 .IR lp (8)
 .br
 .br

+ 32 - 4
sys/man/1/patch

@@ -47,12 +47,31 @@ a description of the patch from standard input:
 please provide an explanation of what the change is supposed to do,
 please provide an explanation of what the change is supposed to do,
 some context, and a rationale for the change.
 some context, and a rationale for the change.
 Test data or pointers to same to verify that the fix works are also welcome.
 Test data or pointers to same to verify that the fix works are also welcome.
+When sending a patch, follow these guidelines:
+.IP • 3
+If this is a bug fix, explain the bug clearly.
+Don't assume the bug is obvious from the fix.
+.IP •
+If this is a new feature, explain it clearly.
+Don't assume it is obvious from the change.
+.IP •
+Make the new code look as much like the old code as possible:
+don't make gratuitous changes, and do follow the style of the old code.
+See
+.IR style (6)
+for the canonical Plan 9 coding style.
+.IP •
+If your patch changes externally-visible behaviour,
+update the manual page.
+.PP
 The
 The
 .I email
 .I email
 address, if not
 address, if not
 .LR - ,
 .LR - ,
-will be sent notification messages when the patch is applied
+will be sent notification messages when the patch is applied, rejected,
 or commented on.
 or commented on.
+If rejected, the e-mail will contain a note explaining why and
+probably listing suggested changes and encouraging you to resubmit.
 .PP
 .PP
 .I Patch/list
 .I Patch/list
 displays information about the named patches,
 displays information about the named patches,
@@ -64,8 +83,9 @@ source files and the patched source files.
 .PP
 .PP
 .I Patch/apply
 .I Patch/apply
 applies the patch to the current source tree.
 applies the patch to the current source tree.
-It is intended to be run by the Plan 9 developers 
-with emelie as their root file system.
+It is intended to be run by the Plan 9 developers  with
+.B yoshimi
+as their root file system.
 If the source has changed since the patch was
 If the source has changed since the patch was
 created,
 created,
 .I apply
 .I apply
@@ -84,10 +104,10 @@ being replaced is not byte-identical to the one
 created by 
 created by 
 .I patch/apply.
 .I patch/apply.
 .SH EXAMPLES
 .SH EXAMPLES
-.PP
 Propose a change to
 Propose a change to
 .IR pwd ,
 .IR pwd ,
 which you have modified locally:
 which you have modified locally:
+.IP
 .EX
 .EX
 % patch/create pwd-errors user@host.dom /sys/src/cmd/pwd.c
 % patch/create pwd-errors user@host.dom /sys/src/cmd/pwd.c
 Fix pwd to print errors to fd 2 rather than 1.
 Fix pwd to print errors to fd 2 rather than 1.
@@ -96,23 +116,29 @@ Fix pwd to print errors to fd 2 rather than 1.
 .EE
 .EE
 .PP
 .PP
 Then the developers at Bell Labs run
 Then the developers at Bell Labs run
+.IP
 .EX
 .EX
 patch/diff pwd-errors
 patch/diff pwd-errors
 .EE
 .EE
+.PP
 to inspect the change (possibly viewing
 to inspect the change (possibly viewing
 .B /n/sources/patch/pwd-errors/pwd.c
 .B /n/sources/patch/pwd-errors/pwd.c
 to see the larger context).
 to see the larger context).
 To make the change, they run
 To make the change, they run
+.IP
 .EX
 .EX
 patch/apply pwd-errors
 patch/apply pwd-errors
 .EE
 .EE
+.LP
 Otherwise they run
 Otherwise they run
+.IP
 .EX
 .EX
 % patch/note pwd-errors
 % patch/note pwd-errors
 Pwd should definitely print errors to fd 1 because ...
 Pwd should definitely print errors to fd 1 because ...
 ^D
 ^D
 % 
 % 
 .EE
 .EE
+.PP
 to add a note to the 
 to add a note to the 
 .B /n/sources/pwd-errors/notes
 .B /n/sources/pwd-errors/notes
 file.
 file.
@@ -122,3 +148,5 @@ file.
 .B /rc/bin/patch
 .B /rc/bin/patch
 .SH SEE ALSO
 .SH SEE ALSO
 .IR diff (1)
 .IR diff (1)
+.br
+.B http://plan9.bell-labs.com/wiki/plan9/How_to_contribute

+ 52 - 24
sys/man/4/u9fs

@@ -30,7 +30,7 @@ u9fs \- serve 9P from Unix
 .I U9fs
 .I U9fs
 is
 is
 .I not
 .I not
-a Plan 9 program.  Instead it is a program that 
+a Plan 9 program.  Instead it is a program that
 serves Unix files to Plan 9 machines using the 9P protocol
 serves Unix files to Plan 9 machines using the 9P protocol
 (see
 (see
 .IR intro (5)).
 .IR intro (5)).
@@ -44,26 +44,32 @@ It typically runs as user
 and multiplexes access to multiple Plan 9 clients over the single wire.
 and multiplexes access to multiple Plan 9 clients over the single wire.
 It assumes Plan 9 uids match Unix login names,
 It assumes Plan 9 uids match Unix login names,
 and changes to the corresponding Unix effective uid when processing requests.
 and changes to the corresponding Unix effective uid when processing requests.
+Characters in file and directory names unacceptable to Plan 9 are translated
+into a three-character sequence:
+.L \e
+followed by two hexadecimal digits.
 .I U9fs
 .I U9fs
 serves both 9P1 (the 9P protocol as used by
 serves both 9P1 (the 9P protocol as used by
 the second and third editions of Plan 9) and 9P2000.
 the second and third editions of Plan 9) and 9P2000.
 .PP
 .PP
 The options are:
 The options are:
+.TF "\f(CW-A \fIautharg"
+.PD
 .TP
 .TP
 .B -D
 .B -D
-Write very chatty debugging output to the log file (see 
-.B -l 
+Write very chatty debugging output to the log file (see
+.B -l
 option below).
 option below).
 .TP
 .TP
 .B -n
 .B -n
-Signals that 
+Signals that
 .I u9fs
 .I u9fs
-is 
+is
 .I not
 .I not
 being invoked with a network connection
 being invoked with a network connection
 on standard input and output, and thus should
 on standard input and output, and thus should
 not try to determine the remote address of the connection.
 not try to determine the remote address of the connection.
-This is useful when 
+This is useful when
 .I u9fs
 .I u9fs
 is not invoked from
 is not invoked from
 .I inetd
 .I inetd
@@ -71,7 +77,7 @@ is not invoked from
 .TP
 .TP
 .B -z
 .B -z
 Truncate the log file on startup.  This is useful mainly when debugging
 Truncate the log file on startup.  This is useful mainly when debugging
-with 
+with
 .BR -D .
 .BR -D .
 .TP
 .TP
 .BI -a " authtype
 .BI -a " authtype
@@ -85,26 +91,27 @@ or
 The default is
 The default is
 .BR rhosts ,
 .BR rhosts ,
 which uses the
 which uses the
-.I ruserok 
+.I ruserok
 library call to authenticate users by entries in
 library call to authenticate users by entries in
 .B /etc/hosts.equiv
 .B /etc/hosts.equiv
 or
 or
 .BR $HOME/.rhosts .
 .BR $HOME/.rhosts .
 This default is discouraged for all but the most controlled networks.
 This default is discouraged for all but the most controlled networks.
-Specifying 
+Specifying
 .B none
 .B none
 turns off authentication altogether.
 turns off authentication altogether.
-This is useful when 
+This is useful when
 .I u9fs
 .I u9fs
 is not invoked from
 is not invoked from
 .I inetd
 .I inetd
 (see examples below, or
 (see examples below, or
 .I srvssh
 .I srvssh
-in .IR srv (4)).
+in
+.IR srv (4)).
 Specifying
 Specifying
 .B p9any
 .B p9any
 uses the fourth edition Plan 9 authentication mechanisms.
 uses the fourth edition Plan 9 authentication mechanisms.
-The file 
+The file
 .BR /etc/u9fs.key ,
 .BR /etc/u9fs.key ,
 or
 or
 .I autharg
 .I autharg
@@ -112,10 +119,27 @@ if specified
 (see the
 (see the
 .B -A
 .B -A
 option),
 option),
-is consulted for the authentication data.
-The file must contain exactly three lines:
-the plaintext password, the user id, and
-the authentication domain.
+is consulted for the authentication data
+and should be suitably protected.
+This file must contain exactly three lines:
+.I secret
+(plaintext password),
+.I u9fs-user
+(user id),
+and
+.I plan9-auth.dom
+(authentication domain).
+.RS
+.LP
+Finally,
+.I factotum
+must be taught a key of the form:
+.LP
+.EX
+.B
+key proto=p9sk1 dom=\fIplan9-auth.dom\fP user=\fIu9fs-user\fP !password=\fIsecret\fP
+.EE
+.RE
 .TP
 .TP
 .BI -A " autharg
 .BI -A " autharg
 Used to specify an argument to the authentication method.
 Used to specify an argument to the authentication method.
@@ -128,20 +152,19 @@ The out-of-the-box compile-time default is
 .BR /tmp/u9fs.log .
 .BR /tmp/u9fs.log .
 .TP
 .TP
 .BI -m " msize
 .BI -m " msize
-Set 
+Set
 .I msize
 .I msize
 for 9P2000
 for 9P2000
 (see
 (see
 .IR open (5)).
 .IR open (5)).
 .TP
 .TP
 .BI -u " user
 .BI -u " user
-Treat all attaches as coming from 
+Treat all attaches as coming from
 .IR user .
 .IR user .
 This is useful in some cases when running without
 This is useful in some cases when running without
 .IR inetd ;
 .IR inetd ;
 see the examples.
 see the examples.
-.SH
-EXAMPLES
+.SH EXAMPLES
 .PP
 .PP
 Plan 9 calls 9P file service
 Plan 9 calls 9P file service
 .B 9fs
 .B 9fs
@@ -224,14 +247,19 @@ On systems where listeners cannot be started,
 .IR execnet (4)
 .IR execnet (4)
 is useful for running
 is useful for running
 .I u9fs
 .I u9fs
-via mechanisms like
-.IR ssh .
+via other network mechanisms; the script
+.I srvssh
+in
+.IR srv (4)
+provides this for the
+.I ssh
+protocol.
 .SH SOURCE
 .SH SOURCE
 .B /sys/src/cmd/unix/u9fs
 .B /sys/src/cmd/unix/u9fs
 .SH DIAGNOSTICS
 .SH DIAGNOSTICS
 Problems are reported to the
 Problems are reported to the
 log file specified with the
 log file specified with the
-.B -l 
+.B -l
 option (default
 option (default
 .BR /tmp/u9fs.log ).
 .BR /tmp/u9fs.log ).
 The
 The
@@ -247,6 +275,6 @@ flag enables chatty debugging.
 The implementation of devices is unsatisfactory.
 The implementation of devices is unsatisfactory.
 .LP
 .LP
 Semantics like remove-on-close or the
 Semantics like remove-on-close or the
-atomicity of 
+atomicity of
 .B wstat
 .B wstat
 are hard to provide exactly.
 are hard to provide exactly.

+ 96 - 0
sys/man/6/style

@@ -0,0 +1,96 @@
+.TH STYLE 6
+.SH NAME
+style \- Plan 9 coding conventions for C
+.SH DESCRIPTION
+Plan 9 C code has its own conventions.
+You would do well to follow them.
+Here are a few:
+.IP • 3
+don't use
+.L //
+comments; some old Plan 9 code does, but we're converting it as we touch it.
+We do sometimes use
+.L //
+to comment-out a few lines of code.
+.IP •
+avoid
+.BR goto s.
+.IP •
+no tabs expanded to spaces.
+.IP •
+surround a binary operator (particular a low precedence one) with spaces;
+don't try to write the most compact code possible
+but rather the most readable.
+.IP •
+no white space before opening braces.
+.IP •
+no white space after the keywords
+.LR if ,
+.LR for ,
+.LR while ,
+etc.
+.IP •
+no braces around single-line blocks (e.g.,
+.LR if ,
+.LR for ,
+and
+.L while
+bodies).
+.IP •
+integer-valued functions return -1 on error, 0 or positive on success.
+.IP •
+functions that return errors should set
+.IR errstr (2).
+.IP •
+variable and function names are all lowercase, with no underscores.
+.IP •
+.B enum
+or
+.BR #define d
+constants should be Uppercase (or UPPERCASE).
+.IP •
+.B struct
+tags are Uppercase, with matching
+.BR typedef s.
+.IP •
+automatic variables (local variables inside a function) are
+never initialized at declaration.
+.IP •
+follow the standard idioms: use
+.L "x < 0"
+not
+.LR "0 > x" ,
+etc.
+.PP
+Ultimately, the goal is to write code that fits in with the other code
+around it and the system as a whole.  If the file you are editing
+already deviates from these guidelines, do what it does.  After you
+edit a file, a reader should not be able to tell just from coding
+style which parts you worked on.
+.SS COMMENTS
+If your code is readable, you shouldn't need many comments.  A line or
+two comment above a function explaining what it does is always welcome.
+.PP
+Comment any code you find yourself wondering about for more than 2
+seconds, even if it's to say that you don't understand what's going
+on.  Explain why.
+.PP
+Don't use commenting as an excuse for writing confusing code.  Rewrite
+the code to make it clear.
+.SS EFFICIENCY
+Do the simple thing.  Don't optimize unless you've measured the code
+and it is too slow.  Fix the data structures and the algorithms
+instead of going for little 5% tunings.
+.SH SEE ALSO
+``Notes on Programming in C'', Rob Pike,
+.br
+.B http://www.literateprogramming.com/pikestyle.pdf
+.SH BUGS
+Some programs use very different styles, for example,
+.IR rc .
+.PP
+Some programs and programmers diverge from the above rules due to
+habits formed long before these rules.
+Notably, some programs have a single space after a keyword and
+before an opening brace,
+and some initialize automatic variables at declaration.

+ 4 - 0
sys/man/8/ipconfig

@@ -82,6 +82,7 @@ may be
 .BR ether ,
 .BR ether ,
 .BR gbe ,
 .BR gbe ,
 .BR ppp ,
 .BR ppp ,
+.BR pkt ,
 or
 or
 .BR loopback .
 .BR loopback .
 The
 The
@@ -89,6 +90,9 @@ The
 type is equivalent to
 type is equivalent to
 .B ether
 .B ether
 except that it allows jumbo packets (up to ~9KB).
 except that it allows jumbo packets (up to ~9KB).
+The
+.B pkt
+interface passes all IP packets to and from a user program.
 For
 For
 .B ppp
 .B ppp
 the device can be any byte stream device.
 the device can be any byte stream device.

+ 1 - 1
sys/man/8/lp

@@ -21,7 +21,7 @@ The list of processors follows;
 after each description is a bracketed list of
 after each description is a bracketed list of
 .I lp
 .I lp
 options to which the processor responds:
 options to which the processor responds:
-.TF \fIp9bitpost\fP
+.TF \fIp9bitpos\fP
 .TP
 .TP
 .I dpost
 .I dpost
 converts
 converts

+ 42 - 0
sys/man/8/wol

@@ -0,0 +1,42 @@
+.TH WOL 8
+.SH NAME
+wol \- send wake-on-lan Ethernet packet
+.SH SYNOPSIS
+.B ip/wol
+[
+.B -v
+] [
+.B -a
+.I dialstr
+] [
+.B -c
+.I password
+]
+.I macaddr
+.SH DESCRIPTION
+.I Wol
+sends a magic wake-on-lan Ethernet packet to
+.IR dialstr
+(default
+.BR udp!255.255.255.255!0 ,
+the IPv4 broadcast address),
+intended to wake up the machine with an Ethernet interface with the MAC
+address
+.IR macaddr .
+.I Macaddr
+is not used to route the packet, but is inserted into the magic packet
+as required by the wake-on-lan protocol.
+.PP
+An optional
+.I password
+of at most six bytes can be sent.
+The option
+.B -v
+prints verbose information about the packet sent.
+.SH "SEE ALSO"
+.IR dial (2),
+.I parseether
+in
+.IR ip (2)
+.br
+.B http://en.wikipedia.org/wiki/Wake-on-LAN

+ 3 - 0
sys/src/9/pc/sdata.c

@@ -1955,6 +1955,9 @@ atapnp(void)
 			r = pcicfgr8(p, 0x46);
 			r = pcicfgr8(p, 0x46);
 			pcicfgw8(p, 0x46, (r & 0x0C)|0xF0);
 			pcicfgw8(p, 0x46, (r & 0x0C)|0xF0);
 			/*FALLTHROUGH*/
 			/*FALLTHROUGH*/
+		case (0x7401<<16)|0x1022:	/* AMD 755 Cobra */
+		case (0x7409<<16)|0x1022:	/* AMD 756 Viper */
+		case (0x7410<<16)|0x1022:	/* AMD 766 Viper Plus */
 		case (0x7469<<16)|0x1022:	/* AMD 3111 */
 		case (0x7469<<16)|0x1022:	/* AMD 3111 */
 			/*
 			/*
 			 * This can probably be lumped in with the 768 above.
 			 * This can probably be lumped in with the 768 above.

+ 1 - 0
sys/src/cmd/ip/mkfile

@@ -20,6 +20,7 @@ TARG = 	6in4\
 	tftpd\
 	tftpd\
 	traceroute\
 	traceroute\
 	udpecho\
 	udpecho\
+	wol\
 
 
 DIRS=ftpfs dhcpd httpd ipconfig ppp imap4d snoopy
 DIRS=ftpfs dhcpd httpd ipconfig ppp imap4d snoopy
 
 

+ 101 - 0
sys/src/cmd/ip/wol.c

@@ -0,0 +1,101 @@
+/* send wake-on-lan magic ethernet packet */
+#include <u.h>
+#include <libc.h>
+#include <ip.h>
+
+enum {
+	Eaddrlen = 6,	/* 48 bits */
+};
+
+typedef struct Wolpack Wolpack;
+struct Wolpack{
+	uchar	magic[6];
+	uchar	macs[16][Eaddrlen];
+	char	pass[6+1];
+};
+
+int verbose;
+
+void
+usage(void)
+{
+	fprint(2, "usage: wol [-v] [-a dialstr] [-c password] macaddr\n");
+	exits("usage");
+}
+
+void
+fillmac(Wolpack *w, uchar *mac)
+{
+	int i;
+
+	for(i = 0; i < nelem(w->macs); i++)
+		memmove(w->macs[i], mac, Eaddrlen);
+}
+
+void
+dumppack(Wolpack *w)
+{
+	int i;
+
+	print("packet: [\n");
+	print("\t%E\n", w->magic);
+	for(i = 0; i < nelem(w->macs); i++)
+		print("\t%E\n", w->macs[i]);
+	print("\t%6s\n", w->pass);
+	print("]\n");
+}
+
+void
+main(int argc, char* argv[])
+{
+	int fd, nw;
+	char *argmac, *pass, *address;
+	uchar mac[Eaddrlen];
+	static Wolpack w = {
+		.magic { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, }
+	};
+
+	address = pass = nil;
+	fmtinstall('E', eipfmt);
+
+	ARGBEGIN{
+	case 'a':
+		address = EARGF(usage());
+		break;
+	case 'c':
+		pass = EARGF(usage());
+		break;
+	case 'v':
+		verbose++;
+		break;
+	default:
+		usage();
+	}ARGEND
+
+	if(argc != 1)
+		usage();
+	argmac = argv[0];
+	if(verbose)
+		print("mac is %s, pass is %s\n", argmac, pass);
+
+	parseether(mac, argmac);
+	fillmac(&w, mac);
+	if(pass){
+		if(strlen(pass) > 6)
+			sysfatal("password greater than 6 bytes\n");
+		strcpy(w.pass, pass);
+	}
+	if(verbose)
+		dumppack(&w);
+
+	if(!address)
+		address = "udp!255.255.255.255!0";
+
+	fd = dial(address, nil, nil, nil);
+	if(fd < 0)
+		sysfatal("%s: %r", address);
+	nw = write(fd, &w, sizeof w);
+	if(nw != sizeof w)
+		sysfatal("error sending: %r");
+	exits(0);
+}

+ 10 - 7
sys/src/cmd/ndb/query.c

@@ -7,6 +7,7 @@
 #include <ndb.h>
 #include <ndb.h>
 
 
 static int all, multiple;
 static int all, multiple;
+static Biobuf bout;
 
 
 void
 void
 usage(void)
 usage(void)
@@ -22,7 +23,7 @@ prmatch(Ndbtuple *nt, char *rattr)
 {
 {
 	for(; nt; nt = nt->entry)
 	for(; nt; nt = nt->entry)
 		if (strcmp(nt->attr, rattr) == 0)
 		if (strcmp(nt->attr, rattr) == 0)
-			print("%s\n", nt->val);
+			Bprint(&bout, "%s\n", nt->val);
 }
 }
 
 
 void
 void
@@ -38,7 +39,7 @@ search(Ndb *db, char *attr, char *val, char *rattr)
 		if (multiple)
 		if (multiple)
 			prmatch(t, rattr);
 			prmatch(t, rattr);
 		else if(p)
 		else if(p)
-			print("%s\n", p);
+			Bprint(&bout, "%s\n", p);
 		ndbfree(t);
 		ndbfree(t);
 		free(p);
 		free(p);
 		return;
 		return;
@@ -57,8 +58,8 @@ search(Ndb *db, char *attr, char *val, char *rattr)
 	/* all entries */
 	/* all entries */
 	for(t = ndbsearch(db, &s, attr, val); t; t = ndbsnext(&s, attr, val)){
 	for(t = ndbsearch(db, &s, attr, val); t; t = ndbsnext(&s, attr, val)){
 		for(nt = t; nt; nt = nt->entry)
 		for(nt = t; nt; nt = nt->entry)
-			print("%s=%s ", nt->attr, nt->val);
-		print("\n");
+			Bprint(&bout, "%s=%s ", nt->attr, nt->val);
+		Bprint(&bout, "\n");
 		ndbfree(t);
 		ndbfree(t);
 	}
 	}
 }
 }
@@ -69,7 +70,7 @@ main(int argc, char **argv)
 	int reps = 1;
 	int reps = 1;
 	char *rattr = nil, *dbfile = nil;
 	char *rattr = nil, *dbfile = nil;
 	Ndb *db;
 	Ndb *db;
-
+	
 	ARGBEGIN{
 	ARGBEGIN{
 	case 'a':
 	case 'a':
 		all++;
 		all++;
@@ -78,7 +79,7 @@ main(int argc, char **argv)
 		multiple++;
 		multiple++;
 		break;
 		break;
 	case 'f':
 	case 'f':
-		dbfile = ARGF();
+		dbfile = EARGF(usage());
 		break;
 		break;
 	default:
 	default:
 		usage();
 		usage();
@@ -97,7 +98,9 @@ main(int argc, char **argv)
 	default:
 	default:
 		usage();
 		usage();
 	}
 	}
-	
+
+	if(Binit(&bout, 1, OWRITE) == -1)
+		sysfatal("Binit: %r");
 	db = ndbopen(dbfile);
 	db = ndbopen(dbfile);
 	if(db == nil){
 	if(db == nil){
 		fprint(2, "%s: no db files\n", argv0);
 		fprint(2, "%s: no db files\n", argv0);

+ 2 - 0
sys/src/cmd/unix/u9fs/plan9.h

@@ -62,7 +62,9 @@ typedef ushort Rune;
 
 
 #define nil ((void*)0)
 #define nil ((void*)0)
 #define	nelem(x)	(sizeof(x)/sizeof((x)[0]))
 #define	nelem(x)	(sizeof(x)/sizeof((x)[0]))
+#ifndef offsetof
 #define	offsetof(s, m)	(ulong)(&(((s*)0)->m))
 #define	offsetof(s, m)	(ulong)(&(((s*)0)->m))
+#endif
 #define	assert(x)	if(x);else _assert("x")
 #define	assert(x)	if(x);else _assert("x")
 
 
 extern char *argv0;
 extern char *argv0;

+ 66 - 11
sys/src/cmd/unix/u9fs/u9fs.c

@@ -69,7 +69,7 @@ struct Fid {
 void*	emalloc(size_t);
 void*	emalloc(size_t);
 void*	erealloc(void*, size_t);
 void*	erealloc(void*, size_t);
 char*	estrdup(char*);
 char*	estrdup(char*);
-char*	estrpath(char*, char*);
+char*	estrpath(char*, char*, int);
 void	sysfatal(char*, ...);
 void	sysfatal(char*, ...);
 int	okuser(char*);
 int	okuser(char*);
 
 
@@ -156,6 +156,20 @@ Auth *authmethods[] = {	/* first is default */
 
 
 Auth *auth;
 Auth *auth;
 
 
+/*
+ * frogs: characters not valid in plan9
+ * filenames, keep this list in sync with
+ * /sys/src/9/port/chan.c:1656
+ */
+char isfrog[256]={
+	/*NUL*/	1, 1, 1, 1, 1, 1, 1, 1,
+	/*BKS*/	1, 1, 1, 1, 1, 1, 1, 1,
+	/*DLE*/	1, 1, 1, 1, 1, 1, 1, 1,
+	/*CAN*/	1, 1, 1, 1, 1, 1, 1, 1,
+	['/']	1,
+	[0x7f]	1,
+};
+
 void
 void
 getfcallnew(int fd, Fcall *fc, int have)
 getfcallnew(int fd, Fcall *fc, int have)
 {
 {
@@ -611,7 +625,10 @@ stat2qid(struct stat *st)
 	memmove(p, &st->st_ino, q-p);
 	memmove(p, &st->st_ino, q-p);
 	q = q+sizeof(dev_t);
 	q = q+sizeof(dev_t);
 	if(q > ep){
 	if(q > ep){
-/*		fprint(2, "warning: inode number + device number too big %d+%d\n", sizeof(ino_t), sizeof(dev_t)); */
+/*
+ *		fprint(2, "warning: inode number + device number too big %d+%d\n",
+ *			sizeof(ino_t), sizeof(dev_t));
+ */
 		q = ep - sizeof(dev_t);
 		q = ep - sizeof(dev_t);
 		if(q < p)
 		if(q < p)
 			fprint(2, "warning: device number too big by itself\n");
 			fprint(2, "warning: device number too big by itself\n");
@@ -624,11 +641,45 @@ stat2qid(struct stat *st)
 	return qid;
 	return qid;
 }
 }
 
 
+char *
+enfrog(char *src)
+{
+	char *d, *dst;
+	uchar *s;
+
+	d = dst = emalloc(strlen(src)*3 + 1);
+	for (s = (uchar *)src; *s; s++)
+		if(isfrog[*s] || *s == '\\')
+			d += sprintf(d, "\\%02x", *s);
+		else
+			*d++ = *s;
+	*d = 0;
+	return dst;
+}
+
+char *
+defrog(char *s)
+{
+	char *d, *dst, buf[3];
+
+	d = dst = emalloc(strlen(s) + 1);
+	for(; *s; s++)
+		if(*s == '\\' && strlen(s) >= 3){
+			buf[0] = *++s;			/* skip \ */
+			buf[1] = *++s;
+			buf[2] = 0;
+			*d++ = strtoul(buf, NULL, 16);
+		} else
+			*d++ = *s;
+	*d = 0;
+	return dst;
+}
+
 void
 void
 stat2dir(char *path, struct stat *st, Dir *d)
 stat2dir(char *path, struct stat *st, Dir *d)
 {
 {
 	User *u;
 	User *u;
-	char *q;
+	char *q, *p, *npath;
 
 
 	memset(d, 0, sizeof(*d));
 	memset(d, 0, sizeof(*d));
 	d->qid = stat2qid(st);
 	d->qid = stat2qid(st);
@@ -642,9 +693,9 @@ stat2dir(char *path, struct stat *st, Dir *d)
 	d->muid = "";
 	d->muid = "";
 
 
 	if((q = strrchr(path, '/')) != nil)
 	if((q = strrchr(path, '/')) != nil)
-		d->name = q+1;
+		d->name = enfrog(q+1);
 	else
 	else
-		d->name = path;
+		d->name = enfrog(path);
 }
 }
 
 
 void
 void
@@ -703,7 +754,7 @@ rread(Fcall *rx, Fcall *tx)
 				fid->dirent = nil;
 				fid->dirent = nil;
 				continue;
 				continue;
 			}
 			}
-			path = estrpath(fid->path, fid->dirent->d_name);
+			path = estrpath(fid->path, fid->dirent->d_name, 0);
 			memset(&st, 0, sizeof st);
 			memset(&st, 0, sizeof st);
 			if(stat(path, &st) < 0){
 			if(stat(path, &st) < 0){
 				fprint(2, "dirread: stat(%s) failed: %s\n", path, strerror(errno));
 				fprint(2, "dirread: stat(%s) failed: %s\n", path, strerror(errno));
@@ -938,8 +989,7 @@ rwstat(Fcall *rx, Fcall *tx)
 			seterror(tx, "whoops: can't happen in u9fs");
 			seterror(tx, "whoops: can't happen in u9fs");
 			return;
 			return;
 		}
 		}
-	
-		new = estrpath(dir, d.name);
+		new = estrpath(dir, d.name, 1);
 		if(strcmp(old, new) != 0 && rename(old, new) < 0){
 		if(strcmp(old, new) != 0 && rename(old, new) < 0){
 			if(chatty9p)
 			if(chatty9p)
 				fprint(2, "rename(%s, %s) failed\n", old, new);
 				fprint(2, "rename(%s, %s) failed\n", old, new);
@@ -1139,7 +1189,7 @@ estrdup(char *p)
 }
 }
 
 
 char*
 char*
-estrpath(char *p, char *q)
+estrpath(char *p, char *q, int frog)
 {
 {
 	char *r, *s;
 	char *r, *s;
 
 
@@ -1152,11 +1202,16 @@ estrpath(char *p, char *q)
 		return r;
 		return r;
 	}
 	}
 
 
+	if(frog)
+		q = defrog(q);
+	else
+		q = strdup(q);
 	r = emalloc(strlen(p)+1+strlen(q)+1);
 	r = emalloc(strlen(p)+1+strlen(q)+1);
 	strcpy(r, p);
 	strcpy(r, p);
 	if(r[0]=='\0' || r[strlen(r)-1] != '/')
 	if(r[0]=='\0' || r[strlen(r)-1] != '/')
 		strcat(r, "/");
 		strcat(r, "/");
 	strcat(r, q);
 	strcat(r, q);
+	free(q);
 	return r;
 	return r;
 }
 }
 
 
@@ -1424,7 +1479,7 @@ userwalk(User *u, char **path, char *elem, Qid *qid, char **ep)
 	char *npath;
 	char *npath;
 	struct stat st;
 	struct stat st;
 
 
-	npath = estrpath(*path, elem);
+	npath = estrpath(*path, elem, 1);
 	if(stat(npath, &st) < 0){
 	if(stat(npath, &st) < 0){
 		free(npath);
 		free(npath);
 		*ep = strerror(errno);
 		*ep = strerror(errno);
@@ -1529,7 +1584,7 @@ usercreate(Fid *fid, char *elem, int omode, long perm, char **ep)
 	m = (perm & DMDIR) ? 0777 : 0666;
 	m = (perm & DMDIR) ? 0777 : 0666;
 	perm = perm & (~m | (fid->st.st_mode & m));
 	perm = perm & (~m | (fid->st.st_mode & m));
 
 
-	npath = estrpath(fid->path, elem);
+	npath = estrpath(fid->path, elem, 1);
 	if(perm & DMDIR){
 	if(perm & DMDIR){
 		if((omode&~ORCLOSE) != OREAD){
 		if((omode&~ORCLOSE) != OREAD){
 			*ep = Eperm;
 			*ep = Eperm;