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

1990/0504/power/boot.c (diff list | history)

1990/0430/sys/src/9/power/boot.c:18,241990/0504/sys/src/9/power/boot.c:18,23 (short | long | prev | next)
1990/0427    
int cfd; 
int efd; 
 
                 
1990/0227    
typedef 
struct address { 
	char *name; 
1990/0430/sys/src/9/power/boot.c:47,531990/0504/sys/src/9/power/boot.c:46,52
1990/0427    
/* 
 *  usage: 9b [-a] [server] [file] 
 * 
 *  default server is `bitbootes', default file is `/sys/src/9/mips/9' 
1990/0504    
 *  default server is `bitbootes', default file is `/mips/9' 
1990/0427    
 */ 
main(int argc, char *argv[]) 
1990/0227    
{ 
1990/0430/sys/src/9/power/boot.c:58,631990/0504/sys/src/9/power/boot.c:57,68
1990/0427    
	open("#c/cons", 1); 
	open("#c/cons", 1); 
 
1990/0504    
	i = create("#e/sysname", 1, 0666); 
	if(i < 0) 
		error("sysname"); 
	if(write(i, argv[0], strlen(argv[0])) <= 0) 
		error("sysname"); 
	close(i); 
1990/0427    
 
	argv++; 
	argc--;	 
1990/0430/sys/src/9/power/boot.c:114,1211990/0504/sys/src/9/power/boot.c:119,124
1990/0427    
		return; 
	} 
1990/0227    
 
1990/0427    
	print("Connecting to server %s\n", sys); 
1990/0227    
                 
	/* 
1990/0427    
	 *  for the bit, we skip all the ether goo 
1990/0227    
	 */ 
1990/0430/sys/src/9/power/boot.c:239,2451990/0504/sys/src/9/power/boot.c:242,253
1990/0227    
	if(mount(fd, "/", MAFTER|MCREATE, "") < 0) 
		error("mount"); 
	print("success\n"); 
	execl("/mips/init", "init", 0); 
1990/0504    
	close(fd); 
 
	if(ask) 
		execl("/mips/init", "init", 0); 
	else 
		execl("/mips/init", "init", "-m", 0); 
1990/0227    
	error("/mips/init"); 
} 
 


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