Plan 9 from Bell Labs’s /usr/web/sources/extra/changes/2005/0926

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


Add wireless card.
 [jmk] --rw-rw-r-- M 399900 presotto sys 27879 Sep 26 10:00 sys/src/9/pc/wavelan.c
	/n/sourcesdump/2005/0926/plan9/sys/src/9/pc/wavelan.c:1263,1267 - 
	/n/sourcesdump/2005/0927/plan9/sys/src/9/pc/wavelan.c:1263,1268
	  	"Instant Wireless Network PC Card",
	  	"Avaya Wireless PC Card",
	  	"AirLancer MC-11",
	+ 	"INTERSIL;HFA384x/IEEE;Version 01.02;",
	  	nil,
	  };
 [rsc] --rw-rw-r-- M 399900 glenda sys 22681 Sep 26 16:25 sys/src/9/port/devcons.c
	/n/sourcesdump/2005/0926/plan9/sys/src/9/port/devcons.c:4,9 - 
	/n/sourcesdump/2005/0927/plan9/sys/src/9/port/devcons.c:4,10
	  #include	"dat.h"
	  #include	"fns.h"
	  #include	"../port/error.h"
	+ #include	"pool.h"
	  
	  #include	<authsrv.h>
	  
	/n/sourcesdump/2005/0926/plan9/sys/src/9/port/devcons.c:702,708 - 
	/n/sourcesdump/2005/0927/plan9/sys/src/9/port/devcons.c:703,709
	  	ulong l;
	  	Mach *mp;
	  	char *b, *bp;
	- 	char tmp[128];		/* must be >= 6*NUMSIZE */
	+ 	char tmp[256];		/* must be >= 18*NUMSIZE (Qswap) */
	  	char *cbuf = buf;
	  	int ch, i, k, id, eol;
	  	vlong offset = off;
	/n/sourcesdump/2005/0926/plan9/sys/src/9/port/devcons.c:870,878 - 
	/n/sourcesdump/2005/0927/plan9/sys/src/9/port/devcons.c:871,891
	  		return n;
	  
	  	case Qswap:
	- 		sprint(tmp, "%lud/%lud memory %lud/%lud swap\n",
	- 			palloc.user-palloc.freecount,
	- 			palloc.user, conf.nswap-swapalloc.free, conf.nswap);
	+ 		snprint(tmp, sizeof tmp,
	+ 			"%lud memory\n"
	+ 			"%d pagesize\n"
	+ 			"%lud kernel\n"
	+ 			"%lud/%lud user\n"
	+ 			"%lud/%lud swap\n"
	+ 			"%lud/%lud kernel malloc\n"
	+ 			"%lud/%lud kernel draw\n",
	+ 			conf.npage*BY2PG,
	+ 			BY2PG,
	+ 			conf.npage-conf.upages,
	+ 			palloc.user-palloc.freecount, palloc.user,
	+ 			conf.nswap-swapalloc.free, conf.nswap,
	+ 			mainmem->cursize, mainmem->maxsize,
	+ 			imagmem->cursize, imagmem->maxsize);
	  
	  		return readstr((ulong)offset, buf, n, tmp);
	  

State name restrictions.
 [rsc] --rwxrwxr-x M 399900 glenda sys 1457 Sep 26 15:01 rc/bin/patch/create
	/n/sourcesdump/2005/0926/plan9/rc/bin/patch/create:6,12 - 
	/n/sourcesdump/2005/0927/plan9/rc/bin/patch/create:6,12
	  }
	  
	  if(! echo $1 | grep -s '^[a-z_0-9.\-]+$'){
	- 	echo bad name
	+ 	echo 'bad name: [a-z0-9._\-]+ only' >[1=2]
	  	exit usage
	  }
	  
 [rsc] --rw-rw-r-- M 399900 glenda sys 2237 Sep 26 15:00 sys/man/1/patch
	/n/sourcesdump/2005/0926/plan9/sys/man/1/patch:35,40 - 
	/n/sourcesdump/2005/0927/plan9/sys/man/1/patch:35,41
	  used to propose additions or changes to Plan 9.
	  Each patch has a 
	  .I name
	+ (lowercase letters, numbers, dash, dot, and underscore only)
	  and is stored in
	  .BI /n/sources/patch/ name \fR.
	  .PP

Change swap device.
 [rsc] --rw-rw-r-- M 399900 glenda sys 8965 Sep 26 16:25 sys/man/3/cons
	/n/sourcesdump/2005/0926/plan9/sys/man/3/cons:297,313 - 
	/n/sourcesdump/2005/0927/plan9/sys/man/3/cons:297,326
	  .PP
	  The
	  .B swap
	- device holds a string of the form
	+ device holds a text block giving memory usage statistics:
	  .IP
	- .IB m1 / m2
	- .B memory
	- .IB s1 / s2
	- .B swap
	+ .EX
	+ \fIn\fP memory
	+ \fIn\fP pagesize
	+ \fIn\fP kernel
	+ \fIn\fP/\fIm\fP user
	+ \fIn\fP/\fIm\fP swap
	+ \fIn\fP/\fIm\fP kernel malloc
	+ \fIn\fP/\fIm\fP kernel draw
	+ .EE
	  .PP
	- These give, for each of
	- internal memory and the swapping area,
	- the number of pages used and the total available.
	+ These are total memory (bytes), system page size (bytes),
	+ kernel memory (pages), user memory (pages), swap space (pages),
	+ kernel malloced data (bytes), and kernel graphics data (bytes).
	+ The expression
	+ .IR n / m
	+ indicates
	+ .I n
	+ used out of
	+ .I m
	+ available.
	  These numbers are not blank padded.
	+ .PP
	  To turn on swapping, write to
	  .B swap
	  the textual file descriptor number of a file or device on which to swap.

Print to standard error when standard output is valuable.
 [rsc] --rw-rw-r-- M 399900 glenda sys 23848 Sep 26 16:24 sys/src/cmd/cc/lex.c
	/n/sourcesdump/2005/0926/plan9/sys/src/cmd/cc/lex.c:177,183 - 
	/n/sourcesdump/2005/0927/plan9/sys/src/cmd/cc/lex.c:177,184
	  	}
	  	if((debug['a'] || debug['Z']) && !debug['n']) {
	  		outfile = 0;
	- 		Binit(&outbuf, 1, OWRITE);
	+ 		Binit(&outbuf, dup(1, -1), OWRITE);
	+ 		dup(2, 1);
	  	} else {
	  		c = mycreat(outfile, 0664);
	  		if(c < 0) {
 [sys] --rwxrwxr-x M 399900 rsc sys 358222 Sep 26 23:08 386/bin/8c
	/sys/src/cmd/cc/lex.c:compile

Small cleanups backported from Plan 9 from User Space.
 [rsc] --rw-rw-r-- M 399900 glenda sys 737 Sep 26 16:28 sys/src/libhttpd/gethead.c
	/n/sourcesdump/2005/0926/plan9/sys/src/libhttpd/gethead.c:19,25 - 
	/n/sourcesdump/2005/0927/plan9/sys/src/libhttpd/gethead.c:19,25
	  		s = (char*)hin->pos;
	  		pp = s;
	  		while(p = memchr(pp, '\n', (char*)hin->stop - pp)){
	- 			if(!many || p == pp || p == pp + 1 && *pp == '\r'){
	+ 			if(!many || p == pp || (p == pp + 1 && *pp == '\r')){
	  				pp = p + 1;
	  				break;
	  			}
	/n/sourcesdump/2005/0926/plan9/sys/src/libhttpd/gethead.c:28,40 - 
	/n/sourcesdump/2005/0927/plan9/sys/src/libhttpd/gethead.c:28,40
	  		hin->pos = (uchar*)pp;
	  		n = pp - s;
	  		if(c->hstop + n > &c->header[HBufSize])
	- 			return 0;
	+ 			return -1;
	  		memmove(c->hstop, s, n);
	  		c->hstop += n;
	  		*c->hstop = '\0';
	  		if(p != nil)
	- 			return 1;
	- 		if(hreadbuf(hin, hin->pos) == nil || hin->state == Hend)
	  			return 0;
	+ 		if(hreadbuf(hin, hin->pos) == nil || hin->state == Hend)
	+ 			return -1;
	  	}
	  }
 [rsc] --rw-rw-r-- M 399900 glenda sys 18965 Sep 26 16:28 sys/src/libhttpd/parse.c
	/n/sourcesdump/2005/0926/plan9/sys/src/libhttpd/parse.c:198,207 - 
	/n/sourcesdump/2005/0927/plan9/sys/src/libhttpd/parse.c:198,209
	  
	  	memset(&h, 0, sizeof(h));
	  	h.c = c;
	- 	alarm(timeout);
	- 	if(!hgethead(c, 1))
	+ 	if(timeout)
	+ 		alarm(timeout);
	+ 	if(hgethead(c, 1) < 0)
	  		return -1;
	- 	alarm(0);
	+ 	if(timeout)
	+ 		alarm(0);
	  	h.hstart = c->hpos;
	  
	  	if(setjmp(h.jmp) == -1)
 [rsc] --rw-rw-r-- M 399900 glenda sys 5071 Sep 26 16:28 sys/src/libhttpd/parsereq.c
	/n/sourcesdump/2005/0926/plan9/sys/src/libhttpd/parsereq.c:15,21 - 
	/n/sourcesdump/2005/0927/plan9/sys/src/libhttpd/parsereq.c:15,20
	  static	int		getc(HConnect*);
	  static	char*		getword(HConnect*);
	  static	Strings		parseuri(HConnect *c, char*);
	- static	Strings		stripmagic(char*);
	  static	Strings		stripsearch(char*);
	  
	  /*
	/n/sourcesdump/2005/0926/plan9/sys/src/libhttpd/parsereq.c:41,50 - 
	/n/sourcesdump/2005/0927/plan9/sys/src/libhttpd/parsereq.c:40,51
	  	 * later requests have to come quickly.
	  	 * only works for http/1.1 or later.
	  	 */
	- 	alarm(timeout);
	- 	if(!hgethead(c, 0))
	- 		return 0;
	- 	alarm(0);
	+ 	if(timeout)
	+ 		alarm(timeout);
	+ 	if(hgethead(c, 0) < 0)
	+ 		return -1;
	+ 	if(timeout)
	+ 		alarm(0);
	  	c->reqtime = time(nil);
	  	c->req.meth = getword(c);
	  	if(c->req.meth == nil){
	/n/sourcesdump/2005/0926/plan9/sys/src/libhttpd/parsereq.c:284,290 - 
	/n/sourcesdump/2005/0927/plan9/sys/src/libhttpd/parsereq.c:285,291
	  		}
	  		ch = getc(c);
	  	}
	- 	return nil;
	+ 	return nil;	/* stupid 8c */
	  }
	  
	  static int
 [sys] --rwxrwxr-x M 399900 glenda sys 245198 Sep 26 23:08 386/bin/venti/venti
 [sys] --rwxrwxr-x M 399900 glenda sys 291589 Sep 26 23:08 386/bin/ip/httpd/httpd
	/sys/src/libhttpd/gethead.c:hgethead
	/sys/src/libhttpd/parse.c:hparseheaders
	/sys/src/libhttpd/parsereq.c:hparsereq
 [sys] --rwxrwxr-x M 399900 glenda sys 114798 Sep 26 23:08 386/bin/ip/httpd/imagemap
 [sys] --rwxrwxr-x M 399900 glenda sys 123085 Sep 26 23:08 386/bin/ip/httpd/man2html
	/sys/src/libhttpd/gethead.c:hgethead
	/sys/src/libhttpd/parse.c:hparseheaders
 [sys] --rwxrwxr-x M 399900 rsc sys 115643 Sep 26 23:08 386/bin/ip/httpd/netlib_find
	/sys/src/cmd/ip/httpd/log.c:writelog
	/sys/src/libhttpd/gethead.c:hgethead
	/sys/src/libhttpd/parse.c:getc
	/sys/src/libhttpd/parse.c:hparseheaders
	/sys/src/libhttpd/parse.c:hreqcleanup
	/sys/src/libhttpd/parse.c:mimeauthorization
 [sys] --rwxrwxr-x M 399900 rsc sys 114439 Sep 26 23:08 386/bin/ip/httpd/netlib_history
 [sys] --rwxrwxr-x M 399900 glenda sys 131094 Sep 26 23:08 386/bin/ip/httpd/save
 [sys] --rwxrwxr-x M 399900 presotto sys 131239 Sep 26 23:08 386/bin/ip/httpd/webls
 [sys] --rwxrwxr-x M 399900 glenda sys 112677 Sep 26 23:08 386/bin/ip/httpd/wikipost
	/sys/src/libhttpd/gethead.c:hgethead
	/sys/src/libhttpd/parse.c:hparseheaders
 [sys] --rw-rw-r-- M 399900 glenda sys 99596 Sep 26 23:08 386/lib/libhttpd.a


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.