netif: fix wrong qid in 3rd level stats/ifstats files (thanks burnzez)
the stats and ifstats files in the 3rd level of a netif are not per connection, but for the interface. this made fstat fail for /net/ether0/N/*stats where N > 0 as the NETID() bits in the qid didnt compare.
This commit is contained in:
parent
6a83facfb3
commit
5d9f0ed326
1 changed files with 2 additions and 2 deletions
|
@ -132,7 +132,7 @@ netifgen(Chan *c, char*, Dirtab *vp, int, int i, Dir *dp)
|
|||
devdir(c, q, "ctl", 0, o, perm, dp);
|
||||
break;
|
||||
case 2:
|
||||
q.path = NETQID(NETID(c->qid.path), Nstatqid);
|
||||
q.path = Nstatqid;
|
||||
devdir(c, q, "stats", 0, eve, 0444, dp);
|
||||
break;
|
||||
case 3:
|
||||
|
@ -140,7 +140,7 @@ netifgen(Chan *c, char*, Dirtab *vp, int, int i, Dir *dp)
|
|||
devdir(c, q, "type", 0, eve, 0444, dp);
|
||||
break;
|
||||
case 4:
|
||||
q.path = NETQID(NETID(c->qid.path), Nifstatqid);
|
||||
q.path = Nifstatqid;
|
||||
devdir(c, q, "ifstats", 0, eve, 0444, dp);
|
||||
break;
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue