| plan 9 kernel history: overview | file list | diff list |
1990/11211/port/devlance.c (diff list | history)
| 1990/0912/sys/src/9/port/devlance.c:626,641 – 1990/11211/sys/src/9/port/devlance.c:626,642 (short | long | prev | next) | ||
| 1990/0227 | */ for(i=0; i<Ntypes; i++) { sprint(lancedir[i].name, "%d", i); | |
| 1990/11211 | lancedir[i].qid.path = CHDIR|STREAMQID(i, Lchanqid); lancedir[i].qid.vers = 0; | |
| 1990/0227 | lancedir[i].length = 0; lancedir[i].perm = 0600; } | |
| 1990/03042 | strcpy(lancedir[Ntypes].name, "trace"); | |
| 1990/11211 | lancedir[Ntypes].qid.path = Ltraceqid; | |
| 1990/03042 | lancedir[Ntypes].length = 0; lancedir[Ntypes].perm = 0600; | |
| 1990/0911 | strcpy(lancedir[Ntypes+1].name, "stats"); | |
| 1990/11211 | lancedir[Ntypes+1].qid.path = Lstatsqid; | |
| 1990/0911 | lancedir[Ntypes+1].length = 0; lancedir[Ntypes+1].perm = 0600; | |
| 1990/0227 | } | |
| 1990/0912/sys/src/9/port/devlance.c:668,674 – 1990/11211/sys/src/9/port/devlance.c:669,675 | ||
| 1990/0227 | int lancewalk(Chan *c, char *name) { | |
| 1990/11211 | if(c->qid.path == CHDIR) | |
| 1990/03042 | return devwalk(c, name, lancedir, Ndir, devgen); | |
| 1990/0227 | else return devwalk(c, name, 0, 0, streamgen); | |
| 1990/0912/sys/src/9/port/devlance.c:677,683 – 1990/11211/sys/src/9/port/devlance.c:678,684 | ||
| 1990/0227 | void lancestat(Chan *c, char *dp) { | |
| 1990/0911 |
| |
| 1990/11211 | if(c->qid.path==CHDIR || c->qid.path==Ltraceqid || c->qid.path==Lstatsqid) | |
| 1990/03042 | devstat(c, dp, lancedir, Ndir, devgen); | |
| 1990/0227 | else devstat(c, dp, 0, 0, streamgen); | |
| 1990/0912/sys/src/9/port/devlance.c:691,702 – 1990/11211/sys/src/9/port/devlance.c:692,703 | ||
| 1990/0227 | { extern Qinfo nonetinfo; | |
| 1990/03042 |
| |
| 1990/11211 | switch(c->qid.path){ | |
| 1990/03042 | case CHDIR: case Ltraceqid: | |
| 1990/0911 | case Lstatsqid: | |
| 1990/0227 | if(omode != OREAD) | |
| 1990/11211 | error(Eperm); | |
| 1990/03042 | break; default: | |
| 1990/0227 | streamopen(c, &lanceinfo); | |
| 1990/0912/sys/src/9/port/devlance.c:711,717 – 1990/11211/sys/src/9/port/devlance.c:712,718 | ||
| 1990/0227 | void lancecreate(Chan *c, char *name, int omode, ulong perm) { | |
| 1990/11211 | error(Eperm); | |
| 1990/0227 | } void | |
| 1990/0912/sys/src/9/port/devlance.c:718,724 – 1990/11211/sys/src/9/port/devlance.c:719,725 | ||
| 1990/0227 | lanceclose(Chan *c) { /* real closing happens in lancestclose */ | |
| 1990/03042 |
| |
| 1990/11211 | switch(c->qid.path){ | |
| 1990/03042 | case CHDIR: case Ltraceqid: | |
| 1990/0911 | case Lstatsqid: | |
| 1990/0912/sys/src/9/port/devlance.c:767,773 – 1990/11211/sys/src/9/port/devlance.c:768,774 | ||
| 1990/0227 | { | |
| 1990/0911 | char buf[256]; | |
| 1990/03042 |
| |
| 1990/11211 | switch(c->qid.path){ | |
| 1990/03042 | case CHDIR: return devdirread(c, a, n, lancedir, Ndir, devgen); | |
| 1990/0911 | case Lstatsqid: | |
| 1990/0912/sys/src/9/port/devlance.c:791,815 – 1990/11211/sys/src/9/port/devlance.c:792,804 | ||
| 1990/0227 | void lanceremove(Chan *c) { | |
| 1990/11211 | error(Eperm); | |
| 1990/0227 | } void lancewstat(Chan *c, char *dp) { | |
| 1990/11211 | error(Eperm); | |
| 1990/0227 | } /* | |