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

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


64-bit-isms.
 [jmk] --rw-rw-r-- M 256228 glenda sys 11721 Sep 23 20:51 sys/src/cmd/ip/telnetd.c
	/n/sourcesdump/2005/0923/plan9/sys/src/cmd/ip/telnetd.c:547,560 - 
	/n/sourcesdump/2005/0924/plan9/sys/src/cmd/ip/telnetd.c:547,561
	  void*
	  share(int len)
	  {
	- 	ulong vastart;
	+ 	uchar *vastart;
	  
	- 	vastart = ((ulong)sbrk(0)) + 2*1024*1024;
	+ 	vastart = sbrk(0);
	+ 	vastart += 2*1024*1024;
	  
	- 	if(segattach(0, "shared", (void *)vastart, len) < 0)
	+ 	if(segattach(0, "shared", vastart, len) < 0)
	  		return 0;
	  
	- 	return (void*)vastart;
	+ 	return vastart;
	  }
	  
	  /*
 [jmk] --rw-rw-r-- M 256228 glenda sys 8573 Sep 23 21:05 sys/src/cmd/ip/telnet.c
	/n/sourcesdump/2005/0923/plan9/sys/src/cmd/ip/telnet.c:215,221 - 
	/n/sourcesdump/2005/0924/plan9/sys/src/cmd/ip/telnet.c:215,223
	  	Binit(&ib, net, OREAD);
	  	Binit(&ob, 1, OWRITE);
	  	eofs = 0;
	- 	for(;; Bbuffered(&ib) == 0 ? Bflush(&ob) : 0){
	+ 	for(;;){
	+ 		if(Bbuffered(&ib) == 0)
	+ 			Bflush(&ob);
	  		if(interrupted){
	  			interrupted = 0;
	  			send2(net, Iac, Interrupt);
	/n/sourcesdump/2005/0923/plan9/sys/src/cmd/ip/telnet.c:520,531 - 
	/n/sourcesdump/2005/0924/plan9/sys/src/cmd/ip/telnet.c:522,534
	  void*
	  share(int len)
	  {
	- 	ulong vastart;
	+ 	uchar *vastart;
	  
	- 	vastart = ((ulong)sbrk(0)) + 2*1024*1024;
	+ 	vastart = sbrk(0);
	+ 	vastart += 2*1024*1024;
	  
	- 	if(segattach(0, "shared", (void *)vastart, len) < 0)
	+ 	if(segattach(0, "shared", vastart, len) < 0)
	  		return 0;
	  
	- 	return (void*)vastart;
	+ 	return vastart;
	  }
 [jmk] --rw-rw-r-- M 256228 jmk sys 1914 Sep 23 21:32 sys/src/cmd/unlnfs.c
	/n/sourcesdump/2005/0923/plan9/sys/src/cmd/unlnfs.c:40,46 - 
	/n/sourcesdump/2005/0924/plan9/sys/src/cmd/unlnfs.c:40,45
	  	Dir *dir;
	  	char *sub;
	  	int fd, i;
	- 	uchar digest[MD5dlen];
	  	Name *na;
	  
	  	fd = open(d, OREAD);
	/n/sourcesdump/2005/0923/plan9/sys/src/cmd/unlnfs.c:95,101 - 
	/n/sourcesdump/2005/0924/plan9/sys/src/cmd/unlnfs.c:94,99
	  {
	  	Biobuf *bio;
	  	char *f;
	- 	int slot;
	  	Name *n;
	  
	  	bio = Bopen(lnfile, OREAD);
 [jmk] --rw-rw-r-- M 256228 glenda sys 4002 Sep 23 22:00 sys/src/cmd/venti/utils.c
	/n/sourcesdump/2005/0923/plan9/sys/src/cmd/venti/utils.c:97,151 - 
	/n/sourcesdump/2005/0924/plan9/sys/src/cmd/venti/utils.c:97,118
	  	f->args = nil;
	  }
	  
	- static int
	- sFlush(Fmt *f)
	- {
	- 	char *s;
	- 	int n;
	- 
	- 	n = (int)f->farg;
	- 	n += 256;
	- 	f->farg = (void*)n;
	- 	s = f->start;
	- 	f->start = realloc(s, n);
	- 	if(f->start == nil){
	- 		f->start = s;
	- 		return 0;
	- 	}
	- 	f->to = (char*)f->start + ((char*)f->to - s);
	- 	f->stop = (char*)f->start + n - 1;
	- 	return 1;
	- }
	- 
	  static char*
	  logit(int severity, char *fmt, va_list args)
	  {
	- 	Fmt f;
	- 	int n;
	+ 	char *s;
	  
	- 	f.runes = 0;
	- 	n = 32;
	- 	f.start = malloc(n);
	- 	if(f.start == nil)
	+ 	s = vsmprint(fmt, args);
	+ 	if(s == nil)
	  		return nil;
	- 	f.to = f.start;
	- 	f.stop = (char*)f.start + n - 1;
	- 	f.flush = sFlush;
	- 	f.farg = (void*)n;
	- 	f.nfmt = 0;
	- 	f.args = args;
	- 	n = dofmt(&f, fmt);
	- 	if(n < 0)
	- 		return nil;
	- 	*(char*)f.to = '\0';
	  
	  	if(severity != EOk){
	  		if(argv0 == nil)
	- 			fprint(2, "%s: err %d: %s\n", argv0, severity, f.start);
	+ 			fprint(2, "%s: err %d: %s\n", argv0, severity, s);
	  		else
	- 			fprint(2, "err %d: %s\n", severity, f.start);
	+ 			fprint(2, "err %d: %s\n", severity, s);
	  	}
	- 	return f.start;
	+ 	return s;
	  }
	  
	  void
 [sys] --rwxrwxr-x M 256228 glenda sys 154143 Sep 23 23:08 386/bin/venti/buildindex
 [sys] --rwxrwxr-x M 256228 glenda sys 158386 Sep 23 23:08 386/bin/venti/checkarenas
 [sys] --rwxrwxr-x M 256228 glenda sys 154989 Sep 23 23:08 386/bin/venti/checkindex
	/sys/src/cmd/venti/utils.c:allocZBlock
	/sys/src/cmd/venti/utils.c:logit
	/sys/src/cmd/venti/utils.c:sFlush
 [sys] --rwxrwxr-x M 256228 glenda sys 145175 Sep 23 23:08 386/bin/venti/clumpstats
	/sys/src/cmd/venti/clumpstats.c:clumpStats
	/sys/src/cmd/venti/clumpstats.c:readArenaInfo
	/sys/src/cmd/venti/utils.c:allocZBlock
	/sys/src/cmd/venti/utils.c:logit
	/sys/src/cmd/venti/utils.c:sFlush
 [sys] --rwxrwxr-x M 256228 glenda sys 127626 Sep 23 23:08 386/bin/venti/findscore
 [sys] --rwxrwxr-x M 256228 glenda sys 128628 Sep 23 23:08 386/bin/venti/fmtarenas
 [sys] --rwxrwxr-x M 256228 glenda sys 145437 Sep 23 23:08 386/bin/venti/fmtindex
 [sys] --rwxrwxr-x M 256228 glenda sys 145179 Sep 23 23:08 386/bin/venti/fmtisect
 [sys] --rwxrwxr-x M 256228 glenda sys 127094 Sep 23 23:08 386/bin/venti/rdarena
 [sys] --rwxrwxr-x M 256228 rsc sys 169425 Sep 23 23:08 386/bin/venti/syncindex
	/sys/src/cmd/venti/utils.c:allocZBlock
	/sys/src/cmd/venti/utils.c:logit
	/sys/src/cmd/venti/utils.c:sFlush
 [sys] --rwxrwxr-x M 256228 glenda sys 245157 Sep 23 23:08 386/bin/venti/venti
 [sys] --rwxrwxr-x M 256228 glenda sys 103977 Sep 23 23:08 386/bin/venti/verifyarena
	/sys/src/cmd/venti/utils.c:allocZBlock
	/sys/src/cmd/venti/utils.c:logit
	/sys/src/cmd/venti/utils.c:sFlush
	/sys/src/libc/fmt/fmt.c:_fmtinstall
 [sys] --rwxrwxr-x M 256228 rsc sys 175882 Sep 23 23:08 386/bin/venti/wrarena
	/sys/src/cmd/venti/utils.c:allocZBlock
	/sys/src/cmd/venti/utils.c:logit
	/sys/src/cmd/venti/utils.c:sFlush
 [sys] --rwxrwxr-x M 256228 glenda sys 121988 Sep 23 23:08 386/bin/ip/telnetd
	/sys/src/cmd/ip/telnetd.c:share
 [sys] --rwxrwxr-x M 256228 glenda sys 80355 Sep 23 23:08 386/bin/telnet
	/sys/src/cmd/ip/telnet.c:fromnet
	/sys/src/cmd/ip/telnet.c:share
 [sys] --rwxrwxr-x M 256228 sys sys 71353 Sep 23 23:08 386/bin/unlnfs
	/sys/src/cmd/unlnfs.c:readnames
	/sys/src/cmd/unlnfs.c:renamedir


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].