summaryrefslogtreecommitdiff
path: root/emu/Plan9/devfs.c
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2009-03-25 16:37:32 +0000
committerCharles.Forsyth <devnull@localhost>2009-03-25 16:37:32 +0000
commite0a2b8d82a5521d9391ca8c6f055777954c76c2f (patch)
treebed98eebad567e161db651e8a173f1a819169292 /emu/Plan9/devfs.c
parentd8150d92150b08ade63d7cd8b666cb26551110ff (diff)
x20090315-1636
Diffstat (limited to 'emu/Plan9/devfs.c')
-rw-r--r--emu/Plan9/devfs.c8
1 files changed, 5 insertions, 3 deletions
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,