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

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


disksim(8): add mbr to example
 [rsc] --rw-rw-r-- M 337084 rsc sys 1476 Apr  4 07:34 sys/man/8/disksim
	/n/sourcesdump/2006/0404/plan9/sys/man/8/disksim:64,69 - 
	/n/sourcesdump/2006/0405/plan9/sys/man/8/disksim:64,70
	  .EX
	  aux/disksim
	  echo geometry 40000 512 0 0 0 >/dev/sdXX/ctl # 20MB
	+ disk/mbr /dev/sdXX/data
	  disk/fdisk -baw /dev/sdXX/data
	  disk/prep /dev/sdXX/plan9
	  .EE

drawterm: documentation, Make.osx, add unused devtls
 [rsc] --rw-rw-r-- M 337084 glenda sys 1380 Apr  4 07:33 sys/src/cmd/unix/README
	/n/sourcesdump/2006/0404/plan9/sys/src/cmd/unix/README:9,24 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/cmd/unix/README:9,16
	  	drawterm/
	  		Drawterm is a Unix and Windows program that simulates
	  		a Plan 9 terminal to connect to a Plan 9 cpu server.
	- 		The version in this directory speaks the pre-9P2000 
	- 		protocols.  
	  
	- 		A new 9P2000 version is in progress but still crashes
	- 		with some regularity on Unix.  It can be found at
	- 		  http://cvs.pdos.csail.mit.edu/cvs/drawterm/
	- 		or use
	- 		  cvs -d :pserver:anoncvs@cvs.pdos.csail.mit.edu:/cvs co drawterm
	- 		For more information about CVS, see
	- 		  http://swtch.com/plan9port/man/man1/cvs.html
	+ 		See drawterm/README for details.
	  
	  	u9fs/
	  		U9fs is a simple 9P server that runs on Unix.
 [rsc] --rw-rw-r-- M 337084 rsc drawterm 426 Apr  4 07:41 sys/src/cmd/unix/drawterm/Make.osx
 [rsc] --rw-rw-r-- M 337084 rsc drawterm 7495 Apr  4 07:41 sys/src/cmd/unix/drawterm/include/lib.h
	/n/sourcesdump/2006/0404/plan9/sys/src/cmd/unix/drawterm/include/lib.h:230,235 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/cmd/unix/drawterm/include/lib.h:230,236
	  extern	char*	fmtstrflush(Fmt*);
	  extern	int	runefmtstrinit(Fmt*);
	  extern	Rune*	runefmtstrflush(Fmt*);
	+ extern	int	encodefmt(Fmt*);
	  extern	int	fmtstrcpy(Fmt*, char*);
	  extern	int	fmtprint(Fmt*, char*, ...);
	  extern	int	fmtvprint(Fmt*, char*, va_list);
 [rsc] --rw-rw-r-- M 337084 rsc drawterm 620 Apr  4 07:41 sys/src/cmd/unix/drawterm/kern/Makefile
	/n/sourcesdump/2006/0404/plan9/sys/src/cmd/unix/drawterm/kern/Makefile:21,26 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/cmd/unix/drawterm/kern/Makefile:21,27
	  	devpipe.$O\
	  	devroot.$O\
	  	devssl.$O\
	+ 	devtls.$O\
	  	devtab.$O\
	  	error.$O\
	  	parse.$O\
 [rsc] --rw-rw-r-- M 337084 rsc drawterm 628 Apr  4 07:41 sys/src/cmd/unix/drawterm/kern/devaudio-none.c
	/n/sourcesdump/2006/0404/plan9/sys/src/cmd/unix/drawterm/kern/devaudio-none.c:21,26 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/cmd/unix/drawterm/kern/devaudio-none.c:21,40
	  	error("no audio support");
	  }
	  
	+ int
	+ audiodevread(void *a, int n)
	+ {
	+ 	error("no audio support");
	+ 	return -1;
	+ }
	+ 
	+ int
	+ audiodevwrite(void *a, int n)
	+ {
	+ 	error("no audio support");
	+ 	return -1;
	+ }
	+ 
	  void
	  audiodevsetvol(int what, int left, int right)
	  {
 [rsc] --rw-rw-r-- M 337084 rsc drawterm 544 Apr  4 07:41 sys/src/cmd/unix/drawterm/kern/devtab.c
	/n/sourcesdump/2006/0404/plan9/sys/src/cmd/unix/drawterm/kern/devtab.c:8,13 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/cmd/unix/drawterm/kern/devtab.c:8,14
	  extern Dev rootdevtab;
	  extern Dev pipedevtab;
	  extern Dev ssldevtab;
	+ extern Dev tlsdevtab;
	  extern Dev mousedevtab;
	  extern Dev drawdevtab;
	  extern Dev ipdevtab;
	/n/sourcesdump/2006/0404/plan9/sys/src/cmd/unix/drawterm/kern/devtab.c:21,26 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/cmd/unix/drawterm/kern/devtab.c:22,28
	  	&consdevtab,
	  	&pipedevtab,
	  	&ssldevtab,
	+ 	&tlsdevtab,
	  	&mousedevtab,
	  	&drawdevtab,
	  	&ipdevtab,
 [rsc] --rw-rw-r-- M 337084 rsc drawterm 45295 Apr  4 07:41 sys/src/cmd/unix/drawterm/kern/devtls.c
 [rsc] --rw-rw-r-- M 337084 rsc drawterm 1141 Apr  4 07:41 sys/src/cmd/unix/drawterm/libc/Makefile
	/n/sourcesdump/2006/0404/plan9/sys/src/cmd/unix/drawterm/libc/Makefile:18,23 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/cmd/unix/drawterm/libc/Makefile:18,24
	  	dirwstat.$O\
	  	dofmt.$O\
	  	dorfmt.$O\
	+ 	encodefmt.$O\
	  	fcallfmt.$O\
	  	fltfmt.$O\
	  	fmt.$O\
	/n/sourcesdump/2006/0404/plan9/sys/src/cmd/unix/drawterm/libc/Makefile:39,44 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/cmd/unix/drawterm/libc/Makefile:40,46
	  	nsec.$O\
	  	pow10.$O\
	  	pushssl.$O\
	+ 	pushtls.$O\
	  	read9pmsg.$O\
	  	readn.$O\
	  	rune.$O\
 [rsc] --rw-rw-r-- M 337084 rsc drawterm 1100 Apr  4 07:41 sys/src/cmd/unix/drawterm/libc/encodefmt.c
 [rsc] --rw-rw-r-- M 337084 rsc drawterm 2023 Apr  4 07:41 sys/src/cmd/unix/drawterm/libc/pushtls.c

libmach: add mipsmachle
 [rsc] --rw-rw-r-- M 337084 glenda sys 482 Apr  4 07:43 sys/src/libmach/mkfile
	/n/sourcesdump/2006/0404/plan9/sys/src/libmach/mkfile:1,7 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libmach/mkfile:1,8
	  </$objtype/mkfile
	  
	  LIB=/$objtype/lib/libmach.a
	- FILES=executable\
	+ FILES=\
	+ 	executable\
	  	map\
	  	obj\
	  	swap\
 [rsc] --rw-rw-r-- M 337084 glenda sys 22870 Apr  4 07:43 sys/src/libmach/vdb.c
	/n/sourcesdump/2006/0404/plan9/sys/src/libmach/vdb.c:35,40 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libmach/vdb.c:35,60
	  	mipsinstlen,		/* instruction size */
	  };
	  
	+ Machdata mipsmachle =
	+ {
	+ 	{0, 0, 0, 0xD},		/* break point */
	+ 	4,			/* break point size */
	+ 
	+ 	leswab,			/* short to local byte order */
	+ 	leswal,			/* long to local byte order */
	+ 	leswav,			/* vlong to local byte order */
	+ 	risctrace,		/* C traceback */
	+ 	riscframe,		/* Frame finder */
	+ 	mipsexcep,		/* print exception */
	+ 	0,			/* breakpoint fixup */
	+ 	leieeesftos,		/* single precision float printer */
	+ 	leieeedftos,		/* double precisioin float printer */
	+ 	mipsfoll,		/* following addresses */
	+ 	mipsinst,		/* print instruction */
	+ 	mipsdas,		/* dissembler */
	+ 	mipsinstlen,		/* instruction size */
	+ };
	+ 
	  /*
	   *	mips r4k little-endian
	   */
	/n/sourcesdump/2006/0404/plan9/sys/src/libmach/vdb.c:147,153 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libmach/vdb.c:167,172
	  decode(uvlong pc, Instr *i)
	  {
	  	ulong w;
	- 	extern Mach mmips2le;
	  
	  	if (get4(mymap, pc, &w) < 0) {
	  		werrstr("can't read instruction: %r");

libmp: fix stack traces in mpvecdigmulsub.
 [rsc] --rw-rw-r-- M 337084 glenda sys 982 Apr  4 07:42 sys/src/libmp/386/mpvecdigmulsub.s

libndb: more memory accounting, fix leak tickled by dhcpd
 [rsc] --rw-rw-r-- M 337084 glenda sys 4412 Apr  4 14:14 sys/include/ndb.h
	/n/sourcesdump/2006/0404/plan9/sys/include/ndb.h:152,154 - 
	/n/sourcesdump/2006/0405/plan9/sys/include/ndb.h:152,155
	  void		ndbsetval(Ndbtuple*, char*, int);
	  Ndbtuple*	ndbsnext(Ndbs*, char*, char*);
	  Ndbtuple*	ndbsubstitute(Ndbtuple*, Ndbtuple*, Ndbtuple*);
	+ void		ndbsetmalloctag(Ndbtuple*, uintptr);
 [rsc] --rw-rw-r-- M 337084 glenda sys 1796 Apr  4 14:14 sys/src/libndb/csgetval.c
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/csgetval.c:103,107 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/csgetval.c:103,108
	  		}
	  		free(p);
	  	}
	+ 	ndbsetmalloctag(t, getcallerpc(&netroot));
	  	return t;
	  }
 [rsc] --rw-rw-r-- M 337084 glenda sys 1178 Apr  4 14:14 sys/src/libndb/csipinfo.c
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/csipinfo.c:63,68 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/csipinfo.c:63,68
	  	}
	  	close(fd);
	  
	- 	setmalloctag(first, getcallerpc(&netroot));
	+ 	ndbsetmalloctag(first, getcallerpc(&netroot));
	  	return first;
	  }
 [rsc] --rw-rw-r-- M 337084 glenda sys 2883 Apr  4 14:14 sys/src/libndb/dnsquery.c
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/dnsquery.c:63,68 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/dnsquery.c:63,69
	  		t = doquery(fd, val, type);
	  
	  	close(fd);
	+ 	ndbsetmalloctag(t, getcallerpc(&net));
	  	return t;
	  }
	  
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/dnsquery.c:151,156 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/dnsquery.c:152,157
	  		}
	  	}
	  
	- 	setmalloctag(first, getcallerpc(&fd));
	+ 	ndbsetmalloctag(first, getcallerpc(&fd));
	  	return first;
	  }
 [rsc] --rw-rw-r-- M 337084 glenda sys 1544 Apr  4 14:14 sys/src/libndb/ndbaux.c
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbaux.c:86,94 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbaux.c:86,95
	  		last = t;
	  		t->line = 0;
	  		t->entry = 0;
	+ 		setmalloctag(t, getcallerpc(&cp));
	  	}
	  	if(first)
	  		last->line = first;
	- 	setmalloctag(first, getcallerpc(&cp));
	+ 	ndbsetmalloctag(first, getcallerpc(&cp));
	  	return first;
	  }
 [rsc] --rw-rw-r-- M 337084 glenda sys 2246 Apr  4 14:14 sys/src/libndb/ndbcache.c
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbcache.c:64,69 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbcache.c:64,70
	  		last = to_t;
	  		newline = from_t->line != from_t->entry;
	  	}
	+ 	ndbsetmalloctag(first, getcallerpc(&db));
	  	return first;
	  }
	  
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbcache.c:127,132 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbcache.c:128,134
	  	*l = nil;
	  err:
	  	ndbcachefree(c);
	+ 	ndbsetmalloctag(t, getcallerpc(&db));
	  	return t;
	  }
	  
 [rsc] --rw-rw-r-- M 337084 presotto sys 297 Apr  4 14:14 sys/src/libndb/ndbconcatenate.c
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbconcatenate.c:14,18 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbconcatenate.c:14,19
	  	for(t = a; t->entry; t = t->entry)
	  		;
	  	t->entry = b;
	+ 	ndbsetmalloctag(a, getcallerpc(&a));
	  	return a;
	  }
 [rsc] --rw-rw-r-- M 337084 presotto sys 474 Apr  4 14:14 sys/src/libndb/ndbdiscard.c
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbdiscard.c:25,29 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbdiscard.c:25,30
	  	a->entry = nil;
	  	ndbfree(a);
	  
	+ 	ndbsetmalloctag(t, getcallerpc(&t));
	  	return t;
	  }
 [rsc] --rw-rw-r-- M 337084 glenda sys 1123 Apr  4 14:14 sys/src/libndb/ndbfree.c
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbfree.c:61,65 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbfree.c:61,76
	  	t->val = t->valbuf;
	  	if(val != nil)
	  		ndbsetval(t, val, strlen(val));
	+ 	ndbsetmalloctag(t, getcallerpc(&attr));
	  	return t;	
	+ }
	+ 
	+ /*
	+  *  set owner of a tuple
	+  */
	+ void
	+ ndbsetmalloctag(Ndbtuple *t, uintptr tag)
	+ {
	+ 	for(; t; t=t->entry)
	+ 		setmalloctag(t, tag);
	  }
 [rsc] --rw-rw-r-- M 337084 presotto sys 876 Apr  4 14:14 sys/src/libndb/ndbgetipaddr.c
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbgetipaddr.c:16,21 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbgetipaddr.c:16,22
	  	attr = ipattr(val);
	  	if(strcmp(attr, "ip") == 0){
	  		it = ndbnew("ip", val);
	+ 		ndbsetmalloctag(it, getcallerpc(&db));
	  		return it;
	  	}
	  
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbgetipaddr.c:43,47 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbgetipaddr.c:44,49
	  		}
	  	}
	  
	+ 	ndbsetmalloctag(first, getcallerpc(&db));
	  	return first;
	  }
 [rsc] --rw-rw-r-- M 337084 glenda sys 1348 Apr  4 14:14 sys/src/libndb/ndbgetval.c
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbgetval.c:71,75 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbgetval.c:71,76
	  		}
	  		free(p);
	  	}
	+ 	ndbsetmalloctag(t, getcallerpc(&db));
	  	return t;
	  }
 [rsc] --rw-rw-r-- M 337084 glenda sys 5276 Apr  4 14:14 sys/src/libndb/ndbhash.c
	[diffs elided - too long]
	[diff -c /n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbhash.c /n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbhash.c]
 [rsc] --rw-rw-r-- M 337084 glenda sys 5105 Apr  4 14:14 sys/src/libndb/ndbipinfo.c
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbipinfo.c:40,45 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbipinfo.c:40,46
	  		}
	  		strncpy(t->attr, p, sizeof(t->attr)-1);
	  	}
	+ 	ndbsetmalloctag(first, getcallerpc(&argc));
	  	return first;
	  }
	  
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbipinfo.c:97,102 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbipinfo.c:98,104
	  		if(nf->ptr & Ffound)
	  			nf->ptr = (nf->ptr & ~Ffound) | Fignore;
	  
	+ 	ndbsetmalloctag(t, getcallerpc(&db));
	  	return t;
	  }
	  
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbipinfo.c:136,147 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbipinfo.c:138,152
	  			else
	  				ipmove(mask, defmask(net));
	  			masklen = prefixlen(mask);
	- 			if(masklen <= prefix)
	+ 			if(masklen <= prefix){
	  				t = ndbconcatenate(t, filter(db, nt, f));
	- 		} else
	- 			ndbfree(nt);
	+ 				nt = nil;
	+ 			}
	+ 		}
	+ 		ndbfree(nt);
	  		nt = ndbsnext(&s, "ip", netstr);
	  	}
	+ 	ndbsetmalloctag(t, getcallerpc(&db));
	  	return t;
	  }
	  
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbipinfo.c:238,242 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbipinfo.c:243,248
	  	}
	  
	  	ndbfree(f);
	+ 	ndbsetmalloctag(t, getcallerpc(&db));
	  	return t;
	  }
 [rsc] --rw-rw-r-- M 337084 glenda sys 1207 Apr  4 14:14 sys/src/libndb/ndbparse.c
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbparse.c:44,49 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbparse.c:44,50
	  		t = _ndbparseline(line);
	  		if(t == 0)
	  			continue;
	+ 		setmalloctag(t, getcallerpc(&db));
	  		if(first)
	  			last->entry = t;
	  		else
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbparse.c:52,57 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbparse.c:53,58
	  		while(last->entry)
	  			last = last->entry;
	  	}
	- 	setmalloctag(first, getcallerpc(&db));
	+ 	ndbsetmalloctag(first, getcallerpc(&db));
	  	return first;
	  }
 [rsc] --rw-rw-r-- M 337084 presotto sys 867 Apr  4 14:14 sys/src/libndb/ndbsubstitute.c
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbsubstitute.c:9,18 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbsubstitute.c:9,23
	  {
	  	Ndbtuple *nt;
	  
	- 	if(a == b)
	+ 	if(a == b){
	+ 		ndbsetmalloctag(t, getcallerpc(&t));
	  		return t;
	- 	if(b == nil)
	- 		return ndbdiscard(t, a);
	+ 	}
	+ 	if(b == nil){
	+ 		t = ndbdiscard(t, a);
	+ 		ndbsetmalloctag(t, getcallerpc(&t));
	+ 		return t;
	+ 	}
	  
	  	/* all pointers to a become pointers to b */
	  	for(nt = t; nt != nil; nt = nt->entry){
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbsubstitute.c:23,31 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbsubstitute.c:28,35
	  	}
	  
	  	/* end of b chain points to a's successors */
	- 	for(nt = b; nt->entry; nt = nt->entry){
	+ 	for(nt = b; nt->entry; nt = nt->entry)
	  		nt->line = nt->entry;
	- 	}
	  	nt->line = a->line;
	  	nt->entry = a->entry;
	  
	/n/sourcesdump/2006/0404/plan9/sys/src/libndb/ndbsubstitute.c:32,39 - 
	/n/sourcesdump/2006/0405/plan9/sys/src/libndb/ndbsubstitute.c:36,46
	  	a->entry = nil;
	  	ndbfree(a);
	  
	- 	if(a == t)
	+ 	if(a == t){
	+ 		ndbsetmalloctag(b, getcallerpc(&t));
	  		return b;
	- 	else
	+ 	}else{
	+ 		ndbsetmalloctag(t, getcallerpc(&t));
	  		return t;
	+ 	}
	  }


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.