Warning: Attempt to read property "date" on null in /usr/local/www/websvn.planix.org/blame.php on line 247

Warning: Attempt to read property "msg" on null in /usr/local/www/websvn.planix.org/blame.php on line 247
WebSVN – planix.SVN – Blame – /os/branches/feature_tlsv12/sys/src/9/boot/sac.c – Rev 2

Subversion Repositories planix.SVN

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 - 1
#include <u.h>
2
#include <libc.h>
3
#include <../boot/boot.h>
4
 
5
/*
6
 * HACK - take over from boot since file system is not
7
 * available on a pipe
8
 */
9
 
10
void
11
configsac(Method *mp)
12
{
13
	int fd;
14
	char cmd[64];
15
 
16
	USED(mp);
17
 
18
	/*
19
	 *  create the name space, mount the root fs
20
	 */
21
	if(bind("/", "/", MREPL) < 0)
22
		fatal("bind /");
23
	if(bind("#C", "/", MAFTER) < 0)
24
		fatal("bind /");
25
 
26
	/* fixed sysname - enables correct namespace file */
27
	fd = open("#c/sysname", OWRITE);
28
	if(fd < 0)
29
		fatal("open sysname");
30
	write(fd, "brick", 5);
31
	close(fd);
32
 
33
	fd = open("#c/hostowner", OWRITE);
34
	if(fd < 0)
35
		fatal("open sysname");
36
	write(fd, "brick", 5);
37
	close(fd);
38
 
39
	sprint(cmd, "/%s/init", cputype);
40
	print("starting %s\n", cmd);
41
	execl(cmd, "init", "-c", 0);
42
	fatal(cmd);
43
}
44
 
45
int
46
connectsac(void)
47
{
48
	/* does not get here */
49
	return -1;
50
}