Browse Source

Plan 9 from Bell Labs 2003-02-21

David du Colombier 21 years ago
parent
commit
efe68889c6

+ 26 - 26
dist/replica/plan9.db

@@ -9,11 +9,11 @@
 386/9loaddebug - 775 sys sys 1045538097 259969
 386/9loadlite - 775 sys sys 1032215927 124616
 386/9loadlitedebug - 775 sys sys 1045538098 183665
-386/9pc - 775 sys sys 1045538102 1791779
+386/9pc - 775 sys sys 1045776653 1791748
 386/9pc.gz - 664 sys sys 1040006338 614078
-386/9pccpu - 775 sys sys 1045538106 1455620
+386/9pccpu - 775 sys sys 1045776656 1455559
 386/9pccpu.gz - 664 sys sys 1040006341 504177
-386/9pcdisk - 775 sys sys 1045538111 1995668
+386/9pcdisk - 775 sys sys 1045776660 1995637
 386/9pcdisk.gz - 664 sys sys 1040006345 703136
 386/_9pcdisk.gz - 664 sys sys 1039764191 695837
 386/bin - 20000000775 sys sys 1018897690 0
@@ -105,13 +105,13 @@
 386/bin/aux/ms2 - 775 sys sys 1045537953 84053
 386/bin/aux/mswordstrings - 775 sys sys 1039758542 64268
 386/bin/aux/na - 775 sys sys 1045537953 152774
-386/bin/aux/nfsmount - 775 sys sys 1045665594 231133
+386/bin/aux/nfsmount - 775 sys sys 1045776646 231149
 386/bin/aux/nfsserver - 775 sys sys 1045537954 171046
 386/bin/aux/olefs - 775 sys sys 1045537954 144352
 386/bin/aux/p9bitpost - 775 sys sys 1039758543 127979
 386/bin/aux/pcmcia - 775 sys sys 1039758543 46790
 386/bin/aux/pcnfsd - 775 sys sys 1045537955 126750
-386/bin/aux/portmap - 775 sys sys 1045665594 140686
+386/bin/aux/portmap - 775 sys sys 1045776646 140702
 386/bin/aux/portmapper - 775 sys sys 1045537955 125638
 386/bin/aux/postgif - 775 sys sys 1038443100 177440
 386/bin/aux/postprint - 775 sys sys 1038443101 161939
@@ -203,7 +203,7 @@
 386/bin/fortune - 775 sys sys 1045537977 66332
 386/bin/fossil - 20000000775 sys sys 1042005470 0
 386/bin/fossil/flchk - 775 sys sys 1045665595 226777
-386/bin/fossil/flfmt - 775 sys sys 1045665596 225362
+386/bin/fossil/flfmt - 775 sys sys 1045777851 225383
 386/bin/fossil/fossil - 775 sys sys 1045665597 333516
 386/bin/freq - 775 sys sys 1039758560 60443
 386/bin/fs - 20000000775 sys sys 954380769 0
@@ -296,7 +296,7 @@
 386/bin/netkey - 775 sys sys 1039758579 70753
 386/bin/netstat - 775 sys sys 1045538036 81379
 386/bin/news - 775 sys sys 1045538036 70512
-386/bin/nfs - 775 sys sys 1045665598 315487
+386/bin/nfs - 775 sys sys 1045776647 315503
 386/bin/nm - 775 sys sys 1045538037 123227
 386/bin/nntpfs - 775 sys sys 1045538038 161729
 386/bin/ns - 775 sys sys 1039758580 63830
@@ -436,8 +436,8 @@
 386/bin/venti/verifyarena - 775 sys sys 1045538088 105156
 386/bin/venti/wrarena - 775 sys sys 1045538089 178907
 386/bin/venti/write - 775 sys sys 1045538089 100592
-386/bin/vncs - 775 sys sys 1045665600 437972
-386/bin/vncv - 775 sys sys 1045538091 266167
+386/bin/vncs - 775 sys sys 1045776648 437987
+386/bin/vncv - 775 sys sys 1045776649 266165
 386/bin/vt - 775 sys sys 1045538092 170883
 386/bin/vtdump - 775 sys sys 1045538093 160937
 386/bin/wc - 775 sys sys 1039758615 42416
@@ -496,7 +496,7 @@
 386/lib/libscribble.a - 664 sys sys 1045538126 108138
 386/lib/libsec.a - 664 sys sys 1045538128 635686
 386/lib/libstdio.a - 664 sys sys 1045538128 125144
-386/lib/libsunrpc.a - 664 sys sys 1045665602 355292
+386/lib/libsunrpc.a - 664 sys sys 1045776662 355322
 386/lib/libthread.a - 664 sys sys 1045538129 71494
 386/lib/libventi.a - 664 sys sys 1045538129 97938
 386/mbr - 775 sys sys 1022125974 407
@@ -4744,7 +4744,7 @@ sys/man/4/dossrv - 664 sys sys 1015024813 4176
 sys/man/4/execnet - 664 sys sys 1019866708 1069
 sys/man/4/exportfs - 664 sys sys 1018386776 3746
 sys/man/4/factotum - 664 sys sys 1021579982 13900
-sys/man/4/fossil - 664 sys sys 1042094898 8705
+sys/man/4/fossil - 664 sys sys 1045777955 8690
 sys/man/4/fs - 664 sys sys 1019058716 3387
 sys/man/4/ftpfs - 664 sys sys 1018386777 4113
 sys/man/4/import - 664 sys sys 1034195346 2204
@@ -5030,19 +5030,19 @@ sys/src/9/ip/devip.c - 664 sys sys 1044630546 24033
 sys/src/9/ip/eipconvtest.c - 664 sys sys 1022588098 3135
 sys/src/9/ip/esp.c - 664 sys sys 1026847565 17081
 sys/src/9/ip/ethermedium.c - 664 sys sys 1045063514 15116
-sys/src/9/ip/gre.c - 664 sys sys 1026847565 4702
-sys/src/9/ip/icmp.c - 664 sys sys 1039098191 9443
-sys/src/9/ip/icmp6.c - 664 sys sys 1045063518 18086
+sys/src/9/ip/gre.c - 664 sys sys 1045773454 4679
+sys/src/9/ip/icmp.c - 664 sys sys 1045773453 9417
+sys/src/9/ip/icmp6.c - 664 sys sys 1045773452 18063
 sys/src/9/ip/igmp.c - 664 sys sys 1026847566 5185
-sys/src/9/ip/il.c - 664 sys sys 1028566049 26975
+sys/src/9/ip/il.c - 664 sys sys 1045773452 26941
 sys/src/9/ip/inferno.c - 664 sys sys 1022588098 517
-sys/src/9/ip/ip.c - 664 sys sys 1045432713 15274
-sys/src/9/ip/ip.h - 664 sys sys 1045063514 15846
+sys/src/9/ip/ip.c - 664 sys sys 1045773455 15209
+sys/src/9/ip/ip.h - 664 sys sys 1045774750 15844
 sys/src/9/ip/ipaux.c - 664 sys sys 1022588098 12656
 sys/src/9/ip/ipifc.c - 664 sys sys 1045063513 37702
 sys/src/9/ip/ipmux.c - 664 sys sys 1044630555 15352
 sys/src/9/ip/iproute.c - 664 sys sys 1022588099 14260
-sys/src/9/ip/ipv6.c - 664 sys sys 1045063516 14364
+sys/src/9/ip/ipv6.c - 664 sys sys 1045773454 14399
 sys/src/9/ip/ipv6.h - 664 sys sys 1022588099 4304
 sys/src/9/ip/loopbackmedium.c - 664 sys sys 1045063513 1651
 sys/src/9/ip/netdevmedium.c - 664 sys sys 1045063517 2675
@@ -5051,9 +5051,9 @@ sys/src/9/ip/nullmedium.c - 664 sys sys 1022588099 491
 sys/src/9/ip/pktmedium.c - 664 sys sys 1045063516 1355
 sys/src/9/ip/ptclbsum.c - 664 sys sys 1022588099 1243
 sys/src/9/ip/rudp.c - 664 sys sys 1026847569 21413
-sys/src/9/ip/tcp.c - 664 sys sys 1045524266 65132
+sys/src/9/ip/tcp.c - 664 sys sys 1045773456 65222
 sys/src/9/ip/tripmedium.c - 664 sys sys 1045063515 7136
-sys/src/9/ip/udp.c - 664 sys sys 1026847570 13046
+sys/src/9/ip/udp.c - 664 sys sys 1045773451 13022
 sys/src/9/mkfile - 664 sys sys 1017795039 191
 sys/src/9/mtx - 20000000775 sys sys 1018721288 0
 sys/src/9/mtx/clock.c - 664 sys sys 1032053278 1293
@@ -5266,11 +5266,11 @@ sys/src/9/port/parse.c - 664 sys sys 1014931177 2026
 sys/src/9/port/pgrp.c - 664 sys sys 1032052809 3925
 sys/src/9/port/portclock.c - 664 sys sys 1044630519 3919
 sys/src/9/port/portdat.h - 664 sys sys 1045491608 21205
-sys/src/9/port/portfns.h - 664 sys sys 1039753334 10472
+sys/src/9/port/portfns.h - 664 sys sys 1045773495 10521
 sys/src/9/port/portmkfile - 664 sys sys 1039753335 2372
 sys/src/9/port/print.c - 664 sys sys 1014931178 227
 sys/src/9/port/proc.c - 664 sys sys 1036813004 22129
-sys/src/9/port/qio.c - 664 sys sys 1037126403 22819
+sys/src/9/port/qio.c - 664 sys sys 1045773483 23156
 sys/src/9/port/qlock.c - 664 sys sys 1026847551 3246
 sys/src/9/port/rdb.c - 664 sys sys 1018721202 1698
 sys/src/9/port/realtimesub.c - 664 sys sys 1037669301 9078
@@ -7038,7 +7038,7 @@ sys/src/cmd/fossil/error.c - 664 sys sys 1042005507 1367
 sys/src/cmd/fossil/error.h - 664 sys sys 1042005507 744
 sys/src/cmd/fossil/file.c - 664 sys sys 1044906157 27633
 sys/src/cmd/fossil/flchk.c - 664 sys sys 1042005507 13670
-sys/src/cmd/fossil/flfmt.c - 664 sys sys 1042005507 10314
+sys/src/cmd/fossil/flfmt.c - 664 sys sys 1045776555 10342
 sys/src/cmd/fossil/flproto - 664 sys sys 1042005508 210
 sys/src/cmd/fossil/fns.h - 664 sys sys 1042311690 2958
 sys/src/cmd/fossil/fossil-acid - 664 sys sys 1042005508 3965
@@ -10495,7 +10495,7 @@ sys/src/cmd/vnc/color.c - 664 sys sys 1044880749 3088
 sys/src/cmd/vnc/compat.c - 664 sys sys 1044880749 3122
 sys/src/cmd/vnc/compat.h - 664 sys sys 1044880749 3401
 sys/src/cmd/vnc/dev.c - 664 sys sys 1044880749 5496
-sys/src/cmd/vnc/devcons.c - 664 sys sys 1044880749 6955
+sys/src/cmd/vnc/devcons.c - 664 sys sys 1045758532 6978
 sys/src/cmd/vnc/devdraw.c - 664 sys sys 1044880749 42068
 sys/src/cmd/vnc/devmouse.c - 664 sys sys 1044880749 7384
 sys/src/cmd/vnc/draw.c - 664 sys sys 1044880749 6974
@@ -10515,11 +10515,11 @@ sys/src/cmd/vnc/rre.c - 664 sys sys 1044880750 11496
 sys/src/cmd/vnc/screen.c - 664 sys sys 1044880750 7537
 sys/src/cmd/vnc/screen.h - 664 sys sys 1044880750 880
 sys/src/cmd/vnc/vnc.h - 664 sys sys 1044880750 2626
-sys/src/cmd/vnc/vncs.c - 664 sys sys 1045597638 20914
+sys/src/cmd/vnc/vncs.c - 664 sys sys 1045758533 20939
 sys/src/cmd/vnc/vncs.h - 664 sys sys 1044880750 890
 sys/src/cmd/vnc/vncv.c - 664 sys sys 1044880750 3093
 sys/src/cmd/vnc/vncv.h - 664 sys sys 1044880750 643
-sys/src/cmd/vnc/wsys.c - 664 sys sys 1044880750 4065
+sys/src/cmd/vnc/wsys.c - 664 sys sys 1045758533 4049
 sys/src/cmd/vt - 20000000775 sys sys 954038635 0
 sys/src/cmd/vt/cons.h - 664 sys sys 984718311 1660
 sys/src/cmd/vt/consctl.c - 664 sys sys 952627639 1815

+ 26 - 0
dist/replica/plan9.log

@@ -17931,3 +17931,29 @@
 1045666836 8 a 386/bin/nfs - 775 sys sys 1045665598 315487
 1045666836 9 a 386/lib/libsunrpc.a - 664 sys sys 1045665602 355292
 1045674226 0 c sys/src/libsunrpc/client.c - 664 sys sys 1045674219 8858
+1045758666 0 c sys/src/cmd/vnc/devcons.c - 664 sys sys 1045758532 6978
+1045758666 1 c sys/src/cmd/vnc/vncs.c - 664 sys sys 1045758533 20939
+1045758666 2 c sys/src/cmd/vnc/wsys.c - 664 sys sys 1045758533 4049
+1045773519 0 c sys/src/9/ip/gre.c - 664 sys sys 1045773454 4679
+1045773519 1 c sys/src/9/ip/icmp.c - 664 sys sys 1045773453 9417
+1045773519 2 c sys/src/9/ip/icmp6.c - 664 sys sys 1045773452 18063
+1045773519 3 c sys/src/9/ip/il.c - 664 sys sys 1045773452 26941
+1045773519 4 c sys/src/9/ip/ip.c - 664 sys sys 1045773455 15209
+1045773519 5 c sys/src/9/ip/ipv6.c - 664 sys sys 1045773454 14399
+1045773519 6 c sys/src/9/ip/tcp.c - 664 sys sys 1045773456 65222
+1045773519 7 c sys/src/9/ip/udp.c - 664 sys sys 1045773451 13022
+1045773519 8 c sys/src/9/port/portfns.h - 664 sys sys 1045773495 10521
+1045773519 9 c sys/src/9/port/qio.c - 664 sys sys 1045773483 23156
+1045774759 0 c sys/src/9/ip/ip.h - 664 sys sys 1045774750 15844
+1045776670 0 c 386/9pc - 775 sys sys 1045776653 1791748
+1045776670 1 c 386/9pccpu - 775 sys sys 1045776656 1455559
+1045776670 2 c 386/9pcdisk - 775 sys sys 1045776660 1995637
+1045776670 3 c 386/bin/vncs - 775 sys sys 1045776648 437987
+1045776670 4 c 386/bin/vncv - 775 sys sys 1045776649 266165
+1045776670 5 c 386/bin/aux/nfsmount - 775 sys sys 1045776646 231149
+1045776670 6 c 386/bin/aux/portmap - 775 sys sys 1045776646 140702
+1045776670 7 c 386/bin/nfs - 775 sys sys 1045776647 315503
+1045776670 8 c 386/lib/libsunrpc.a - 664 sys sys 1045776662 355322
+1045776670 9 c sys/src/cmd/fossil/flfmt.c - 664 sys sys 1045776555 10342
+1045777959 0 c 386/bin/fossil/flfmt - 775 sys sys 1045777851 225383
+1045777959 1 c sys/man/4/fossil - 664 sys sys 1045777955 8690

+ 3 - 3
sys/man/4/fossil

@@ -43,7 +43,7 @@ fossil \- archival file server
 ]
 [
 .B -v
-.BI vac: score
+.I score
 ]
 .I file
 .SH DESCRIPTION
@@ -311,7 +311,7 @@ Set the textual label on the file system to
 .IR label .
 The label is only a comment.
 .TP
-.BI "-v vac:" score
+.BI -v " score
 Initialize the file system using the vac file
 system stored on Venti at
 .IR score .
@@ -373,7 +373,7 @@ format a new file system using the last archive score printed
 on the console:
 .IP
 .EX
-fossil/flfmt -v vac:b9b3...5559 /dev/sdC0/fossil
+fossil/flfmt -v b9b3...5559 /dev/sdC0/fossil
 .EE
 .LP
 Note that while

+ 3 - 5
sys/src/9/ip/gre.c

@@ -47,7 +47,7 @@ struct GREpriv
 	ulong		lenerr;			/* short packet */
 };
 
-static void grekick(void *x);
+static void grekick(void *x, Block *bp);
 
 static char*
 greconnect(Conv *c, char **argv, int argc)
@@ -90,7 +90,7 @@ static void
 grecreate(Conv *c)
 {
 	c->rq = qopen(64*1024, Qmsg, 0, c);
-	c->wq = qopen(64*1024, Qkick, grekick, c);
+	c->wq = qbypass(grekick, c);
 }
 
 static int
@@ -121,14 +121,12 @@ greclose(Conv *c)
 int drop;
 
 static void
-grekick(void *x)
+grekick(void *x, Block *bp)
 {
 	Conv *c = x;
 	GREhdr *ghp;
-	Block *bp;
 	uchar laddr[IPaddrlen], raddr[IPaddrlen];
 
-	bp = qget(c->wq);
 	if(bp == nil)
 		return;
 

+ 3 - 5
sys/src/9/ip/icmp.c

@@ -104,13 +104,13 @@ struct Icmppriv
 	ulong	out[Maxtype+1];
 };
 
-static void icmpkick(void *x);
+static void icmpkick(void *x, Block*);
 
 static void
 icmpcreate(Conv *c)
 {
 	c->rq = qopen(64*1024, Qmsg, 0, c);
-	c->wq = qopen(64*1024, Qkick, icmpkick, c);
+	c->wq = qbypass(icmpkick, c);
 }
 
 extern char*
@@ -157,14 +157,12 @@ icmpclose(Conv *c)
 }
 
 static void
-icmpkick(void *x)
+icmpkick(void *x, Block *bp)
 {
 	Conv *c = x;
 	Icmp *p;
-	Block *bp;
 	Icmppriv *ipriv;
 
-	bp = qget(c->wq);
 	if(bp == nil)
 		return;
 

+ 3 - 5
sys/src/9/ip/icmp6.c

@@ -172,13 +172,13 @@ enum {
 	mtuopt	= 5,
 };
 
-static void icmpkick6(void *x);
+static void icmpkick6(void *x, Block *bp);
 
 static void
 icmpcreate6(Conv *c)
 {
 	c->rq = qopen(64*1024, Qmsg, 0, c);
-	c->wq = qopen(64*1024, Qkick, icmpkick6, c);
+	c->wq = qbypass(icmpkick6, c);
 }
 
 static void
@@ -228,16 +228,14 @@ icmpadvise6(Proto *icmp, Block *bp, char *msg)
 }
 
 static void
-icmpkick6(void *x)
+icmpkick6(void *x, Block *bp)
 {
 	Conv *c = x;
 	IPICMP *p;
-	Block *bp;
 	uchar laddr[IPaddrlen], raddr[IPaddrlen];
 	Icmppriv6 *ipriv = c->p->priv;
 	Icmpcb6 *icb = (Icmpcb6*)c->ptcl;
 
-	bp = qget(c->wq);
 	if(bp == nil)
 		return;
 

+ 2 - 4
sys/src/9/ip/il.c

@@ -335,14 +335,13 @@ ilclose(Conv *c)
 }
 
 void
-ilkick(void *x)
+ilkick(void *x, Block *bp)
 {
 	Conv *c = x;
 	Ilhdr *ih;
 	Ilcb *ic;
 	int dlen;
 	ulong id, ack;
-	Block *bp;
 	Fs *f;
 	Ilpriv *priv;
 
@@ -350,7 +349,6 @@ ilkick(void *x)
 	priv = c->p->priv;
 	ic = (Ilcb*)c->ptcl;
 
-	bp = qget(c->wq);
 	if(bp == nil)
 		return;
 
@@ -418,7 +416,7 @@ static void
 ilcreate(Conv *c)
 {
 	c->rq = qopen(64*1024, 0, 0, c);
-	c->wq = qopen(64*1024, Qkick, ilkick, c);
+	c->wq = qbypass(ilkick, c);
 }
 
 int

+ 6 - 9
sys/src/9/ip/ip.c

@@ -220,7 +220,7 @@ iprouting(Fs *f, int on)
 		f->ip->stats[Forwarding] = 1;	
 }
 
-void
+int
 ipoput4(Fs *f, Block *bp, int gating, int ttl, int tos)
 {
 	Ipifc *ifc;
@@ -231,7 +231,7 @@ ipoput4(Fs *f, Block *bp, int gating, int ttl, int tos)
 	int lid, len, seglen, chunk, dlen, blklen, offset, medialen;
 	Route *r, *sr;
 	IP *ip;
-	Proto *pr;
+	int rv = 0;
 
 	ip = f->ip;
 
@@ -263,11 +263,7 @@ ipoput4(Fs *f, Block *bp, int gating, int ttl, int tos)
 	if(r == nil){
 		ip->stats[OutNoRoutes]++;
 		netlog(f, Logip, "no interface %V\n", eh->dst);
-		if(!gating){
-			freeblist(bp);
-print("ipoput4: no route\n");
-			error("no route");
-		}
+		rv = -1;
 		goto free;
 	}
 
@@ -315,7 +311,7 @@ print("ipoput4: no route\n");
 		ifc->m->bwrite(ifc, bp, V4, gate);
 		runlock(ifc);
 		poperror();
-		return;
+		return 0;
 	}
 
 if((eh->frag[0] & (IP_DF>>8)) && !gating) print("%V: DF set\n", eh->dst);
@@ -404,7 +400,8 @@ raise:
 	runlock(ifc);
 	poperror();
 free:
-	freeblist(bp);	
+	freeblist(bp);
+	return rv;
 }
 
 void

+ 2 - 2
sys/src/9/ip/ip.h

@@ -620,8 +620,8 @@ extern void	icmpttlexceeded(Fs*, uchar*, Block*);
 extern ushort	ipcsum(uchar*);
 extern void	ipiput4(Fs*, Ipifc*, Block*);
 extern void	ipiput6(Fs*, Ipifc*, Block*);
-extern void	ipoput4(Fs*, Block*, int, int, int);
-extern void	ipoput6(Fs*, Block*, int, int, int);
+extern int	ipoput4(Fs*, Block*, int, int, int);
+extern int	ipoput6(Fs*, Block*, int, int, int);
 extern int	ipstats(Fs*, char*, int);
 extern ushort	ptclbsum(uchar*, int);
 extern ushort	ptclcsum(Block*, int, int);

+ 5 - 4
sys/src/9/ip/ipv6.c

@@ -131,7 +131,7 @@ struct IP
 	int		iprouting;	/* true if we route like a gateway */
 };
 
-void
+int
 ipoput6(Fs *f, Block *bp, int gating, int ttl, int tos)
 {
 	int tentative;
@@ -143,7 +143,7 @@ ipoput6(Fs *f, Block *bp, int gating, int ttl, int tos)
 	Fraghdr6 fraghdr;
 	Block *xp, *nb;
 	IP *ip;
-
+	int rv = 0;
 
 	ip = f->ip;
 
@@ -184,6 +184,7 @@ ipoput6(Fs *f, Block *bp, int gating, int ttl, int tos)
 //		print("no route for %I, src %I free\n", eh->dst, eh->src);
 		ip->stats[OutNoRoutes]++;
 		netlog(f, Logip, "no interface %I\n", eh->dst);
+		rv = -1;
 		goto free;
 	}
 
@@ -228,7 +229,7 @@ ipoput6(Fs *f, Block *bp, int gating, int ttl, int tos)
 		ifc->m->bwrite(ifc, bp, V6, gate);
 		runlock(ifc);
 		poperror();
-		return;
+		return 0;
 	}
 
 	if(gating) 
@@ -328,7 +329,7 @@ raise:
 	poperror();
 free:
 	freeblist(bp);	
-
+	return rv;
 }
 
 void

+ 12 - 13
sys/src/9/ip/tcp.c

@@ -2411,11 +2411,6 @@ tcpoutput(Conv *s)
 	tpriv = s->p->priv;
 	version = s->ipversion;
 
-	if(waserror()){
-		localclose(s, up->errstr);
-		return;
-	}
-
 	for(msgs = 0; msgs < 100; msgs++) {
 		tcb = (Tcpctl*)s->ptcl;
 	
@@ -2423,7 +2418,7 @@ tcpoutput(Conv *s)
 		case Listen:
 		case Closed:
 		case Finwait2:
-			goto out;
+			return;
 		}
 	
 		/* force an ack when a window has opened up */
@@ -2550,7 +2545,7 @@ tcpoutput(Conv *s)
 			hbp = htontcp4(&seg, bp, &tcb->protohdr.tcp4hdr, tcb);
 			if(hbp == nil) {
 				freeblist(bp);
-				goto out;
+				return;
 			}
 			break;
 		case V6:
@@ -2558,7 +2553,7 @@ tcpoutput(Conv *s)
 			hbp = htontcp6(&seg, bp, &tcb->protohdr.tcp6hdr, tcb);
 			if(hbp == nil) {
 				freeblist(bp);
-				goto out;
+				return;
 			}
 			break;
 		default:
@@ -2590,10 +2585,16 @@ tcpoutput(Conv *s)
 
 		switch(version){
 		case V4:
-			ipoput4(f, hbp, 0, s->ttl, s->tos);
+			if(ipoput4(f, hbp, 0, s->ttl, s->tos) < 0){
+				/* a negative return means no route */
+				localclose(s, "no route");
+			}
 			break;
 		case V6:
-			ipoput6(f, hbp, 0, s->ttl, s->tos);
+			if(ipoput6(f, hbp, 0, s->ttl, s->tos) < 0){
+				/* a negative return means no route */
+				localclose(s, "no route");
+			}
 			break;
 		default:
 			panic("tcpoutput2: version %d", version);
@@ -2604,8 +2605,6 @@ tcpoutput(Conv *s)
 			qlock(s);
 		}
 	}
-out:
-	poperror();
 }
 
 /*
@@ -2745,7 +2744,7 @@ tcprxmit(Conv *s)
 	tcb->snd.ptr = tcb->snd.una;
 
 	/*
-	 *  We should be halving the slow start thershhold (down to one
+	 *  We should be halving the slow start threshhold (down to one
 	 *  mss) but leaving it at mss seems to work well enough
 	 */
  	tcb->ssthresh = tcb->mss;

+ 3 - 5
sys/src/9/ip/udp.c

@@ -93,7 +93,7 @@ struct Udppriv
 };
 
 void (*etherprofiler)(char *name, int qlen);
-void udpkick(void *x);
+void udpkick(void *x, Block *bp);
 
 /*
  *  protocol specific part of Conv
@@ -148,7 +148,7 @@ static void
 udpcreate(Conv *c)
 {
 	c->rq = qopen(128*1024, Qmsg, 0, 0);
-	c->wq = qopen(128*1024, Qkick, udpkick, c);
+	c->wq = qbypass(udpkick, c);
 }
 
 static void
@@ -176,14 +176,13 @@ udpclose(Conv *c)
 }
 
 void
-udpkick(void *x)
+udpkick(void *x, Block *bp)
 {
 	Conv *c = x;
 	Udp4hdr *uh4;
 	Udp6hdr *uh6;
 	ushort rport;
 	uchar laddr[IPaddrlen], raddr[IPaddrlen];
-	Block *bp;
 	Udpcb *ucb;
 	int dlen, ptcllen;
 	Udppriv *upriv;
@@ -194,7 +193,6 @@ udpkick(void *x)
 	f = c->p->f;
 
 	netlog(c->p->f, Logudp, "udp: kick\n");
-	bp = qget(c->wq);
 	if(bp == nil)
 		return;
 

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

@@ -241,6 +241,7 @@ ulong		pwait(Waitmsg*);
 void		qaddlist(Queue*, Block*);
 Block*		qbread(Queue*, int);
 long		qbwrite(Queue*, Block*);
+Queue*		qbypass(void (*)(void*, Block*), void*);
 int		qcanread(Queue*);
 void		qclose(Queue*);
 int		qconsume(Queue*, void*, int);

+ 26 - 3
sys/src/9/port/qio.c

@@ -38,6 +38,7 @@ struct Queue
 	int	eof;		/* number of eofs read by user */
 
 	void	(*kick)(void*);	/* restart output */
+	void	(*bypass)(void*, Block*);	/* bypass queue altogether */
 	void*	arg;		/* argument to kick */
 
 	QLock	rlock;		/* mutex for reading processes */
@@ -795,7 +796,6 @@ qopen(int limit, int msg, void (*kick)(void*), void *arg)
 	if(q == 0)
 		return 0;
 
-	ilock(q);
 	q->limit = q->inilim = limit;
 	q->kick = kick;
 	q->arg = arg;
@@ -804,7 +804,24 @@ qopen(int limit, int msg, void (*kick)(void*), void *arg)
 	q->state |= Qstarve;
 	q->eof = 0;
 	q->noblock = 0;
-	iunlock(q);
+
+	return q;
+}
+
+/* open a queue to be bypassed */
+Queue*
+qbypass(void (*bypass)(void*, Block*), void *arg)
+{
+	Queue *q;
+
+	q = malloc(sizeof(Queue));
+	if(q == 0)
+		return 0;
+
+	q->limit = 0;
+	q->arg = arg;
+	q->bypass = bypass;
+	q->state = 0;
 
 	return q;
 }
@@ -1143,8 +1160,14 @@ qbwrite(Queue *q, Block *b)
 	int n, dowakeup;
 	Proc *p;
 
-	dowakeup = 0;
 	n = BLEN(b);
+
+	if(q->bypass){
+		(*q->bypass)(q->arg, b);
+		return n;
+	}
+
+	dowakeup = 0;
 	qlock(&q->wlock);
 	if(waserror()){
 		if(b != nil)

+ 2 - 2
sys/src/cmd/fossil/flfmt.c

@@ -138,7 +138,7 @@ main(int argc, char *argv[])
 	superInit(label, root);
 	diskFree(disk);
 
-	if(argc == 1)
+	if(score == nil)
 		topLevel(argv[0]);
 
 Out:
@@ -163,7 +163,7 @@ fdsize(int fd)
 static void
 usage(void)
 {
-	fprint(2, "usage: %s [-b blocksize] file [vac:score]\n", argv0);
+	fprint(2, "usage: %s [-b blocksize] [-h host] [-l label] [-v score] [-y] file\n", argv0);
 	exits("usage");
 }
 

+ 1 - 1
sys/src/cmd/vnc/devcons.c

@@ -279,7 +279,7 @@ consclose(Chan *c)
 		if(t == nil)
 			break;
 		setsnarf(t->buf, t->n, 0);
-		free(t->buf);
+		t->buf = nil;	/* setsnarf took it */
 		free(t);
 		c->aux = nil;
 		break;

+ 2 - 1
sys/src/cmd/vnc/vncs.c

@@ -789,7 +789,8 @@ clientreadproc(Vncs *v)
 				vnclock(v);	/* for snarfvers */
 				setsnarf(buf, n, &v->snarfvers);
 				vncunlock(v);
-			}
+			}else
+				vncgobble(v, n);
 			break;
 		}
 	}

+ 11 - 11
sys/src/cmd/vnc/wsys.c

@@ -164,16 +164,16 @@ readmouse(Vnc *v)
 }
 
 static int snarffd = -1;
-static ulong snarf_vers;
+static ulong snarfvers;
 
 void 
 writesnarf(Vnc *v, long n)
 {
 	uchar buf[8192];
 	long m;
-	Biobuf * fd;
+	Biobuf *b;
 
-	if( (fd = Bopen("/dev/snarf", OWRITE)) == nil ){
+	if((b = Bopen("/dev/snarf", OWRITE)) == nil){
 		vncgobble(v, n);
 		return;
 	}
@@ -185,16 +185,16 @@ writesnarf(Vnc *v, long n)
 		vncrdbytes(v, buf, m);
 		n -= m;
 
-		Bwrite(fd, buf, m);
+		Bwrite(b, buf, m);
 	}
-	Bterm(fd);
-	snarf_vers++;
+	Bterm(b);
+	snarfvers++;
 }
 
 char *
-getsnarf(int * sz)
+getsnarf(int *sz)
 {
-	char * snarf, * p;
+	char *snarf, *p;
 	int n, c;
 
 	*sz =0;
@@ -206,7 +206,7 @@ getsnarf(int * sz)
 		p += c;
 		n -= c;
 		*sz += c;
-		if ( n == 0 ){
+		if (n == 0){
 			snarf = realloc(snarf, *sz + 8192);
 			n = 8192;
 		}
@@ -233,7 +233,7 @@ checksnarf(Vnc *v)
 		dir = dirstat("/dev/snarf");
 		if(dir == nil)	/* this happens under old drawterm */
 			continue;
-		if(dir->qid.vers > snarf_vers){
+		if(dir->qid.vers > snarfvers){
 			snarf = getsnarf(&len);
 
 			vnclock(v);
@@ -246,7 +246,7 @@ checksnarf(Vnc *v)
 
 			free(snarf);
 
-			snarf_vers = dir->qid.vers;
+			snarfvers = dir->qid.vers;
 		}
 		free(dir);
 	}