⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sac.c

📁 著名操作系统Plan 9的第三版的部分核心源代码。现在很难找到了。Plan 9是bell实验室开发的Unix后继者。
💻 C
字号:
#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 pipevoidconfigsac(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);	execl(cmd, "init", "-c", 0);	fatal(cmd);}intauthsac(void){	// does not get here	return -1;}intconnectsac(void){	// does not get here	return -1;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -