diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-06-03 23:33:35 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-06-03 23:33:35 +0200 |
commit | 56ffc907ac25b28e3640a2d1ef5b61df90f0b700 (patch) | |
tree | 4e185e8c2de6ce9e9bb15776881cdd8150b29210 /sys/src/9/port/devfs.c | |
parent | 8c70c09bfdfb5857e60e2455642603a883847c14 (diff) |
kernel: stop the practice of passing DMDIR to devir() perm argument
devdir internally replicates the qid in ther perm stat field
already and the practice of explicitely passing just causing
confusion when done inconsistently.
Diffstat (limited to 'sys/src/9/port/devfs.c')
-rw-r--r-- | sys/src/9/port/devfs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/src/9/port/devfs.c b/sys/src/9/port/devfs.c index e5d1abe2f..8efc07e37 100644 --- a/sys/src/9/port/devfs.c +++ b/sys/src/9/port/devfs.c @@ -811,7 +811,7 @@ mgen(Chan *c, char*, Dirtab*, int, int i, Dir *dp) qid.vers = 0; if(c->qid.path == Qtop){ if(i == DEVDOTDOT){ - devdir(c, tqid, "#k", 0, eve, DMDIR|0775, dp); + devdir(c, tqid, "#k", 0, eve, 0775, dp); return 1; } t = gettree(i, Optional); @@ -820,7 +820,7 @@ mgen(Chan *c, char*, Dirtab*, int, int i, Dir *dp) return -1; } qid.path = mkpath(i, Qdir); - devdir(c, qid, t->name, 0, eve, DMDIR|0775, dp); + devdir(c, qid, t->name, 0, eve, 0775, dp); return 1; } @@ -832,7 +832,7 @@ mgen(Chan *c, char*, Dirtab*, int, int i, Dir *dp) } if((c->qid.type & QTDIR) != 0){ if(i == DEVDOTDOT){ - devdir(c, tqid, "#k", 0, eve, DMDIR|0775, dp); + devdir(c, tqid, "#k", 0, eve, 0775, dp); return 1; } if(treeno == 0){ @@ -857,7 +857,7 @@ mgen(Chan *c, char*, Dirtab*, int, int i, Dir *dp) if(i == DEVDOTDOT){ qid.path = mkpath(treeno, Qdir); - devdir(c, qid, t->name, 0, eve, DMDIR|0775, dp); + devdir(c, qid, t->name, 0, eve, 0775, dp); return 1; } dprint("no\n"); @@ -909,7 +909,7 @@ mstat(Chan *c, uchar *db, int n) memset(&d, 0, sizeof d); switch(p){ case Qtop: - devdir(c, tqid, "#k", 0, eve, DMDIR|0775, &d); + devdir(c, tqid, "#k", 0, eve, 0775, &d); break; case Qctl: devdir(c, cqid, "ctl", 0, eve, 0664, &d); @@ -917,7 +917,7 @@ mstat(Chan *c, uchar *db, int n) default: t = gettree(path2treeno(p), Mustexist); if(c->qid.type & QTDIR) - devdir(c, c->qid, t->name, 0, eve, DMDIR|0775, &d); + devdir(c, c->qid, t->name, 0, eve, 0775, &d); else{ mp = getdev(t, path2devno(p) - Qfirst, Mustexist); q = c->qid; |