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

1991/0314/gnot/boot.c (diff list | history)

1991/0214/sys/src/9/gnot/boot.c:7,121991/0314/sys/src/9/gnot/boot.c:7,14 (short | long | prev | next)
1990/0613    
char	bootline[64]; 
1990/0917    
char	bootdevice; 
1990/0918    
char	bootserver[64]; 
1991/0314    
int	format; 
int	manual; 
1990/03091    
 
1990/0312    
void	error(char*); 
void	sendmsg(int, char*); 
1991/0214/sys/src/9/gnot/boot.c:82,881991/0314/sys/src/9/gnot/boot.c:84,90
1991/0214    
	bind("#k", "/net/net", MREPL); 
	bind("#k", "/net/dk", MREPL); 
 
	if(strchr(bootline, ' ')) 
1991/0314    
	if(manual) 
1991/0214    
		execl("/68020/init", "init", "-m", 0); 
	else 
		execl("/68020/init", "init", 0); 
1991/0214/sys/src/9/gnot/boot.c:198,2081991/0314/sys/src/9/gnot/boot.c:200,227
1991/0214    
bootparams(void) 
{ 
	int f; 
1991/0314    
	char *cp; 
1991/0214    
 
1991/0314    
	format = 0; 
	manual = 0; 
1991/0214    
	f = open("#e/bootline", OREAD); 
	if(f >= 0){ 
		read(f, bootline, sizeof bootline); 
1991/0314    
		read(f, bootline, sizeof(bootline)-1); 
1991/0214    
		close(f); 
1991/0314    
		cp = bootline; 
		while(cp = strchr(cp, ' ')){ 
			if(*++cp != '-') 
				continue; 
			while(*cp && *cp!=' ') 
				switch(*cp++){ 
				case 'f': 
					format = 1; 
					break; 
				case 'm': 
					manual = 1; 
					break; 
				} 
		} 
1991/0214    
	} 
	f = open("#e/bootdevice", OREAD); 
	if(f >= 0){ 
1991/0214/sys/src/9/gnot/boot.c:307,3131991/0314/sys/src/9/gnot/boot.c:326,335
1991/0214    
		close(fd); 
		dup(p[0], 1); 
		close(p[0]); 
		execl("/cfs", "bootcfs", "-s", 0); 
1991/0314    
		if(format) 
			execl("/cfs", "bootcfs", "-fs", 0); 
		else 
			execl("/cfs", "bootcfs", "-s", 0); 
1991/0214    
		break; 
	default: 
		close(p[0]); 


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