| plan 9 kernel history: overview | file list | diff list |
1992/0226/port/devroot.c (diff list | history)
| 1990/0227/sys/src/9/port/devroot.c:16,26 – 1990/11211/sys/src/9/port/devroot.c:16,26 (short | long) | ||
| 1990/0227 | }; Dirtab rootdir[]={ | |
| 1990/11211 | "bin", {Qbin|CHDIR}, 0, 0700, "boot", {Qboot}, 0, 0700, "dev", {Qdev|CHDIR}, 0, 0700, "env", {Qenv|CHDIR}, 0, 0700, "proc", {Qproc|CHDIR}, 0, 0700, | |
| 1990/0227 | }; #define NROOT (sizeof rootdir/sizeof(Dirtab)) | |
| 1990/0227/sys/src/9/port/devroot.c:68,74 – 1990/11211/sys/src/9/port/devroot.c:68,74 | ||
| 1990/0227 | void rootcreate(Chan *c, char *name, int omode, ulong perm) { | |
| 1990/11211 | error(Eperm); | |
| 1990/0227 | } /* | |
| 1990/0227/sys/src/9/port/devroot.c:85,91 – 1990/11211/sys/src/9/port/devroot.c:85,91 | ||
| 1990/0227 | rootread(Chan *c, void *buf, long n) { | |
| 1990/11211 | switch(c->qid.path & ~CHDIR){ | |
| 1990/0227 | case Qdir: return devdirread(c, buf, n, rootdir, NROOT, devgen); | |
| 1990/0227/sys/src/9/port/devroot.c:100,106 – 1990/11211/sys/src/9/port/devroot.c:100,106 | ||
| 1990/0227 | case Qdev: return 0; } | |
| 1990/11211 | error(Egreg); | |
| 1990/0227 | return 0; } | |
| 1990/0227/sys/src/9/port/devroot.c:107,140 – 1990/11211/sys/src/9/port/devroot.c:107,123 | ||
| 1990/0227 | long rootwrite(Chan *c, void *buf, long n) { | |
| 1990/11211 | error(Egreg); | |
| 1990/0227 | } void rootremove(Chan *c) { | |
| 1990/11211 | error(Eperm); | |
| 1990/0227 | } void rootwstat(Chan *c, char *dp) { | |
| 1990/11211 | error(Eperm); | |
| 1990/0227 | } | |
| 1990/11211/sys/src/9/port/devroot.c:94,100 – 1991/0110/sys/src/9/port/devroot.c:94,102 (short | long) | ||
| 1990/0227 | return 0; if(c->offset+n > sizeof bootcode) n = sizeof bootcode - c->offset; | |
| 1991/0110 | ck("1"); | |
| 1990/0227 | memcpy(buf, ((char*)bootcode)+c->offset, n); | |
| 1991/0110 | ck("2"); | |
| 1990/0227 | return n; case Qdev: | |
| 1991/0110/sys/src/9/port/devroot.c:94,102 – 1991/0111/sys/src/9/port/devroot.c:94,100 (short | long) | ||
| 1990/0227 | return 0; if(c->offset+n > sizeof bootcode) n = sizeof bootcode - c->offset; | |
| 1991/0110 |
| |
| 1990/0227 | memcpy(buf, ((char*)bootcode)+c->offset, n); | |
| 1991/0110 |
| |
| 1990/0227 | return n; case Qdev: | |
| 1991/0111/sys/src/9/port/devroot.c:10,20 – 1991/0214/sys/src/9/port/devroot.c:10,25 (short | long) | ||
| 1990/0227 | Qdir, Qbin, Qboot, | |
| 1991/0214 | Qcfs, | |
| 1990/0227 | Qdev, Qenv, Qproc, }; | |
| 1991/0214 | extern long cfslen; extern ulong *cfscode; | |
| 1990/0227 | Dirtab rootdir[]={ | |
| 1990/11211 | "bin", {Qbin|CHDIR}, 0, 0700, "boot", {Qboot}, 0, 0700, | |
| 1991/0111/sys/src/9/port/devroot.c:21,33 – 1991/0214/sys/src/9/port/devroot.c:26,41 | ||
| 1990/11211 | "dev", {Qdev|CHDIR}, 0, 0700, "env", {Qenv|CHDIR}, 0, 0700, "proc", {Qproc|CHDIR}, 0, 0700, | |
| 1991/0214 | "cfs", {Qcfs}, 0, 0700, | |
| 1990/0227 | }; #define NROOT (sizeof rootdir/sizeof(Dirtab)) | |
| 1991/0214 | int nroot; | |
| 1990/0227 | void rootreset(void) { | |
| 1991/0214 | nroot = (cfslen > 0) ? NROOT : NROOT-1; | |
| 1990/0227 | } void | |
| 1991/0111/sys/src/9/port/devroot.c:50,68 – 1991/0214/sys/src/9/port/devroot.c:58,76 | ||
| 1990/0227 | int rootwalk(Chan *c, char *name) { | |
| 1991/0214 | return devwalk(c, name, rootdir, nroot, devgen); | |
| 1990/0227 | } void rootstat(Chan *c, char *dp) { | |
| 1991/0214 | devstat(c, dp, rootdir, nroot, devgen); | |
| 1990/0227 | } Chan* rootopen(Chan *c, int omode) { | |
| 1991/0214 | return devopen(c, omode, rootdir, nroot, devgen); | |
| 1990/0227 | } void | |
| 1991/0111/sys/src/9/port/devroot.c:87,93 – 1991/0214/sys/src/9/port/devroot.c:95,101 | ||
| 1990/0227 | ||
| 1990/11211 | switch(c->qid.path & ~CHDIR){ | |
| 1990/0227 | case Qdir: | |
| 1991/0214 | return devdirread(c, buf, n, rootdir, nroot, devgen); | |
| 1990/0227 | case Qboot: /* boot */ if(c->offset >= sizeof bootcode) | |
| 1991/0111/sys/src/9/port/devroot.c:95,100 – 1991/0214/sys/src/9/port/devroot.c:103,116 | ||
| 1990/0227 | if(c->offset+n > sizeof bootcode) n = sizeof bootcode - c->offset; memcpy(buf, ((char*)bootcode)+c->offset, n); | |
| 1991/0214 | return n; case Qcfs: /* boot */ if(c->offset >= cfslen) return 0; if(c->offset+n > cfslen) n = cfslen - c->offset; memcpy(buf, ((char*)cfscode)+c->offset, n); | |
| 1990/0227 | return n; case Qdev: | |
| 1991/0214/sys/src/9/port/devroot.c:17,23 – 1991/0216/sys/src/9/port/devroot.c:17,23 (short | long) | ||
| 1990/0227 | }; | |
| 1991/0214 | extern long cfslen; | |
| 1991/0216 | extern ulong cfscode[]; | |
| 1991/0214 | ||
| 1990/0227 | Dirtab rootdir[]={ | |
| 1991/0216/sys/src/9/port/devroot.c:105,111 – 1991/0312/sys/src/9/port/devroot.c:105,111 (short | long) | ||
| 1990/0227 | memcpy(buf, ((char*)bootcode)+c->offset, n); | |
| 1991/0214 | return n; | |
| 1991/0312 | case Qcfs: /* cfs */ | |
| 1991/0214 | if(c->offset >= cfslen) return 0; if(c->offset+n > cfslen) | |
| 1991/0312/sys/src/9/port/devroot.c:102,108 – 1991/0318/sys/src/9/port/devroot.c:102,108 (short | long) | ||
| 1990/0227 | return 0; if(c->offset+n > sizeof bootcode) n = sizeof bootcode - c->offset; | |
| 1991/0318 | memmove(buf, ((char*)bootcode)+c->offset, n); | |
| 1991/0214 | return n; | |
| 1991/0312 | case Qcfs: /* cfs */ | |
| 1991/0312/sys/src/9/port/devroot.c:110,116 – 1991/0318/sys/src/9/port/devroot.c:110,116 | ||
| 1991/0214 | return 0; if(c->offset+n > cfslen) n = cfslen - c->offset; | |
| 1991/0318 | memmove(buf, ((char*)cfscode)+c->offset, n); | |
| 1990/0227 | return n; case Qdev: | |
| 1991/0318/sys/src/9/port/devroot.c:90,96 – 1991/0411/sys/src/9/port/devroot.c:90,96 (short | long) | ||
| 1990/0227 | #include "boot.h" long | |
| 1991/0411 | rootread(Chan *c, void *buf, long n, ulong offset) | |
| 1990/0227 | { | |
| 1990/11211 | switch(c->qid.path & ~CHDIR){ | |
| 1991/0318/sys/src/9/port/devroot.c:98,116 – 1991/0411/sys/src/9/port/devroot.c:98,116 | ||
| 1991/0214 | return devdirread(c, buf, n, rootdir, nroot, devgen); | |
| 1990/0227 | case Qboot: /* boot */ | |
| 1991/0411 | if(offset >= sizeof bootcode) | |
| 1990/0227 | return 0; | |
| 1991/0318 |
| |
| 1991/0411 | if(offset+n > sizeof bootcode) n = sizeof bootcode - offset; memmove(buf, ((char*)bootcode)+offset, n); | |
| 1991/0214 | return n; | |
| 1991/0312 | case Qcfs: /* cfs */ | |
| 1991/0214 |
| |
| 1991/0411 | if(offset >= cfslen) | |
| 1991/0214 | return 0; | |
| 1991/0318 |
| |
| 1991/0411 | if(offset+n > cfslen) n = cfslen - offset; memmove(buf, ((char*)cfscode)+offset, n); | |
| 1990/0227 | return n; case Qdev: | |
| 1991/0318/sys/src/9/port/devroot.c:121,127 – 1991/0411/sys/src/9/port/devroot.c:121,127 | ||
| 1990/0227 | } long | |
| 1991/0411 | rootwrite(Chan *c, void *buf, long n, ulong offset) | |
| 1990/0227 | { | |
| 1990/11211 | error(Egreg); | |
| 1990/0227 | } | |
| 1991/0411/sys/src/9/port/devroot.c:61,66 – 1991/0419/sys/src/9/port/devroot.c:61,72 (short | long) | ||
| 1991/0214 | return devwalk(c, name, rootdir, nroot, devgen); | |
| 1990/0227 | } | |
| 1991/0419 | Chan* rootclwalk(Chan *c, char *name) { return devclwalk(c, name); } | |
| 1990/0227 | void rootstat(Chan *c, char *dp) { | |
| 1991/0419/sys/src/9/port/devroot.c:61,72 – 1991/0427/sys/src/9/port/devroot.c:61,66 (short | long) | ||
| 1991/0214 | return devwalk(c, name, rootdir, nroot, devgen); | |
| 1990/0227 | } | |
| 1991/0419 |
| |
| 1990/0227 | void rootstat(Chan *c, char *dp) { | |
| 1991/0427/sys/src/9/port/devroot.c:11,16 – 1991/0613/sys/src/9/port/devroot.c:11,17 (short | long) | ||
| 1990/0227 | Qbin, Qboot, | |
| 1991/0214 | Qcfs, | |
| 1991/0613 | Qcryptfs, | |
| 1990/0227 | Qdev, Qenv, Qproc, | |
| 1991/0427/sys/src/9/port/devroot.c:19,25 – 1991/0613/sys/src/9/port/devroot.c:20,29 | ||
| 1991/0214 | extern long cfslen; | |
| 1991/0216 | extern ulong cfscode[]; | |
| 1991/0214 | ||
| 1991/0613 | extern long cryptfslen; extern ulong cryptfscode[]; | |
| 1991/0214 | ||
| 1991/0613 | ||
| 1990/0227 | Dirtab rootdir[]={ | |
| 1990/11211 | "bin", {Qbin|CHDIR}, 0, 0700, "boot", {Qboot}, 0, 0700, | |
| 1991/0427/sys/src/9/port/devroot.c:26,31 – 1991/0613/sys/src/9/port/devroot.c:30,36 | ||
| 1990/11211 | "dev", {Qdev|CHDIR}, 0, 0700, "env", {Qenv|CHDIR}, 0, 0700, "proc", {Qproc|CHDIR}, 0, 0700, | |
| 1991/0613 | "cryptfs", {Qcryptfs}, 0, 0700, | |
| 1991/0214 | "cfs", {Qcfs}, 0, 0700, | |
| 1990/0227 | }; | |
| 1991/0427/sys/src/9/port/devroot.c:111,116 – 1991/0613/sys/src/9/port/devroot.c:116,129 | ||
| 1991/0411 | if(offset+n > cfslen) n = cfslen - offset; memmove(buf, ((char*)cfscode)+offset, n); | |
| 1991/0613 | return n; case Qcryptfs: /* cryptfs */ if(offset >= cryptfslen) return 0; if(offset+n > cryptfslen) n = cryptfslen - offset; memmove(buf, ((char*)cryptfscode)+offset, n); | |
| 1990/0227 | return n; case Qdev: | |
| 1991/0613/sys/src/9/port/devroot.c:19,29 – 1991/0615/sys/src/9/port/devroot.c:19,27 (short | long) | ||
| 1990/0227 | ||
| 1991/0214 | extern long cfslen; | |
| 1991/0216 | extern ulong cfscode[]; | |
| 1991/0214 | ||
| 1991/0613 | extern long cryptfslen; extern ulong cryptfscode[]; | |
| 1991/0214 | ||
| 1991/0613 | ||
| 1990/0227 | Dirtab rootdir[]={ | |
| 1990/11211 | "bin", {Qbin|CHDIR}, 0, 0700, "boot", {Qboot}, 0, 0700, | |
| 1991/0613/sys/src/9/port/devroot.c:30,46 – 1991/0615/sys/src/9/port/devroot.c:28,66 | ||
| 1990/11211 | "dev", {Qdev|CHDIR}, 0, 0700, "env", {Qenv|CHDIR}, 0, 0700, "proc", {Qproc|CHDIR}, 0, 0700, | |
| 1991/0613 |
| |
| 1991/0214 |
| |
| 1990/0227 | }; | |
| 1991/0615 | Dirtab rootpdir[]={ "cfs", {Qcfs}, 0, 0700, "cryptfs", {Qcryptfs}, 0, 0700, }; Dirtab *rootmap[sizeof rootpdir/sizeof(Dirtab)]; | |
| 1991/0214 | int nroot; | |
| 1990/0227 | ||
| 1991/0615 | int rootgen(Chan *c, Dirtab *tab, int ntab, int i, Dir *dp) { if(tab==0 || i>=ntab) return -1; if(i < NROOT) tab += i; else tab = rootmap[i - NROOT]; devdir(c, tab->qid, tab->name, tab->length, tab->perm, dp); return 1; } | |
| 1990/0227 | void rootreset(void) { | |
| 1991/0214 |
| |
| 1991/0615 | int i; i = 0; if(cfslen) rootmap[i++] = &rootpdir[0]; if(cryptfslen) rootmap[i++] = &rootpdir[1]; nroot = NROOT + i; | |
| 1990/0227 | } void | |
| 1991/0613/sys/src/9/port/devroot.c:63,81 – 1991/0615/sys/src/9/port/devroot.c:83,101 | ||
| 1990/0227 | int rootwalk(Chan *c, char *name) { | |
| 1991/0214 |
| |
| 1991/0615 | return devwalk(c, name, rootdir, nroot, rootgen); | |
| 1990/0227 | } void rootstat(Chan *c, char *dp) { | |
| 1991/0214 |
| |
| 1991/0615 | devstat(c, dp, rootdir, nroot, rootgen); | |
| 1990/0227 | } Chan* rootopen(Chan *c, int omode) { | |
| 1991/0214 |
| |
| 1991/0615 | return devopen(c, omode, rootdir, nroot, rootgen); | |
| 1990/0227 | } void | |
| 1991/0613/sys/src/9/port/devroot.c:100,106 – 1991/0615/sys/src/9/port/devroot.c:120,126 | ||
| 1990/0227 | ||
| 1990/11211 | switch(c->qid.path & ~CHDIR){ | |
| 1990/0227 | case Qdir: | |
| 1991/0214 |
| |
| 1991/0615 | return devdirread(c, buf, n, rootdir, nroot, rootgen); | |
| 1990/0227 | case Qboot: /* boot */ | |
| 1991/0411 | if(offset >= sizeof bootcode) | |
| 1991/0615/sys/src/9/port/devroot.c:14,24 – 1991/0910/sys/src/9/port/devroot.c:14,27 (short | long) | ||
| 1991/0613 | Qcryptfs, | |
| 1990/0227 | Qdev, Qenv, | |
| 1991/0910 | Qkfs, | |
| 1990/0227 | Qproc, }; | |
| 1991/0214 | extern long cfslen; | |
| 1991/0216 | extern ulong cfscode[]; | |
| 1991/0910 | extern long kfslen; extern ulong kfscode[]; | |
| 1991/0613 | extern long cryptfslen; extern ulong cryptfscode[]; | |
| 1991/0214 | ||
| 1991/0615/sys/src/9/port/devroot.c:33,38 – 1991/0910/sys/src/9/port/devroot.c:36,42 | ||
| 1991/0615 | Dirtab rootpdir[]={ "cfs", {Qcfs}, 0, 0700, "cryptfs", {Qcryptfs}, 0, 0700, | |
| 1991/0910 | "kfs", {Qkfs}, 0, 0700, | |
| 1991/0615 | }; Dirtab *rootmap[sizeof rootpdir/sizeof(Dirtab)]; | |
| 1991/0214 | int nroot; | |
| 1991/0615/sys/src/9/port/devroot.c:60,65 – 1991/0910/sys/src/9/port/devroot.c:64,71 | ||
| 1991/0615 | rootmap[i++] = &rootpdir[0]; if(cryptfslen) rootmap[i++] = &rootpdir[1]; | |
| 1991/0910 | if(kfslen) rootmap[i++] = &rootpdir[2]; | |
| 1991/0615 | nroot = NROOT + i; | |
| 1990/0227 | } | |
| 1991/0615/sys/src/9/port/devroot.c:136,141 – 1991/0910/sys/src/9/port/devroot.c:142,155 | ||
| 1991/0411 | if(offset+n > cfslen) n = cfslen - offset; memmove(buf, ((char*)cfscode)+offset, n); | |
| 1991/0910 | return n; case Qkfs: /* kfs */ if(offset >= kfslen) return 0; if(offset+n > kfslen) n = kfslen - offset; memmove(buf, ((char*)kfscode)+offset, n); | |
| 1991/0613 | return n; case Qcryptfs: /* cryptfs */ | |
| 1991/0910/sys/src/9/port/devroot.c:11,17 – 1991/0913/sys/src/9/port/devroot.c:11,16 (short | long) | ||
| 1990/0227 | Qbin, Qboot, | |
| 1991/0214 | Qcfs, | |
| 1991/0613 |
| |
| 1990/0227 | Qdev, Qenv, | |
| 1991/0910 | Qkfs, | |
| 1991/0910/sys/src/9/port/devroot.c:22,29 – 1991/0913/sys/src/9/port/devroot.c:21,26 | ||
| 1991/0216 | extern ulong cfscode[]; | |
| 1991/0910 | extern long kfslen; extern ulong kfscode[]; | |
| 1991/0613 |
| |
| 1991/0214 | ||
| 1990/0227 | Dirtab rootdir[]={ | |
| 1990/11211 | "bin", {Qbin|CHDIR}, 0, 0700, | |
| 1991/0910/sys/src/9/port/devroot.c:35,41 – 1991/0913/sys/src/9/port/devroot.c:32,37 | ||
| 1990/0227 | #define NROOT (sizeof rootdir/sizeof(Dirtab)) | |
| 1991/0615 | Dirtab rootpdir[]={ "cfs", {Qcfs}, 0, 0700, | |
| 1991/0910 | "kfs", {Qkfs}, 0, 0700, | |
| 1991/0615 | }; Dirtab *rootmap[sizeof rootpdir/sizeof(Dirtab)]; | |
| 1991/0910/sys/src/9/port/devroot.c:62,71 – 1991/0913/sys/src/9/port/devroot.c:58,65 | ||
| 1991/0615 | i = 0; if(cfslen) rootmap[i++] = &rootpdir[0]; | |
| 1991/0910 | if(kfslen) | |
| 1991/0913 | rootmap[i++] = &rootpdir[1]; | |
| 1991/0615 | nroot = NROOT + i; | |
| 1990/0227 | } | |
| 1991/0910/sys/src/9/port/devroot.c:150,163 – 1991/0913/sys/src/9/port/devroot.c:144,149 | ||
| 1991/0910 | if(offset+n > kfslen) n = kfslen - offset; memmove(buf, ((char*)kfscode)+offset, n); | |
| 1991/0613 |
| |
| 1990/0227 | return n; case Qdev: | |
| 1991/0913/sys/src/9/port/devroot.c:46,52 – 1991/1109/sys/src/9/port/devroot.c:46,52 (short | long) | ||
| 1991/0615 | tab += i; else tab = rootmap[i - NROOT]; | |
| 1991/1109 | devdir(c, tab->qid, tab->name, tab->length, eve, tab->perm, dp); | |
| 1991/0615 | return 1; } | |
| 1991/1109/sys/src/9/port/devroot.c:23,38 – 1991/1112/sys/src/9/port/devroot.c:23,38 (short | long) | ||
| 1991/0910 | extern ulong kfscode[]; | |
| 1991/0214 | ||
| 1990/0227 | Dirtab rootdir[]={ | |
| 1990/11211 |
| |
| 1991/1112 | "bin", {Qbin|CHDIR}, 0, 0777, "boot", {Qboot}, 0, 0777, "dev", {Qdev|CHDIR}, 0, 0777, "env", {Qenv|CHDIR}, 0, 0777, "proc", {Qproc|CHDIR}, 0, 0777, | |
| 1990/0227 | }; #define NROOT (sizeof rootdir/sizeof(Dirtab)) | |
| 1991/0615 | Dirtab rootpdir[]={ | |
| 1991/0910 |
| |
| 1991/1112 | "cfs", {Qcfs}, 0, 0777, "kfs", {Qkfs}, 0, 0777, | |
| 1991/0615 | }; Dirtab *rootmap[sizeof rootpdir/sizeof(Dirtab)]; | |
| 1991/0214 | int nroot; | |
| 1991/1112/sys/src/9/port/devroot.c:101,106 – 1991/1115/sys/src/9/port/devroot.c:101,107 (short | long) | ||
| 1990/0227 | void rootcreate(Chan *c, char *name, int omode, ulong perm) { | |
| 1991/1115 | USED(c, name, omode, perm); | |
| 1990/11211 | error(Eperm); | |
| 1990/0227 | } | |
| 1991/1112/sys/src/9/port/devroot.c:110,115 – 1991/1115/sys/src/9/port/devroot.c:111,117 | ||
| 1990/0227 | void rootclose(Chan *c) { | |
| 1991/1115 | USED(c); | |
| 1990/0227 | } #include "boot.h" | |
| 1991/1112/sys/src/9/port/devroot.c:156,161 – 1991/1115/sys/src/9/port/devroot.c:158,164 | ||
| 1990/0227 | long | |
| 1991/0411 | rootwrite(Chan *c, void *buf, long n, ulong offset) | |
| 1990/0227 | { | |
| 1991/1115 | USED(c, buf, n, offset); | |
| 1990/11211 | error(Egreg); | |
| 1990/0227 | } | |
| 1991/1112/sys/src/9/port/devroot.c:162,167 – 1991/1115/sys/src/9/port/devroot.c:165,171 | ||
| 1990/0227 | void rootremove(Chan *c) { | |
| 1991/1115 | USED(c); | |
| 1990/11211 | error(Eperm); | |
| 1990/0227 | } | |
| 1991/1112/sys/src/9/port/devroot.c:168,172 – 1991/1115/sys/src/9/port/devroot.c:172,177 | ||
| 1990/0227 | void rootwstat(Chan *c, char *dp) { | |
| 1991/1115 | USED(c, dp); | |
| 1990/11211 | error(Eperm); | |
| 1990/0227 | } | |
| 1991/1115/sys/src/9/port/devroot.c:9,20 – 1991/1206/sys/src/9/port/devroot.c:9,21 (short | long) | ||
| 1990/0227 | enum{ Qdir, Qbin, | |
| 1991/0214 |
| |
| 1990/0227 | Qdev, Qenv, | |
| 1991/0910 |
| |
| 1990/0227 | Qproc, | |
| 1991/1206 | Qboot, Qcfs, Qkfs, | |
| 1990/0227 | }; | |
| 1991/0214 | extern long cfslen; | |
| 1991/1115/sys/src/9/port/devroot.c:21,26 – 1991/1206/sys/src/9/port/devroot.c:22,29 | ||
| 1991/0216 | extern ulong cfscode[]; | |
| 1991/0910 | extern long kfslen; extern ulong kfscode[]; | |
| 1991/1206 | extern ulong bootlen; extern ulong bootcode[]; | |
| 1991/0214 | ||
| 1990/0227 | Dirtab rootdir[]={ | |
| 1991/1112 | "bin", {Qbin|CHDIR}, 0, 0777, | |
| 1991/1115/sys/src/9/port/devroot.c:83,88 – 1991/1206/sys/src/9/port/devroot.c:86,95 | ||
| 1990/0227 | int rootwalk(Chan *c, char *name) { | |
| 1991/1206 | if(strcmp(name, "..") == 0) { c->qid.path = Qdir|CHDIR; return 1; } | |
| 1991/0615 | return devwalk(c, name, rootdir, nroot, rootgen); | |
| 1990/0227 | } | |
| 1991/1115/sys/src/9/port/devroot.c:114,121 – 1991/1206/sys/src/9/port/devroot.c:121,126 | ||
| 1991/1115 | USED(c); | |
| 1990/0227 | } | |
| 1991/0411 | rootread(Chan *c, void *buf, long n, ulong offset) | |
| 1990/0227 | { | |
| 1991/1115/sys/src/9/port/devroot.c:125,134 – 1991/1206/sys/src/9/port/devroot.c:130,139 | ||
| 1991/0615 | return devdirread(c, buf, n, rootdir, nroot, rootgen); | |
| 1990/0227 | case Qboot: /* boot */ | |
| 1991/0411 |
| |
| 1991/1206 | if(offset >= bootlen) | |
| 1990/0227 | return 0; | |
| 1991/0411 |
| |
| 1991/1206 | if(offset+n > bootlen) n = bootlen - offset; | |
| 1991/0411 | memmove(buf, ((char*)bootcode)+offset, n); | |
| 1991/0214 | return n; | |
| 1991/1206/sys/src/9/port/devroot.c:3,9 – 1992/0111/sys/src/9/port/devroot.c:3,9 (short | long) | ||
|
Move error.h to ../port. Change errors to actual strings.
rsc Fri Mar 4 12:44:25 2005 | ||
| 1990/0227 | #include "mem.h" #include "dat.h" #include "fns.h" | |
| 1992/0111 | #include "../port/error.h" | |
| 1990/0227 | #include "devtab.h" enum{ | |
| 1992/0111/sys/src/9/port/devroot.c:12,17 – 1992/0213/sys/src/9/port/devroot.c:12,18 (short | long) | ||
| 1990/0227 | Qdev, Qenv, Qproc, | |
| 1992/0213 | Qnet, | |
| 1991/1206 | Qboot, Qcfs, | |
| 1992/0111/sys/src/9/port/devroot.c:31,36 – 1992/0213/sys/src/9/port/devroot.c:32,38 | ||
| 1991/1112 | "dev", {Qdev|CHDIR}, 0, 0777, "env", {Qenv|CHDIR}, 0, 0777, "proc", {Qproc|CHDIR}, 0, 0777, | |
| 1992/0213 | "net", {Qnet|CHDIR}, 0, 0777, | |
| 1990/0227 | }; #define NROOT (sizeof rootdir/sizeof(Dirtab)) | |
| 1991/0615 | Dirtab rootpdir[]={ | |
| 1992/0213/sys/src/9/port/devroot.c:158,164 – 1992/0215/sys/src/9/port/devroot.c:158,163 (short | long) | ||
| 1990/0227 | case Qdev: return 0; } | |
| 1990/11211 |
| |
| 1990/0227 | return 0; } | |
| 1992/0215/sys/src/9/port/devroot.c:45,56 – 1992/0225/sys/src/9/port/devroot.c:45,58 (short | long) | ||
| 1991/0615 | int rootgen(Chan *c, Dirtab *tab, int ntab, int i, Dir *dp) { | |
| 1992/0225 | if(i >= nroot) | |
| 1991/0615 | return -1; | |
| 1992/0225 | ||
| 1991/0615 | if(i < NROOT) | |
| 1992/0225 | tab = &rootdir[i]; | |
| 1991/0615 | else tab = rootmap[i - NROOT]; | |
| 1992/0225 | ||
| 1991/1109 | devdir(c, tab->qid, tab->name, tab->length, eve, tab->perm, dp); | |
| 1991/0615 | return 1; } | |
| 1992/0215/sys/src/9/port/devroot.c:92,97 – 1992/0225/sys/src/9/port/devroot.c:94,101 | ||
| 1991/1206 | c->qid.path = Qdir|CHDIR; return 1; } | |
| 1992/0225 | if((c->qid.path & ~CHDIR) != Qdir) error(Enonexist); | |
| 1991/0615 | return devwalk(c, name, rootdir, nroot, rootgen); | |
| 1990/0227 | } | |
| 1992/0225/sys/src/9/port/devroot.c:95,101 – 1992/0226/sys/src/9/port/devroot.c:95,101 (short | long) | ||
| 1991/1206 | return 1; } | |
| 1992/0225 | if((c->qid.path & ~CHDIR) != Qdir) | |
| 1992/0226 | return 0; | |
| 1991/0615 | return devwalk(c, name, rootdir, nroot, rootgen); | |
| 1990/0227 | } | |
| 1992/0226/sys/src/9/port/devroot.c:1,5 – 1992/0321/sys/src/9/port/devroot.c:1,5 (short | long) | ||
|
Move lib.h to ../port.
rsc Fri Mar 4 12:44:25 2005 | ||
| 1990/0227 | #include "u.h" | |
| 1992/0321 | #include "../port/lib.h" | |
| 1990/0227 | #include "mem.h" #include "dat.h" #include "fns.h" | |
| 1992/0321/sys/src/9/port/devroot.c:170,175 – 1992/0520/sys/src/9/port/devroot.c:170,176 (short | long) | ||
| 1990/0227 | { | |
| 1991/1115 | USED(c, buf, n, offset); | |
| 1990/11211 | error(Egreg); | |
| 1992/0520 | return 0; /* not reached */ | |
| 1990/0227 | } void | |
| Too many diffs (26 > 25). Stopping. | ||