rminnichinitial1fcdf7916 years agoHistory
50 lines · 815 B · C
RawDownload
#include <u.h>#include <libc.h>#include <../boot/boot.h> /* * HACK - take over from boot since file system is not * available on a pipe */ voidconfigsac(Method *mp){	int fd;	char cmd[64]; 	USED(mp); 	/*	 *  create the name space, mount the root fs	 */	if(bind("/", "/", MREPL) < 0)		fatal("bind /");	if(bind("#C", "/", MAFTER) < 0)		fatal("bind /"); 	/* fixed sysname - enables correct namespace file */	fd = open("#c/sysname", OWRITE);	if(fd < 0)		fatal("open sysname");	write(fd, "brick", 5);	close(fd); 	fd = open("#c/hostowner", OWRITE);	if(fd < 0)		fatal("open sysname");	write(fd, "brick", 5);	close(fd); 	sprint(cmd, "/%s/init", cputype);	print("starting %s\n", cmd);	execl(cmd, "init", "-c", 0);	fatal(cmd);} intconnectsac(void){	/* does not get here */	return -1;}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t