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

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


expect(1): fix source path
 [rsc] --rw-rw-r-- M 303009 presotto sys 3018 Mar  9 09:15 sys/man/1/expect
	/n/sourcesdump/2006/0309/plan9/sys/man/1/expect:101,107 - 
	/n/sourcesdump/2006/0310/plan9/sys/man/1/expect:101,107
	  .B /rc/bin/ipconf/*
	  example dialer scripts for ppp
	  .SH SOURCE
	- .B /sys/src/dial/*.c
	+ .B /sys/src/cmd/dial/*.c
	  .SH SEE ALSO
	  .IR ppp (8),
	  .IR telco (4)

eqn: avoid use of inline keyword
 [rsc] --rw-rw-r-- M 303009 glenda sys 7121 Mar  9 09:19 sys/src/cmd/eqn/main.c
	/n/sourcesdump/2006/0309/plan9/sys/src/cmd/eqn/main.c:12,18 - 
	/n/sourcesdump/2006/0310/plan9/sys/src/cmd/eqn/main.c:12,18
	  void	settype(char *);
	  int	getdata(void);
	  int	getline(char *);
	- void	inline(void);
	+ void	inlineeq(void);
	  void	init(void);
	  void	init_tbl(void);
	  
	/n/sourcesdump/2006/0309/plan9/sys/src/cmd/eqn/main.c:123,129 - 
	/n/sourcesdump/2006/0310/plan9/sys/src/cmd/eqn/main.c:123,129
	  			printf(".lf %d\n", curfile->lineno+1);
	  		}
	  		else if (type == lefteq)
	- 			inline();
	+ 			inlineeq();
	  		else if (in[0] == '.' && in[1] == 'l' && in[2] == 'f') {
	  			if (sscanf(in+3, "%d %s", &ln, fname) == 2) {
	  				free(curfile->fname);
	/n/sourcesdump/2006/0309/plan9/sys/src/cmd/eqn/main.c:154,160 - 
	/n/sourcesdump/2006/0310/plan9/sys/src/cmd/eqn/main.c:154,160
	  	return(c);
	  }
	  
	- void inline(void)
	+ void inlineeq(void)
	  {
	  	int ds, n, sz1 = 0;
	  

upas/marshal: avoid use of inline keyword
 [rsc] --rw-rw-r-- M 303009 glenda sys 32859 Mar  9 09:18 sys/src/cmd/upas/marshal/marshal.c
	/n/sourcesdump/2006/0309/plan9/sys/src/cmd/upas/marshal/marshal.c:10,16 - 
	/n/sourcesdump/2006/0310/plan9/sys/src/cmd/upas/marshal/marshal.c:10,16
	  	Attach	*next;
	  	char	*path;
	  	char	*type;
	- 	int	inline;
	+ 	int	ainline;
	  	Ctype	*ctype;
	  };
	  
	/n/sourcesdump/2006/0309/plan9/sys/src/cmd/upas/marshal/marshal.c:382,388 - 
	/n/sourcesdump/2006/0310/plan9/sys/src/cmd/upas/marshal/marshal.c:382,388
	  		Bprint(&out, "\tboundary=\"%s\"\n\n", boundary);
	  		Bprint(&out, "This is a multi-part message in MIME format.\n");
	  		Bprint(&out, "--%s\n", boundary);
	- 		Bprint(&out, "Content-Disposition: inline\n");
	+ 		Bprint(&out, "Content-Disposition: ainline\n");
	  	}
	  
	  	if(!nflag){
	/n/sourcesdump/2006/0309/plan9/sys/src/cmd/upas/marshal/marshal.c:679,686 - 
	/n/sourcesdump/2006/0310/plan9/sys/src/cmd/upas/marshal/marshal.c:679,686
	  	if(strcmp(a->type, "text/plain") != 0)
	  		Bprint(out, "Content-Type: %s\n", a->type);
	  
	- 	if(a->inline){
	- 		Bprint(out, "Content-Disposition: inline\n");
	+ 	if(a->ainline){
	+ 		Bprint(out, "Content-Disposition: ainline\n");
	  	} else {
	  		p = strrchr(a->path, '/');
	  		if(p == nil)
	/n/sourcesdump/2006/0309/plan9/sys/src/cmd/upas/marshal/marshal.c:806,812 - 
	/n/sourcesdump/2006/0310/plan9/sys/src/cmd/upas/marshal/marshal.c:806,812
	  }
	  
	  Attach*
	- mkattach(char *file, char *type, int inline)
	+ mkattach(char *file, char *type, int ainline)
	  {
	  	Ctype *c;
	  	Attach *a;
	/n/sourcesdump/2006/0309/plan9/sys/src/cmd/upas/marshal/marshal.c:824,830 - 
	/n/sourcesdump/2006/0310/plan9/sys/src/cmd/upas/marshal/marshal.c:824,830
	  	a->path = file;
	  	a->next = nil;
	  	a->type = type;
	- 	a->inline = inline;
	+ 	a->ainline = ainline;
	  	a->ctype = nil;
	  	if(type != nil){
	  		for(c = ctype; ; c++)

webfsget: use correct name in usage
 [rsc] --rw-rw-r-- M 303009 rsc sys 1597 Mar  9 09:17 sys/src/cmd/webfsget.c
	/n/sourcesdump/2006/0309/plan9/sys/src/cmd/webfsget.c:18,24 - 
	/n/sourcesdump/2006/0310/plan9/sys/src/cmd/webfsget.c:18,24
	  void
	  usage(void)
	  {
	- 	fprint(2, "usage: webget [-b baseurl] [-m mtpt] [-p postbody] url\n");
	+ 	fprint(2, "usage: webfsget [-b baseurl] [-m mtpt] [-p postbody] url\n");
	  	exits("usage");
	  }
	  

kmem(1): new program
 [rsc] --rwxrwxr-x M 303009 rsc sys 468 Mar  9 16:36 rc/bin/kmem
 [rsc] --rw-rw-r-- M 303009 glenda sys 3022 Mar  9 16:36 sys/lib/acid/leak
	[diffs elided - too long]
	[diff -c /n/sourcesdump/2006/0309/plan9/sys/lib/acid/leak /n/sourcesdump/2006/0310/plan9/sys/lib/acid/leak]
 [rsc] --rw-rw-r-- M 303009 glenda sys 3307 Mar  9 16:36 sys/man/1/leak
	/n/sourcesdump/2006/0309/plan9/sys/man/1/leak:19,24 - 
	/n/sourcesdump/2006/0310/plan9/sys/man/1/leak:19,29
	  .I width
	  ]
	  .I pid ...
	+ .PP
	+ .B kmem
	+ [
	+ .I kernel
	+ ]
	  .SH DESCRIPTION
	  .I Leak
	  examines the named processes, which
	/n/sourcesdump/2006/0309/plan9/sys/man/1/leak:57,63 - 
	/n/sourcesdump/2006/0310/plan9/sys/man/1/leak:62,70
	  .PP
	  If the
	  .B -b
	- option is given, leak will print a Plan 9 image file
	+ option is given,
	+ .I leak
	+ will print a Plan 9 image file
	  graphically summarizing the memory arenas.
	  In the image, each pixel represents
	  .I res
	/n/sourcesdump/2006/0309/plan9/sys/man/1/leak:102,107 - 
	/n/sourcesdump/2006/0310/plan9/sys/man/1/leak:109,120
	  processes, and is only necessary
	  when inspecting processes started
	  from stripped binaries.
	+ .PP
	+ .I Kmem
	+ prints a summary of all allocated blocks in the running kernel.
	+ Each line of the summary gives
	+ the count and total size of blocks allocated at an allocation point.
	+ The list is sorted by count in decreasing order.
	  .SH EXAMPLES
	  List lost blocks in 
	  .IR 8.out .
	/n/sourcesdump/2006/0309/plan9/sys/man/1/leak:113,132 - 
	/n/sourcesdump/2006/0310/plan9/sys/man/1/leak:126,153
	  would need editing before sending to the shell.
	  .IP
	  .EX
	- g% leak -s 8.out
	+ % leak -s 8.out
	  leak -s 229 230
	- g% leak -s 8.out | rc
	+ % leak -s 8.out | rc
	  src(0x0000bf1b); // 64
	  src(0x000016f5); // 7
	  src(0x0000a988); // 7
	- g%
	+ %
	  .EE
	  .LP
	  View the memory usage graphic for the window system.
	  .IP
	  .EX
	- g% leak -b rio | rc | page
	+ % leak -b rio | rc | page
	  .EE
	+ .PP
	+ List the top allocation points in the kernel,
	+ first by count and then by total size:
	+ .IP
	+ .EX
	+ % kmem | sed 10q
	+ % kmem | sort -nr +1 | sed 10q
	+ .EE
	  .SH SOURCE
	  .B /sys/lib/acid/leak
	  .br
	/n/sourcesdump/2006/0309/plan9/sys/man/1/leak:133,141 - 
	/n/sourcesdump/2006/0310/plan9/sys/man/1/leak:154,169
	  .B /sys/src/cmd/aux/acidleak.c
	  .br
	  .B /rc/bin/leak
	+ .br
	+ .B /rc/bin/kmem
	  .SH BUGS
	- Leak depends on the internal structure of the
	+ .I Leak
	+ and
	+ .I kmem
	+ depend on the internal structure of the
	  libc pool memory allocator (see 
	  .IR pool (2)).
	  Since the ANSI/POSIX environment uses a different
	- allocator, leak will not work on APE programs.
	+ allocator,
	+ .I leak
	+ will not work on APE programs.

kernel: fix memory leak in attach
 [rsc] --rw-rw-r-- M 303009 glenda sys 34831 Mar  9 16:34 sys/src/9/port/chan.c
	/n/sourcesdump/2006/0309/plan9/sys/src/9/port/chan.c:1700,1705 - 
	/n/sourcesdump/2006/0310/plan9/sys/src/9/port/chan.c:1700,1706
	  		s[n] = 0;
	  		aname = s;
	  		name = s;
	+ 		setmalloctag(s, pc);
	  	}
	  	
	  	while(*name){
	/n/sourcesdump/2006/0309/plan9/sys/src/9/port/chan.c:1729,1735 - 
	/n/sourcesdump/2006/0310/plan9/sys/src/9/port/chan.c:1730,1736
	  char*
	  validnamedup(char *aname, int slashok)
	  {
	- 	return validname0(aname, slashok, 1, 0);
	+ 	return validname0(aname, slashok, 1, getcallerpc(&aname));
	  }
	  
	  void
 [rsc] --rw-rw-r-- M 303009 glenda sys 22192 Mar  9 16:34 sys/src/9/port/sysfile.c
	/n/sourcesdump/2006/0309/plan9/sys/src/9/port/sysfile.c:1037,1042 - 
	/n/sourcesdump/2006/0310/plan9/sys/src/9/port/sysfile.c:1037,1043
	  		c0 = devtab[ret]->attach((char*)&bogus);
	  
	  		poperror();	/* spec */
	+ 		free(spec);
	  		poperror();	/* ac bc */
	  		if(ac)
	  			cclose(ac);


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.