Browse Source

Plan 9 from Bell Labs 2006-01-24

David du Colombier 15 years ago
parent
commit
d9ac017faa

+ 14 - 14
dist/replica/_plan9.db

@@ -118,7 +118,7 @@
 386/bin/aux/mnihongo - 775 sys sys 1135570786 139629
 386/bin/aux/mouse - 775 sys sys 1130384253 44044
 386/bin/aux/ms2 - 775 sys sys 1135570786 87426
-386/bin/aux/msexceltables - 775 sys sys 1135570786 81218
+386/bin/aux/msexceltables - 775 sys sys 1138075017 81356
 386/bin/aux/mswordstrings - 775 sys sys 1135570787 65298
 386/bin/aux/na - 775 sys sys 1135570787 154182
 386/bin/aux/nfsmount - 775 sys sys 1135570787 234147
@@ -268,7 +268,7 @@
 386/bin/gview - 775 sys sys 1136397208 238587
 386/bin/gzip - 775 sys sys 1135570815 84749
 386/bin/hayes - 775 sys sys 1135570815 64550
-386/bin/hget - 775 sys sys 1135570816 233374
+386/bin/hget - 775 sys sys 1138075017 233467
 386/bin/history - 775 sys sys 1136397209 75433
 386/bin/hoc - 775 sys sys 1135570817 99860
 386/bin/html2ms - 775 sys sys 1135570817 66078
@@ -327,7 +327,7 @@
 386/bin/mkdir - 775 sys sys 1135570832 60958
 386/bin/mkpaqfs - 775 sys sys 1135570832 94494
 386/bin/mntgen - 775 sys sys 1135570833 145268
-386/bin/mount - 775 sys sys 1135570833 73001
+386/bin/mount - 775 sys sys 1138075017 73105
 386/bin/ms2html - 775 sys sys 1135570833 103959
 386/bin/mtime - 775 sys sys 1135570833 59133
 386/bin/mv - 775 sys sys 1135570833 65483
@@ -7276,7 +7276,7 @@ sys/man/1/ascii - 664 sys sys 1134233061 2737
 sys/man/1/awk - 664 sys sys 1134233061 10881
 sys/man/1/basename - 664 sys sys 944959673 535
 sys/man/1/bc - 664 sys sys 1134233060 3784
-sys/man/1/bind - 664 sys sys 1034195345 3928
+sys/man/1/bind - 664 sys sys 1138061948 4009
 sys/man/1/bitsyload - 664 sys sys 988225301 2883
 sys/man/1/bundle - 664 sys sys 1113743325 986
 sys/man/1/cal - 664 sys sys 1113743325 849
@@ -8084,7 +8084,7 @@ sys/src/9/port/dev.c - 664 sys sys 1131289870 8219
 sys/src/9/port/devaudio.c - 664 sys sys 1067722761 21130
 sys/src/9/port/devbridge.c - 664 sys sys 1055688301 24308
 sys/src/9/port/devcap.c - 664 sys sys 1048644215 4113
-sys/src/9/port/devcons.c - 664 sys sys 1131537286 23004
+sys/src/9/port/devcons.c - 664 sys sys 1138047754 23013
 sys/src/9/port/devdraw.c - 664 sys sys 1131289870 43537
 sys/src/9/port/devdup.c - 664 sys sys 1014931172 2332
 sys/src/9/port/devenv.c - 664 sys sys 1048644225 6992
@@ -8138,17 +8138,17 @@ sys/src/9/port/parse.c - 664 sys sys 1014931177 2026
 sys/src/9/port/pgrp.c - 664 sys sys 1072704671 3940
 sys/src/9/port/portclock.c - 664 sys sys 1102093397 4556
 sys/src/9/port/portdat.h - 664 sys sys 1135487943 22547
-sys/src/9/port/portfns.h - 664 sys sys 1131537254 11022
+sys/src/9/port/portfns.h - 664 sys sys 1138047830 11023
 sys/src/9/port/portmkfile - 664 sys sys 1131907975 2062
 sys/src/9/port/print.c - 664 sys sys 1014931178 227
-sys/src/9/port/proc.c - 664 sys sys 1131289980 28264
+sys/src/9/port/proc.c - 664 sys sys 1138028309 27967
 sys/src/9/port/qio.c - 664 sys sys 1070287837 23562
 sys/src/9/port/qlock.c - 664 sys sys 1067722765 3196
 sys/src/9/port/rdb.c - 664 sys sys 1018721202 1698
 sys/src/9/port/rebootcmd.c - 664 sys sys 1015278340 1561
 sys/src/9/port/sd.h - 664 sys sys 1134411408 2494
 sys/src/9/port/segment.c - 664 sys sys 1134276516 13762
-sys/src/9/port/swap.c - 664 sys sys 1055688551 6980
+sys/src/9/port/swap.c - 664 sys sys 1138028310 7019
 sys/src/9/port/sysfile.c - 664 sys sys 1134042952 22178
 sys/src/9/port/sysproc.c - 664 sys sys 1137622456 15153
 sys/src/9/port/systab.h - 664 sys sys 1062721698 3044
@@ -9668,7 +9668,7 @@ sys/src/cmd/aux/mnihongo/mnihongo.c - 664 sys sys 946759402 6406
 sys/src/cmd/aux/mnihongo/tmac.nihongo - 664 sys sys 944960789 22
 sys/src/cmd/aux/mouse.c - 664 sys sys 1063855425 7049
 sys/src/cmd/aux/ms2.c - 664 sys sys 1124305056 3153
-sys/src/cmd/aux/msexceltables.c - 664 sys sys 1134659789 13922
+sys/src/cmd/aux/msexceltables.c - 664 sys sys 1138065340 14094
 sys/src/cmd/aux/mswordstrings.c - 664 sys sys 952201344 5767
 sys/src/cmd/aux/na - 20000000775 sys sys 955036627 0
 sys/src/cmd/aux/na/mkfile - 664 sys sys 955036627 121
@@ -12241,7 +12241,7 @@ sys/src/cmd/gzip/mkfile - 664 sys sys 1124884920 124
 sys/src/cmd/gzip/unzip.c - 664 sys sys 1135487934 13825
 sys/src/cmd/gzip/zip.c - 664 sys sys 1135487935 7063
 sys/src/cmd/gzip/zip.h - 664 sys sys 954778719 1428
-sys/src/cmd/hget.c - 664 sys sys 1135487943 25850
+sys/src/cmd/hget.c - 664 sys sys 1138048432 25946
 sys/src/cmd/history.c - 664 sys sys 1136378274 6098
 sys/src/cmd/hoc - 20000000775 sys sys 954036932 0
 sys/src/cmd/hoc/code.c - 664 sys sys 1132451870 10050
@@ -12604,7 +12604,7 @@ sys/src/cmd/mkmany - 664 sys sys 1123818681 1304
 sys/src/cmd/mkone - 664 sys sys 1123943673 910
 sys/src/cmd/mksyslib - 664 sys sys 1134390137 665
 sys/src/cmd/mntgen.c - 664 sys sys 1106410349 3630
-sys/src/cmd/mount.c - 664 sys sys 1034195354 1508
+sys/src/cmd/mount.c - 664 sys sys 1138061862 1633
 sys/src/cmd/ms2html.c - 664 sys sys 1132452054 41032
 sys/src/cmd/mtime.c - 664 sys sys 1036172302 450
 sys/src/cmd/mv.c - 664 sys sys 1126278115 4241
@@ -14022,7 +14022,7 @@ sys/src/cmd/usb/audio - 20000000775 sys sys 1017802021 0
 sys/src/cmd/usb/audio/audiofs.c - 664 sys sys 1100568596 18166
 sys/src/cmd/usb/audio/audiosub.c - 664 sys sys 1100568596 6967
 sys/src/cmd/usb/audio/mkfile - 664 sys sys 1091204980 349
-sys/src/cmd/usb/audio/usbaudio.c - 664 sys sys 1112038987 9845
+sys/src/cmd/usb/audio/usbaudio.c - 664 sys sys 1138027032 9843
 sys/src/cmd/usb/audio/usbaudio.h - 664 sys sys 1100568597 1861
 sys/src/cmd/usb/audio/usbaudioctl.c - 664 sys sys 1101906325 17266
 sys/src/cmd/usb/audio/usbaudioctl.h - 664 sys sys 1100568597 600
@@ -14036,7 +14036,7 @@ sys/src/cmd/usb/lib/usb.h - 664 sys sys 1103381265 7036
 sys/src/cmd/usb/lib/util.c - 664 sys sys 1091204978 523
 sys/src/cmd/usb/misc - 20000000775 sys sys 1091205037 0
 sys/src/cmd/usb/misc/mkfile - 664 sys sys 1091205037 274
-sys/src/cmd/usb/misc/usbmouse.c - 664 sys sys 1112038987 3468
+sys/src/cmd/usb/misc/usbmouse.c - 664 sys sys 1138027028 3475
 sys/src/cmd/usb/misc/usbprint - 775 sys sys 1101830683 256
 sys/src/cmd/usb/mkfile - 664 sys sys 1091327562 354
 sys/src/cmd/usb/mouse - 20000000775 sys sys 1017802022 0
@@ -14212,7 +14212,7 @@ sys/src/cmd/vnc/vncs.c - 664 sys sys 1108222270 21006
 sys/src/cmd/vnc/vncs.h - 664 sys sys 1046200146 908
 sys/src/cmd/vnc/vncv.c - 664 sys sys 1082221235 3197
 sys/src/cmd/vnc/vncv.h - 664 sys sys 1044880750 643
-sys/src/cmd/vnc/wsys.c - 664 sys sys 1102429521 4052
+sys/src/cmd/vnc/wsys.c - 664 sys sys 1138065372 4197
 sys/src/cmd/vt - 20000000775 sys sys 954038635 0
 sys/src/cmd/vt/cons.h - 664 sys sys 1133808292 1792
 sys/src/cmd/vt/consctl.c - 664 sys sys 1135487947 1845

+ 14 - 14
dist/replica/plan9.db

@@ -118,7 +118,7 @@
 386/bin/aux/mnihongo - 775 sys sys 1135570786 139629
 386/bin/aux/mouse - 775 sys sys 1130384253 44044
 386/bin/aux/ms2 - 775 sys sys 1135570786 87426
-386/bin/aux/msexceltables - 775 sys sys 1135570786 81218
+386/bin/aux/msexceltables - 775 sys sys 1138075017 81356
 386/bin/aux/mswordstrings - 775 sys sys 1135570787 65298
 386/bin/aux/na - 775 sys sys 1135570787 154182
 386/bin/aux/nfsmount - 775 sys sys 1135570787 234147
@@ -268,7 +268,7 @@
 386/bin/gview - 775 sys sys 1136397208 238587
 386/bin/gzip - 775 sys sys 1135570815 84749
 386/bin/hayes - 775 sys sys 1135570815 64550
-386/bin/hget - 775 sys sys 1135570816 233374
+386/bin/hget - 775 sys sys 1138075017 233467
 386/bin/history - 775 sys sys 1136397209 75433
 386/bin/hoc - 775 sys sys 1135570817 99860
 386/bin/html2ms - 775 sys sys 1135570817 66078
@@ -327,7 +327,7 @@
 386/bin/mkdir - 775 sys sys 1135570832 60958
 386/bin/mkpaqfs - 775 sys sys 1135570832 94494
 386/bin/mntgen - 775 sys sys 1135570833 145268
-386/bin/mount - 775 sys sys 1135570833 73001
+386/bin/mount - 775 sys sys 1138075017 73105
 386/bin/ms2html - 775 sys sys 1135570833 103959
 386/bin/mtime - 775 sys sys 1135570833 59133
 386/bin/mv - 775 sys sys 1135570833 65483
@@ -7276,7 +7276,7 @@ sys/man/1/ascii - 664 sys sys 1134233061 2737
 sys/man/1/awk - 664 sys sys 1134233061 10881
 sys/man/1/basename - 664 sys sys 944959673 535
 sys/man/1/bc - 664 sys sys 1134233060 3784
-sys/man/1/bind - 664 sys sys 1034195345 3928
+sys/man/1/bind - 664 sys sys 1138061948 4009
 sys/man/1/bitsyload - 664 sys sys 988225301 2883
 sys/man/1/bundle - 664 sys sys 1113743325 986
 sys/man/1/cal - 664 sys sys 1113743325 849
@@ -8084,7 +8084,7 @@ sys/src/9/port/dev.c - 664 sys sys 1131289870 8219
 sys/src/9/port/devaudio.c - 664 sys sys 1067722761 21130
 sys/src/9/port/devbridge.c - 664 sys sys 1055688301 24308
 sys/src/9/port/devcap.c - 664 sys sys 1048644215 4113
-sys/src/9/port/devcons.c - 664 sys sys 1131537286 23004
+sys/src/9/port/devcons.c - 664 sys sys 1138047754 23013
 sys/src/9/port/devdraw.c - 664 sys sys 1131289870 43537
 sys/src/9/port/devdup.c - 664 sys sys 1014931172 2332
 sys/src/9/port/devenv.c - 664 sys sys 1048644225 6992
@@ -8138,17 +8138,17 @@ sys/src/9/port/parse.c - 664 sys sys 1014931177 2026
 sys/src/9/port/pgrp.c - 664 sys sys 1072704671 3940
 sys/src/9/port/portclock.c - 664 sys sys 1102093397 4556
 sys/src/9/port/portdat.h - 664 sys sys 1135487943 22547
-sys/src/9/port/portfns.h - 664 sys sys 1131537254 11022
+sys/src/9/port/portfns.h - 664 sys sys 1138047830 11023
 sys/src/9/port/portmkfile - 664 sys sys 1131907975 2062
 sys/src/9/port/print.c - 664 sys sys 1014931178 227
-sys/src/9/port/proc.c - 664 sys sys 1131289980 28264
+sys/src/9/port/proc.c - 664 sys sys 1138028309 27967
 sys/src/9/port/qio.c - 664 sys sys 1070287837 23562
 sys/src/9/port/qlock.c - 664 sys sys 1067722765 3196
 sys/src/9/port/rdb.c - 664 sys sys 1018721202 1698
 sys/src/9/port/rebootcmd.c - 664 sys sys 1015278340 1561
 sys/src/9/port/sd.h - 664 sys sys 1134411408 2494
 sys/src/9/port/segment.c - 664 sys sys 1134276516 13762
-sys/src/9/port/swap.c - 664 sys sys 1055688551 6980
+sys/src/9/port/swap.c - 664 sys sys 1138028310 7019
 sys/src/9/port/sysfile.c - 664 sys sys 1134042952 22178
 sys/src/9/port/sysproc.c - 664 sys sys 1137622456 15153
 sys/src/9/port/systab.h - 664 sys sys 1062721698 3044
@@ -9668,7 +9668,7 @@ sys/src/cmd/aux/mnihongo/mnihongo.c - 664 sys sys 946759402 6406
 sys/src/cmd/aux/mnihongo/tmac.nihongo - 664 sys sys 944960789 22
 sys/src/cmd/aux/mouse.c - 664 sys sys 1063855425 7049
 sys/src/cmd/aux/ms2.c - 664 sys sys 1124305056 3153
-sys/src/cmd/aux/msexceltables.c - 664 sys sys 1134659789 13922
+sys/src/cmd/aux/msexceltables.c - 664 sys sys 1138065340 14094
 sys/src/cmd/aux/mswordstrings.c - 664 sys sys 952201344 5767
 sys/src/cmd/aux/na - 20000000775 sys sys 955036627 0
 sys/src/cmd/aux/na/mkfile - 664 sys sys 955036627 121
@@ -12241,7 +12241,7 @@ sys/src/cmd/gzip/mkfile - 664 sys sys 1124884920 124
 sys/src/cmd/gzip/unzip.c - 664 sys sys 1135487934 13825
 sys/src/cmd/gzip/zip.c - 664 sys sys 1135487935 7063
 sys/src/cmd/gzip/zip.h - 664 sys sys 954778719 1428
-sys/src/cmd/hget.c - 664 sys sys 1135487943 25850
+sys/src/cmd/hget.c - 664 sys sys 1138048432 25946
 sys/src/cmd/history.c - 664 sys sys 1136378274 6098
 sys/src/cmd/hoc - 20000000775 sys sys 954036932 0
 sys/src/cmd/hoc/code.c - 664 sys sys 1132451870 10050
@@ -12604,7 +12604,7 @@ sys/src/cmd/mkmany - 664 sys sys 1123818681 1304
 sys/src/cmd/mkone - 664 sys sys 1123943673 910
 sys/src/cmd/mksyslib - 664 sys sys 1134390137 665
 sys/src/cmd/mntgen.c - 664 sys sys 1106410349 3630
-sys/src/cmd/mount.c - 664 sys sys 1034195354 1508
+sys/src/cmd/mount.c - 664 sys sys 1138061862 1633
 sys/src/cmd/ms2html.c - 664 sys sys 1132452054 41032
 sys/src/cmd/mtime.c - 664 sys sys 1036172302 450
 sys/src/cmd/mv.c - 664 sys sys 1126278115 4241
@@ -14022,7 +14022,7 @@ sys/src/cmd/usb/audio - 20000000775 sys sys 1017802021 0
 sys/src/cmd/usb/audio/audiofs.c - 664 sys sys 1100568596 18166
 sys/src/cmd/usb/audio/audiosub.c - 664 sys sys 1100568596 6967
 sys/src/cmd/usb/audio/mkfile - 664 sys sys 1091204980 349
-sys/src/cmd/usb/audio/usbaudio.c - 664 sys sys 1112038987 9845
+sys/src/cmd/usb/audio/usbaudio.c - 664 sys sys 1138027032 9843
 sys/src/cmd/usb/audio/usbaudio.h - 664 sys sys 1100568597 1861
 sys/src/cmd/usb/audio/usbaudioctl.c - 664 sys sys 1101906325 17266
 sys/src/cmd/usb/audio/usbaudioctl.h - 664 sys sys 1100568597 600
@@ -14036,7 +14036,7 @@ sys/src/cmd/usb/lib/usb.h - 664 sys sys 1103381265 7036
 sys/src/cmd/usb/lib/util.c - 664 sys sys 1091204978 523
 sys/src/cmd/usb/misc - 20000000775 sys sys 1091205037 0
 sys/src/cmd/usb/misc/mkfile - 664 sys sys 1091205037 274
-sys/src/cmd/usb/misc/usbmouse.c - 664 sys sys 1112038987 3468
+sys/src/cmd/usb/misc/usbmouse.c - 664 sys sys 1138027028 3475
 sys/src/cmd/usb/misc/usbprint - 775 sys sys 1101830683 256
 sys/src/cmd/usb/mkfile - 664 sys sys 1091327562 354
 sys/src/cmd/usb/mouse - 20000000775 sys sys 1017802022 0
@@ -14212,7 +14212,7 @@ sys/src/cmd/vnc/vncs.c - 664 sys sys 1108222270 21006
 sys/src/cmd/vnc/vncs.h - 664 sys sys 1046200146 908
 sys/src/cmd/vnc/vncv.c - 664 sys sys 1082221235 3197
 sys/src/cmd/vnc/vncv.h - 664 sys sys 1044880750 643
-sys/src/cmd/vnc/wsys.c - 664 sys sys 1102429521 4052
+sys/src/cmd/vnc/wsys.c - 664 sys sys 1138065372 4197
 sys/src/cmd/vt - 20000000775 sys sys 954038635 0
 sys/src/cmd/vt/cons.h - 664 sys sys 1133808292 1792
 sys/src/cmd/vt/consctl.c - 664 sys sys 1135487947 1845

+ 14 - 0
dist/replica/plan9.log

@@ -27170,3 +27170,17 @@
 1137623433 2 c sys/src/9/port/sysproc.c - 664 sys sys 1137622456 15153
 1137690054 0 c sys/src/9/pc/vganvidia.c - 664 sys sys 1137689150 12395
 1137690054 1 c sys/src/cmd/usb/lib/device.c - 664 sys sys 1137688747 3032
+1138028430 0 c sys/src/9/port/proc.c - 664 sys sys 1138028309 27967
+1138028430 1 c sys/src/9/port/swap.c - 664 sys sys 1138028310 7019
+1138028430 2 c sys/src/cmd/usb/audio/usbaudio.c - 664 sys sys 1138027032 9843
+1138028430 3 c sys/src/cmd/usb/misc/usbmouse.c - 664 sys sys 1138027028 3475
+1138048236 0 c sys/src/9/port/devcons.c - 664 sys sys 1138047754 23013
+1138048236 1 c sys/src/9/port/portfns.h - 664 sys sys 1138047830 11023
+1138050036 0 c sys/src/cmd/hget.c - 664 sys sys 1138048432 25946
+1138062639 0 c sys/man/1/bind - 664 sys sys 1138061948 4009
+1138062639 1 c sys/src/cmd/mount.c - 664 sys sys 1138061862 1633
+1138066240 0 c sys/src/cmd/aux/msexceltables.c - 664 sys sys 1138065340 14094
+1138066240 1 c sys/src/cmd/vnc/wsys.c - 664 sys sys 1138065372 4197
+1138075243 0 c 386/bin/hget - 775 sys sys 1138075017 233467
+1138075243 1 c 386/bin/mount - 775 sys sys 1138075017 73105
+1138075243 2 c 386/bin/aux/msexceltables - 775 sys sys 1138075017 81356

+ 8 - 2
sys/man/1/bind

@@ -144,12 +144,18 @@ operation fails.
 .PD
 .PP
 .I Mount
-takes an additional option,
+takes two additional options.
+The first,
 .B -k
 .IR keypattern ,
-to constrain the set of 
+constrains the set of 
 .IR factotum (4)
 keys used for an authenticated mount.
+The second,
+.BR -n ,
+causes
+.I mount
+to skip authentication entirely.
 .PP
 The
 .I spec

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

@@ -460,7 +460,7 @@ echo(char *buf, int n)
 			scheddump();
 			return;
 		case 'k':
-			killbig();
+			killbig("^t ^t k");
 			return;
 		case 'r':
 			exit(0);

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

@@ -144,7 +144,7 @@ int		kbdgetmap(int, int*, int*, Rune*);
 int		kbdputc(Queue*, int);
 void		kbdputmap(ushort, ushort, Rune);
 void		kickpager(void);
-void		killbig(void);
+void		killbig(char*);
 void		kproc(char*, void(*)(void*), void*);
 void		kprocchild(Proc*, void (*)(void*), void*);
 void		(*kproftimer)(ulong);

+ 10 - 30
sys/src/9/port/proc.c

@@ -801,33 +801,6 @@ twakeup(Ureg*, Timer *t)
 		wakeup(trend);
 }
 
-/* Sleep until todget() >= ns.  NOTE: ns is not an interval */
-void
-tnsleep(Rendez *r, int (*fn)(void*), void *arg, vlong ns)
-{
-	if (up->tt){
-		print("tnsleep: timer active: mode %d, tf 0x%lux\n", up->tmode, up->tf);
-		timerdel(up);
-	}
-	up->tns = ns;
-	up->tf = twakeup;
-	up->tmode = Tabsolute;
-	up->ta = up;
-	up->trend = r;
-	up->tfn = fn;
-	timeradd(up);
-
-	if(waserror()){
-		timerdel(up);
-		nexterror();
-	}
-	sleep(r, tfn, arg);
-	if (up->tt)
-		timerdel(up);
-	up->twhen = 0;
-	poperror();
-}
-
 void
 tsleep(Rendez *r, int (*fn)(void*), void *arg, ulong ms)
 {
@@ -1455,7 +1428,7 @@ exhausted(char *resource)
 }
 
 void
-killbig(void)
+killbig(char *why)
 {
 	int i;
 	Segment *s;
@@ -1474,11 +1447,19 @@ killbig(void)
 			if(s != 0)
 				l += s->top - s->base;
 		}
-		if(l > max && strcmp(p->text, "kfs") != 0){
+		if(l > max && ((p->procmode&0222) || strcmp(eve, p->user)!=0)) {
 			kp = p;
 			max = l;
 		}
 	}
+
+	print("%lud: %s killed: %s\n", kp->pid, kp->text, why);
+	for(p = procalloc.arena; p < ep; p++) {
+		if(p->state == Dead || p->kp)
+			continue;
+		if(p != kp && p->seg[BSEG] && p->seg[BSEG] == kp->seg[BSEG])
+			p->procctl = Proc_exitbig;
+	}
 	kp->procctl = Proc_exitbig;
 	for(i = 0; i < NSEG; i++) {
 		s = kp->seg[i];
@@ -1487,7 +1468,6 @@ killbig(void)
 			qunlock(&s->lk);
 		}
 	}
-	print("%lud: %s killed because no swap configured\n", kp->pid, kp->text);
 }
 
 /*

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

@@ -160,13 +160,13 @@ loop:
 			qunlock(&p->seglock);
 		}
 		else {
+			print("out of physical memory; no swap configured\n");
 			if(!cpuserver)
 				freebroken();	/* can use the memory */
 			else
-				killbig();
+				killbig("out of memory");
 
 			/* Emulate the old system if no swap channel */
-			print("no physical memory\n");
 			tsleep(&up->sleep, return0, 0, 5000);
 			wakeup(&palloc.r);
 		}

+ 28 - 19
sys/src/cmd/aux/msexceltables.c

@@ -302,6 +302,7 @@ release(void)
 void
 skip(Biff *b, int len)
 {
+	assert(len <= b->len);
 	if (Bseek(b->bp, len, 1) == -1)
 		sysfatal("seek failed - %r\n");
 	b->len -= len;
@@ -426,13 +427,18 @@ gstr(Biff *b, int len_width)
 {
 	Rune r;
 	char *buf, *p;
-	int nch, w, sz, ln, rt, opt;
+	int nch, w, ap, ln, rt, opt;
+	enum {
+		Unicode = 1,
+		Asian_phonetic = 4,
+		Rich_text = 8,
+	};
 
 	if (b->len < len_width){
 		if (getrec(b) == -1)
-			sysfatal("expected CONTINUE, got EOF\n");
-		if (b->op != 0x03c)	
-			sysfatal("expected CONTINUE, got op=0x%x\n", b->op);
+			sysfatal("starting STRING expected CONTINUE, got EOF\n");
+		if (b->op != 0x03c)
+			sysfatal("starting STRING expected CONTINUE, got op=0x%x\n", b->op);
 	}
 
 	ln = gint(b, len_width);
@@ -452,32 +458,34 @@ gstr(Biff *b, int len_width)
 		return buf;
 	nch = 0;
 	*buf = 0;
+	opt = gint(b, 1);
+	if(opt & Rich_text)
+		rt = gint(b, 2);
+	else
+		rt = 0;
+	if(opt & Asian_phonetic)
+		ap = gint(b, 4);
+	else
+		ap = 0;
 	while (1){
-		opt = gint(b, 1);
-		w = (opt & 1)? sizeof(Rune): sizeof(char);
-		if(opt & 4)
-			sz = gint(b,4);
-		else
-			sz = 0;
-		if(opt & 8)
-			rt = gint(b, 2);
-		else
-			rt = 0;
+		w = (opt & Unicode)? sizeof(Rune): sizeof(char);
+
 		while(b->len > 0){
 			r = gint(b, w);
 			p += runetochar(p, &r);
 			if (++nch >= ln){
-				if (opt & 4)
-					skip(b, sz);
-				if (opt & 8)
+				if (rt)
 					skip(b, rt*4);
+				if (ap)
+					skip(b, ap);
 				return buf;
 			}
 		}
 		if (getrec(b) == -1)
-			sysfatal("expected CONTINUE, got EOF\n");
+			sysfatal("in STRING expected CONTINUE, got EOF\n");
 		if (b->op != 0x03c)	
-			sysfatal("expected CONTINUE, got op=0x%x\n", b->op);
+			sysfatal("in STRING expected CONTINUE, got op=0x%x\n", b->op);
+		opt = gint(b, 1);
 	}
 	sysfatal("cannot ever happen error\n");
 	return nil;  // shut up 8c
@@ -494,6 +502,7 @@ sst(Biff *b)
 		sysfatal("no memory\n");
 	for (n = 0; n < Nstrtab; n++)
 		Strtab[n] = gstr(b, 2);
+
 }
 
 void

+ 13 - 9
sys/src/cmd/hget.c

@@ -39,10 +39,10 @@ struct Out
 
 enum
 {
+	Other,
 	Http,
 	Https,
 	Ftp,
-	Other
 };
 
 enum
@@ -226,22 +226,25 @@ crackurl(URL *u, char *s)
 	char *p;
 	int i;
 
-	if(u->host != nil){
-		free(u->host);
-		u->host = nil;
-	}
 	if(u->page != nil){
 		free(u->page);
 		u->page = nil;
 	}
 
-	/* get type */
-	u->method = Other;
+	/* get type */ 
 	for(p = s; *p; p++){
 		if(*p == '/'){
-			u->method = Http;
 			p = s;
-			break;
+			if(u->method == Other){
+				werrstr("missing method");
+				return -1;
+			}
+			if(u->host == nil){
+				werrstr("missing host");
+				return -1;
+			}
+			u->page = strdup(p);
+			return 0;
 		}
 		if(*p == ':' && *(p+1)=='/' && *(p+2)=='/'){
 			*p = 0;
@@ -262,6 +265,7 @@ crackurl(URL *u, char *s)
 	}
 
 	/* get system */
+	free(u->host);
 	s = p;
 	p = strchr(s, '/');
 	if(p == nil){

+ 11 - 3
sys/src/cmd/mount.c

@@ -30,7 +30,8 @@ main(int argc, char *argv[])
 	char *spec;
 	ulong flag = 0;
 	int qflag = 0;
-	int fd;
+	int noauth = 0;
+	int fd, rv;
 
 	ARGBEGIN{
 	case 'a':
@@ -48,6 +49,9 @@ main(int argc, char *argv[])
 	case 'k':
 		keyspec = EARGF(usage());
 		break;
+	case 'n':
+		noauth = 1;
+		break;
 	case 'q':
 		qflag = 1;
 		break;
@@ -75,7 +79,11 @@ main(int argc, char *argv[])
 	}
 
 	notify(catch);
-	if(amount0(fd, argv[1], flag, spec, keyspec) < 0){
+	if(noauth)
+		rv = mount(fd, -1, argv[1], flag, spec);
+	else
+		rv = amount0(fd, argv[1], flag, spec, keyspec);
+	if(rv < 0){
 		if(qflag)
 			exits(0);
 		fprint(2, "%s: mount %s: %r\n", argv0, argv[1]);
@@ -95,6 +103,6 @@ catch(void *x, char *m)
 void
 usage(void)
 {
-	fprint(2, "usage: mount [-a|-b] [-c] [-k keypattern] [-r] /srv/service dir [spec]\n");
+	fprint(2, "usage: mount [-a|-b] [-cnrq] [-k keypattern] /srv/service dir [spec]\n");
 	exits("usage");
 }

+ 1 - 1
sys/src/cmd/usb/audio/usbaudio.c

@@ -16,7 +16,7 @@ char * mntpt;
 
 Channel *controlchan;
 
-char audstr[]		= "Enabled 0x000101\n";	/* audio.control.0 */
+char audstr[]		= "Enabled 0x000101";	/* audio.control.0 */
 
 int defaultspeed[2] = {44100, 44100};
 

+ 8 - 10
sys/src/cmd/usb/misc/usbmouse.c

@@ -1,11 +1,10 @@
 #include <u.h>
 #include <libc.h>
 #include <thread.h>
-#include <stdio.h>
 
 int mousefd, ctlfd, mousein;
 
-char hbm[]		= "Enabled 0x020103\n";
+char hbm[]		= "Enabled 0x020103";
 char *mouseinfile	= "/dev/mousein";
 char *statfmt		= "/dev/usb%d/%d/status";
 char *ctlfmt		= "/dev/usb%d/%d/ctl";
@@ -87,8 +86,7 @@ usage(void)
 void
 threadmain(int argc, char *argv[])
 {
-	FILE *f;
-	int ctlrno, i;
+	int ctlrno, i, sfd;
 	char line[256];
 
 	ARGBEGIN{
@@ -112,17 +110,17 @@ threadmain(int argc, char *argv[])
 	case 0:
 		for (ctlrno = 0; ctlrno < 16; ctlrno++) {
 			for (i = 0; i < 128; i++) {
-				sprint(line, statfmt, ctlrno, i);
-				f = fopen(line, "r");
-				if (f == nil)
+				snprint(line, sizeof line, statfmt, ctlrno, i);
+				sfd = open(line, OREAD);
+				if (sfd < 0)
 					break;
-				if (fgets(line, sizeof line, f) && strcmp(hbm, line) == 0) {
+				if (read(sfd, line, strlen(hbm)) && strncmp(hbm, line, strlen(hbm)) == 0) {
 					snprint(ctlfile, sizeof ctlfile, ctlfmt, ctlrno, i);
 					snprint(msefile, sizeof msefile, msefmt, ctlrno, i);
-					fclose(f);
+					close(sfd);
 					goto found;
 				}
-				fclose(f);
+				close(sfd);
 			}
 		}
 		threadexitsall("no mouse");

+ 7 - 1
sys/src/cmd/vnc/wsys.c

@@ -147,8 +147,14 @@ readmouse(Vnc *v)
 				m.xy.y = atoi(start+1+12);
 				m.buttons = atoi(start+1+2*12) & 0x1F;
 				m.xy = subpt(m.xy, screen->r.min);
-				if(ptinrect(m.xy, Rpt(ZP, v->dim)))
+				if(ptinrect(m.xy, Rpt(ZP, v->dim))){
 					mouseevent(v, m);
+					/* send wheel button *release* */ 
+					if ((m.buttons & 0x7) != m.buttons) {
+						m.buttons &= 0x7;
+						mouseevent(v, m);
+					}
+				}
 			} else
 				eresized();