plan 9 kernel history: overview | file list | diff list

2001/0527/boot/local.c (diff list | history)

2001/0119/sys/src/9/boot/local.c:2,82001/0527/sys/src/9/boot/local.c:2,8 (short | long | prev | next)
1992/0317    
#include <libc.h> 
#include <../boot/boot.h> 
 
1994/0312    
static char diskname[2*NAMELEN]; 
2001/0527    
static char diskname[64]; 
1992/0317    
static char *disk; 
2000/1018    
static char **args; 
1992/0317    
 
2001/0119/sys/src/9/boot/local.c:58,852001/0527/sys/src/9/boot/local.c:58,84
1992/0317    
connectlocal(void) 
{ 
2000/1018    
	int i, p[2]; 
2000/0506    
	Dir dir; 
1992/0317    
	char d[DIRLEN]; 
	char partition[2*NAMELEN]; 
2001/0527    
	Dir *dir; 
	char partition[64]; 
1992/0902    
	char *dev; 
2000/1018    
	char **arg, **argp; 
2001/0527    
	ulong mode; 
1992/0317    
 
2001/0119    
	if(stat("/kfs", d) < 0){ 
		print("stat /kfs fails: %r\n"); 
2001/0527    
	if(stat("/kfs", statbuf, sizeof statbuf) < 0) 
1992/0317    
		return -1; 
2001/0119    
	} 
1992/0902    
 
	dev = disk ? disk : bootdisk; 
	sprint(partition, "%sfs", dev); 
2000/0506    
	if(dirstat(partition, &dir) < 0){ 
2001/0527    
	snprint(partition, sizeof partition, "%sfs", dev); 
	dir = dirstat(partition); 
	if(dir == nil){ 
1992/0902    
		strcpy(partition, dev); 
2001/0119    
		if(dirstat(partition, &dir) < 0){ 
			print("stat %s fails: %r\n", partition); 
			print("(stat %sfs also failed)\n", dev); 
2001/0527    
		dir = dirstat(partition); 
		if(dir == nil) 
1992/0902    
			return -1; 
2001/0119    
		} 
1992/0902    
	} 
2000/0506    
	if(dir.mode & CHDIR) 
2001/0527    
	mode = dir->mode; 
	free(dir); 
	if(mode & DMDIR) 
2000/0506    
		return -1; 
1992/0902    
 
1999/0501    
	print("kfs..."); 
2001/0119/sys/src/9/boot/local.c:102,1072001/0527/sys/src/9/boot/local.c:101,111
2000/1018    
		for(i=1; i<bargc; i++) 
			*argp++ = bargv[i]; 
1993/0403    
		*argp = 0; 
2001/0527    
 
		print("kfs"); 
		for(argp=arg; *argp; argp++) 
			print(" %s", *argp); 
		print("\n"); 
2000/1018    
 
		dup(p[0], 0); 
		dup(p[1], 1); 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)