| plan 9 kernel history: overview | file list | diff list |
1992/0317/boot/local.c (diff list | history)
| 1992/0317/sys/src/9/boot/local.c:1,57 – 1992/0318/sys/src/9/boot/local.c:1,57 (short | long | prev | next) | ||
| 1992/0317 | #include <u.h> #include <libc.h> #include <../boot/boot.h> static char *disk; void configlocal(Method *mp) { disk = mp->arg; USED(mp); } int authlocal(void) { return -1; } int connectlocal(void) { ulong i; int p[2]; char d[DIRLEN]; char sbuf[32]; char rbuf[32]; char *mtpt; char partition[2*NAMELEN]; if(stat("/kfs", d) < 0) return -1; | |
| 1992/0318 | sprint(partition, "%sfs", disk ? disk : bootdisk); | |
| 1992/0317 | if(stat(partition, d) < 0) return -1; if(bind("#c", "/dev", MREPL) < 0) fatal("bind #c"); if(bind("#p", "/proc", MREPL) < 0) fatal("bind #p"); if(pipe(p)<0) fatal("pipe"); switch(fork()){ case -1: fatal("fork"); case 0: sprint(sbuf, "%d", p[0]); sprint(rbuf, "%d", p[1]); execl("/kfs", "kfs", "-f", partition, "-s", sbuf, rbuf, 0); fatal("can't exec kfs"); default: break; } close(p[1]); return p[0]; } | |