Plan 9 from Bell Labs’s /usr/web/sources/contrib/uriel/changes/2005/0909/1

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


Remove unused function memsize.
 [rsc] --rw-rw-r-- M 383570 glenda sys 10098 Sep  9 11:03 sys/src/cmd/disk/prep/prep.c
	/n/sourcesdump/2005/0909/plan9/sys/src/cmd/disk/prep/prep.c:25,31 - 
	/n/sourcesdump/2005/0910/plan9/sys/src/cmd/disk/prep/prep.c:25,30
	  static int	donvram;
	  
	  static void	autoxpart(Edit*);
	- static vlong	memsize(void);
	  static Part	*mkpart(char*, vlong, vlong, int);
	  static void	rdpart(Edit*);
	  static void	wrpart(Edit*);
	/n/sourcesdump/2005/0909/plan9/sys/src/cmd/disk/prep/prep.c:268,305 - 
	/n/sourcesdump/2005/0910/plan9/sys/src/cmd/disk/prep/prep.c:267,272
	  		if(isfrog[*(uchar*)elem])
	  			return "bad character in name";
	  	return nil;
	- }
	- 
	- /*
	-  *  return memory size in bytes
	-  */
	- static vlong
	- memsize(void)
	- {
	- 	int fd, n, by2pg;
	- 	char *p;
	- 	char buf[128];
	- 	vlong mem;
	- 
	- 	p = getenv("cputype");
	- 	if(p && (strcmp(p, "68020") == 0 || strcmp(p, "alpha") == 0))
	- 		by2pg = 8*1024;
	- 	else
	- 		by2pg = 4*1024;
	- 
	- 	mem = 64*1024*1024;
	- 	fd = open("/dev/swap", OREAD);
	- 	if(fd < 0)
	- 		return mem;
	- 	n = read(fd, buf, sizeof(buf)-1);
	- 	close(fd);
	- 	if(n <= 0)
	- 		return mem;
	- 	buf[n] = 0;
	- 	p = strchr(buf, '/');
	- 	if(p)
	- 		mem = strtoul(p+1, 0, 0) * (vlong)by2pg;
	- 	return mem;
	  }
	  
	  static Part*
 [sys] --rwxrwxr-x M 383570 glenda sys 95831 Sep  9 23:08 386/bin/disk/prep
	/sys/src/cmd/disk/prep/calc.y:yylex1
	/sys/src/cmd/disk/prep/prep.c:autoxpart
	/sys/src/cmd/disk/prep/prep.c:checkfat
	/sys/src/cmd/disk/prep/prep.c:memsize
	/sys/src/cmd/disk/prep/prep.c:rdpart
	/sys/src/cmd/disk/prep/prep.c:restore
	/sys/src/cmd/disk/prep/prep.c:wrpart
	/sys/src/libc/9sys/getenv.c:getenv
	/sys/src/libc/fmt/fmt.c:_fmtinstall
	/sys/src/libc/fmt/sprint.c:sprint
	/sys/src/libc/port/pool.c:blocksetdsize
	/sys/src/libc/port/pool.c:trim
	/sys/src/libc/port/rune.c:chartorune
	/sys/src/libc/port/strtoul.c:strtoul
	/sys/src/libdisk/disk.c:opendisk


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.