Plan 9 from Bell Labs’s /usr/web/sources/extra/9hist/boot/sac.c

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


## diffname boot/sac.c 1999/0610
## diff -e /dev/null /n/emeliedump/1999/0610/sys/src/brazil/boot/sac.c
0a
#include <u.h>
#include <libc.h>
#include <../boot/boot.h>

void configip(char* dev);

// HACK - take over from boot since files system is not
// available on a pipe

void
configsac(Method *mp)
{
	int fd;
	char cmd[64];

	USED(mp);

print("configsac\n");
	/*
	 *  create the name space, mount the root fs
	 */
	if(bind("/", "/", MREPL) < 0)
		fatal("bind /");
	if(bind("#C", "/", MAFTER) < 0)
		fatal("bind /");

	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);

	bargc = parsefields("-n 135.104.9.69 255.255.255.0 135.104.9.1 "
						"135.104.9.69 135.104.9.69", bargv, Nbarg-1, " ");
	configip("ether0");

	// fixed sysname - enables correct cpurc and namespace files
	// to be used

	sprint(cmd, "/%s/init", cputype);
	execl(cmd, "init", "-c", 0);
	fatal(cmd);
}

int
authsac(void)
{
	// does not get here
	return -1;
}

int
connectsac(void)
{
	// does not get here
	return -1;
}
.
## diffname boot/sac.c 1999/0618
## diff -e /n/emeliedump/1999/0610/sys/src/brazil/boot/sac.c /n/emeliedump/1999/0618/sys/src/brazil/boot/sac.c
39,44d
26a
	// fixed sysname - enables correct namespace file
.
18d
## diffname boot/sac.c 2000/1016
## diff -e /n/emeliedump/1999/0618/sys/src/brazil/boot/sac.c /n/emeliedump/2000/1016/sys/src/9/boot/sac.c
40a
	print("starting %s\n", cmd);
.
39d
## diffname boot/sac.c 2000/1102
## diff -e /n/emeliedump/2000/1016/sys/src/9/boot/sac.c /n/emeliedump/2000/1102/sys/src/9/boot/sac.c
36c
	write(fd, t, strlen(t));
.
30c
	write(fd, t, strlen(t));
.
25a
	// yet another hack - figure out what to call ourselves
	t = getenv("terminal");
	if(t == nil)
		t = "brick";

.
18,20c
	//  create the name space, mount the root fs
.
14a
	char *t;
.
## diffname boot/sac.c 2001/0527
## diff -e /n/emeliedump/2000/1102/sys/src/9/boot/sac.c /n/emeliedump/2001/0527/sys/src/9/boot/sac.c
40c
	write(fd, "brick", 5);
.
34c
	write(fd, "brick", 5);
.
25,29d
19c
	/*
	 *  create the name space, mount the root fs
	 */
.
15d
7c
// HACK - take over from boot since file system is not
.
## diffname boot/sac.c 2002/0109
## diff -e /n/emeliedump/2001/0527/sys/src/9/boot/sac.c /n/emeliedump/2002/0109/sys/src/9/boot/sac.c
43,49d
5,6d

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].