From e0a2b8d82a5521d9391ca8c6f055777954c76c2f Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Wed, 25 Mar 2009 16:37:32 +0000 Subject: x20090315-1636 --- emu/Plan9/devfs.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'emu/Plan9/devfs.c') diff --git a/emu/Plan9/devfs.c b/emu/Plan9/devfs.c index d0db522d..c64c0f88 100644 --- a/emu/Plan9/devfs.c +++ b/emu/Plan9/devfs.c @@ -68,7 +68,7 @@ fsattach(char *spec) c = devattach('U', spec); lock(&l); - c->dev = devno++; + c->devno = devno++; c->qid = rootqid; unlock(&l); c->aux = smalloc(sizeof(Fsinfo)); @@ -105,7 +105,6 @@ fswalk(Chan *c, Chan *nc, char **name, int nname) } if(nc == nil){ nc = devclone(c); - nc->type = 0; alloc = 1; } wq->clone = nc; @@ -152,7 +151,8 @@ fswalk(Chan *c, Chan *nc, char **name, int nname) }else if(wq->clone){ /* now attach to our device */ nc->aux = smalloc(sizeof(Fsinfo)); - nc->type = c->type; + devtabincref(c->dev); + wq->clone->dev = c->dev; FS(nc)->rootqid = FS(c)->rootqid; FS(nc)->name = current; FS(nc)->fd = -1; @@ -349,7 +349,9 @@ Dev fsdevtab = { 'U', "fs", + devreset, devinit, + devshutdown, fsattach, fswalk, fsstat, -- cgit v1.2.3