Plan 9 from Bell Labs’s /usr/web/sources/extra/changes/2006/0216

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


replica/pull: fix usage
 [rsc] --rwxrwxr-x M 1138436 glenda sys 1465 Feb 16 09:20 rc/bin/replica/pull
	/n/sourcesdump/2006/0216/plan9/rc/bin/replica/pull:3,9 - 
	/n/sourcesdump/2006/0217/plan9/rc/bin/replica/pull:3,9
	  rfork en
	  
	  fn usage {
	- 	echo 'usage: replica/pull [-csnv] replica-name [paths]' >[1=2]
	+ 	echo 'usage: replica/pull [-nv] [-c name] [-s name] replica-name [paths]' >[1=2]
	  	exit usage
	  }
	  

mp(2): fix mpsignif, mplowbits0
 [rsc] --rw-rw-r-- M 1138436 glenda sys 10762 Feb 16 11:18 sys/man/2/mp
	/n/sourcesdump/2006/0216/plan9/sys/man/2/mp:479,493 - 
	/n/sourcesdump/2006/0217/plan9/sys/man/2/mp:479,499
	  .IR m .
	  .PP
	  .I Mpsignif
	- returns the bit offset of the left most 1 bit in
	+ returns the number of significant bits in
	  .IR b .
	  .I Mplowbits0
	- returns the bit offset of the right most 1 bit.
	+ returns the number of consecutive zero bits
	+ at the low end of the significant bits.
	  For example, for 0x14,
	  .I mpsignif
	- would return 4 and
	+ returns 4 and
	  .I mplowbits0
	- would return 2.
	+ returns 2.
	+ For 0, 
	+ .I mpsignif
	+ and
	+ .I mplowbits0
	+ both return 0.
	  .PP
	  The remaining routines all work on arrays of
	  .B mpdigit
 [rsc] --rw-rw-r-- M 1138436 glenda sys 10762 Feb 16 11:18 sys/man/2/mp

iostats: respect path, add fmts, more worker threads
 [rsc] --rw-rw-r-- M 1138436 glenda sys 10209 Feb 16 09:25 sys/src/cmd/iostats/iostats.c
	/n/sourcesdump/2006/0216/plan9/sys/src/cmd/iostats/iostats.c:146,151 - 
	/n/sourcesdump/2006/0217/plan9/sys/src/cmd/iostats/iostats.c:146,153
	  	for(n = 0; n < Maxrpc; n++)
	  		stats->rpc[n].lo = 10000000000LL;
	  
	+ 	fmtinstall('M', dirmodefmt);
	+ 	fmtinstall('D', dirfmt);
	  	fmtinstall('F', fcallfmt);
	  
	  	if(chdir("/") < 0)
	/n/sourcesdump/2006/0216/plan9/sys/src/cmd/iostats/iostats.c:496,509 - 
	/n/sourcesdump/2006/0217/plan9/sys/src/cmd/iostats/iostats.c:498,543
	  	exits("fatal");
	  }
	  
	+ char*
	+ rdenv(char *v, char **end)
	+ {
	+ 	int fd, n;
	+ 	char *buf;
	+ 	Dir *d;
	+ 	if((fd = open(v, OREAD)) == -1)
	+ 		return nil;
	+ 	d = dirfstat(fd);
	+ 	if(d == nil || (buf = malloc(d->length + 1)) == nil)
	+ 		return nil;
	+ 	n = (int)d->length;
	+ 	n = read(fd, buf, n);
	+ 	close(fd);
	+ 	if(n <= 0){
	+ 		free(buf);
	+ 		buf = nil;
	+ 	}else{
	+ 		if(buf[n-1] != '\0')
	+ 			buf[n++] = '\0';
	+ 		*end = &buf[n];
	+ 	}
	+ 	free(d);
	+ 	return buf;
	+ }
	+ 
	+ char Defaultpath[] = ".\0/bin";
	  void
	  runprog(char *argv[])
	  {
	- 	char arg0[128];
	+ 	char *path, *ep, *p;
	+ 	char arg0[256];
	  
	- 	exec(argv[0], argv);
	- 	if (*argv[0] != '/' && strncmp(argv[0],"./",2) != 0) {
	- 		sprint(arg0, "/bin/%s", argv[0]);
	+ 	path = rdenv("/env/path", &ep);
	+ 	if(path == nil){
	+ 		path = Defaultpath;
	+ 		ep = path+sizeof(Defaultpath);
	+ 	}
	+ 	for(p = path; p < ep; p += strlen(p)+1){
	+ 		snprint(arg0, sizeof arg0, "%s/%s", p, argv[0]);
	  		exec(arg0, argv);
	  	}
	  	fatal("exec");
 [rsc] --rw-rw-r-- M 1138436 glenda sys 2626 Feb 16 09:25 sys/src/cmd/iostats/statfs.h
	/n/sourcesdump/2006/0216/plan9/sys/src/cmd/iostats/statfs.h:96,102 - 
	/n/sourcesdump/2006/0217/plan9/sys/src/cmd/iostats/statfs.h:96,102
	  
	  enum
	  {
	- 	Nr_workbufs 	= 16,
	+ 	Nr_workbufs 	= 40,
	  	Dsegpad		= 8192,
	  	Fidchunk	= 1000,
	  };

add glenda to group sys
 [rsc] --rw-rw-r-- M 1138436 rsc sys 17266 Feb 16 12:23 sys/src/cmd/fossil/9user.c
	/n/sourcesdump/2006/0216/plan9/sys/src/cmd/fossil/9user.c:43,49 - 
	/n/sourcesdump/2006/0217/plan9/sys/src/cmd/fossil/9user.c:43,49
	  	"adm:adm:adm:sys\n"
	  	"none:none::\n"
	  	"noworld:noworld::\n"
	- 	"sys:sys::\n"
	+ 	"sys:sys::glenda\n"
	  	"glenda:glenda:glenda:\n"
	  };
	  

delete scratch file


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].