| plan 9 kernel history: overview | file list | diff list |
1997/0327/port/dev.c (diff list | history)
| 1996/0223/sys/src/9/port/dev.c:59,65 – 1997/0327/sys/src/9/port/dev.c:59,75 (short | long | prev | next) | ||
|
Add devreset, devinit, devcreate. Format edits. Devtab is now an array of pointers not structures.
rsc Fri Mar 4 12:44:25 2005 | ||
| 1990/0227 | return 1; } | |
| 1997/0327 | void devreset(void) { } void devinit(void) { } Chan* | |
| 1990/0227 | devattach(int tc, char *spec) { Chan *c; | |
| 1996/0223/sys/src/9/port/dev.c:75,81 – 1997/0327/sys/src/9/port/dev.c:85,91 | ||
| 1990/0227 | return c; } | |
| 1997/0327 | Chan* | |
| 1990/0227 | devclone(Chan *c, Chan *nc) { | |
| 1990/0329 | if(c->flag & COPEN) | |
| 1996/0223/sys/src/9/port/dev.c:129,135 – 1997/0327/sys/src/9/port/dev.c:139,145 | ||
| 1990/0227 | continue; } | |
| 1993/0501 | } | |
| 1997/0327 | return 0; | |
| 1991/0411 | } | |
| 1990/0227 | void | |
| 1996/0223/sys/src/9/port/dev.c:146,153 – 1997/0327/sys/src/9/port/dev.c:156,165 | ||
| 1990/0227 | convD2M(&dir, db); return; } | |
| 1993/0501 |
| |
| 1997/0327 | print("%s %s: devstat %C %lux\n", up->text, up->user, devchar[c->type], c->qid.path); | |
| 1991/0626 | error(Enonexist); | |
| 1993/0330 | case 0: break; | |
| 1996/0223/sys/src/9/port/dev.c:189,195 – 1997/0327/sys/src/9/port/dev.c:201,207 | ||
| 1990/0821 | return m; | |
| 1990/0227 | } | |
| 1997/0327 | Chan* | |
| 1990/0227 | devopen(Chan *c, int omode, Dirtab *tab, int ntab, Devgen *gen) { int i; | |
| 1996/0223/sys/src/9/port/dev.c:230,235 – 1997/0327/sys/src/9/port/dev.c:242,253 | ||
| 1990/0227 | return c; } | |
| 1995/0108 | ||
| 1997/0327 | void devcreate(Chan*, char*, int, ulong) { error(Eperm); } | |
| 1995/0108 | Block* devbread(Chan *c, long n, ulong offset) { | |
| 1996/0223/sys/src/9/port/dev.c:242,248 – 1997/0327/sys/src/9/port/dev.c:260,266 | ||
| 1995/0108 | freeb(bp); nexterror(); } | |
| 1997/0327 | bp->wp += devtab[c->type]->read(c, bp->wp, n, offset); | |
| 1995/0108 | poperror(); return bp; } | |
| 1996/0223/sys/src/9/port/dev.c:252,260 – 1997/0327/sys/src/9/port/dev.c:270,289 | ||
| 1995/0108 | { long n; | |
| 1997/0327 | n = devtab[c->type]->write(c, bp->rp, BLEN(bp), offset); | |
| 1995/0108 | freeb(bp); return n; } | |
| 1997/0327 | void devremove(Chan*) { error(Eperm); } void devwstat(Chan*, char*) { error(Eperm); } | |