| plan 9 kernel history: overview | file list | diff list |
2001/0527/port/devroot.c (diff list | history)
| 2001/0503/sys/src/9/port/devroot.c:14,40 – 2001/0527/sys/src/9/port/devroot.c:14,26 (short | long | prev | next) | ||
| 1991/1206 | extern ulong bootlen; | |
| 1992/0902 | extern uchar bootcode[]; | |
| 1991/0214 | ||
| 1999/1105 |
| |
| 2001/0527 | Dirtab rootdir[Nfiles] = { ".", {Qdir, 0, QTDIR}, 0, DMDIR|0555, }; | |
| 1990/0227 | ||
| 1993/0724 | static uchar *rootdata[Nfiles]; | |
| 1999/1105 |
| |
| 2001/0527 | static int nroot = 1; | |
| 1993/0724 | ||
| 1993/0501 |
| |
| 1998/0512 |
| |
| 1993/0501 |
| |
| 1993/0724 | /* * add a root file */ | |
| 2001/0503/sys/src/9/port/devroot.c:50,58 – 2001/0527/sys/src/9/port/devroot.c:36,46 | ||
| 1993/0724 | strcpy(d->name, name); d->length = len; | |
| 1999/0731 | d->perm = perm; | |
| 2001/0527 | d->qid.type = 0; d->qid.vers = 0; | |
| 1993/0724 | d->qid.path = nroot+1; | |
| 1999/0731 |
| |
| 2001/0527 | if(perm & DMDIR) d->qid.type |= QTDIR; | |
| 1993/0724 | nroot++; | |
| 1991/0615 | } | |
| 2001/0503/sys/src/9/port/devroot.c:71,77 – 2001/0527/sys/src/9/port/devroot.c:59,65 | ||
| 1997/0327 | static void | |
| 1999/0729 | addrootdir(char *name) { | |
| 1999/0803 |
| |
| 2001/0527 | addroot(name, nil, 0, DMDIR|0555); | |
| 1999/0729 | } static void | |
| 2001/0503/sys/src/9/port/devroot.c:80,85 – 2001/0527/sys/src/9/port/devroot.c:68,74 | ||
| 1999/0731 | addrootdir("bin"); addrootdir("dev"); addrootdir("env"); | |
| 2001/0527 | addrootdir("fd"); | |
| 1999/0731 | addrootdir("net"); addrootdir("net.alt"); | |
| 2000/0223 | addrootdir("proc"); | |
| 2001/0503/sys/src/9/port/devroot.c:95,122 – 2001/0527/sys/src/9/port/devroot.c:84,105 | ||
| 1990/0227 | return devattach('/', spec); } | |
| 1998/0512 |
| |
| 1990/0227 |
| |
| 2001/0527 | static Walkqid* rootwalk(Chan *c, Chan *nc, char **name, int nname) | |
| 1990/0227 | { | |
| 1991/1206 |
| |
| 1992/0225 |
| |
| 1992/0226 |
| |
| 1993/0724 |
| |
| 2001/0527 | return devwalk(c, nc, name, nname, rootdir, nroot, devgen); | |
| 1990/0227 | } | |
| 1998/0512 |
| |
| 1990/0227 |
| |
| 2001/0527 | static int rootstat(Chan *c, uchar *dp, int n) | |
| 1990/0227 | { | |
| 1993/0724 |
| |
| 2001/0527 | return devstat(c, dp, n, rootdir, nroot, devgen); | |
| 1990/0227 | } | |
| 1997/0327 | static Chan* | |
| 1990/0227 | rootopen(Chan *c, int omode) { | |
| 1993/0501 |
| |
| 2001/0527 | switch((ulong)c->qid.path) { | |
| 1993/0501 | default: break; } | |
| 2001/0503/sys/src/9/port/devroot.c:132,143 – 2001/0527/sys/src/9/port/devroot.c:115,120 | ||
| 1990/0227 | { } | |
| 1997/0327 |
| |
| 1995/0804 |
| |
| 1993/0501 |
| |
| 1998/0512 | static long | |
| 1998/0319 | rootread(Chan *c, void *buf, long n, vlong off) | |
| 1990/0227 | { | |
| 2001/0503/sys/src/9/port/devroot.c:146,152 – 2001/0527/sys/src/9/port/devroot.c:123,129 | ||
| 1993/0724 | uchar *data; | |
| 1998/0319 | ulong offset = off; | |
| 1990/0227 | ||
| 1993/0724 |
| |
| 2001/0527 | t = c->qid.path; | |
| 1993/0724 | switch(t){ | |
| 1990/0227 | case Qdir: | |
| 1993/0724 | return devdirread(c, buf, n, rootdir, nroot, devgen); | |
| 2001/0503/sys/src/9/port/devroot.c:165,171 – 2001/0527/sys/src/9/port/devroot.c:142,148 | ||
| 1998/0512 | static long | |
| 1999/1230 | rootwrite(Chan *c, void*, long, vlong) | |
| 1990/0227 | { | |
| 1993/0501 |
| |
| 2001/0527 | switch((ulong)c->qid.path){ | |
| 1993/0501 | default: error(Egreg); } | |
| 2001/0503/sys/src/9/port/devroot.c:179,185 – 2001/0527/sys/src/9/port/devroot.c:156,161 | ||
| 1997/0327 | rootreset, devinit, rootattach, | |