diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-01-11 16:07:35 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-01-11 16:07:35 +0100 |
commit | 5d9f0ed3264201bf367edd7cb02366ed0b483d9a (patch) | |
tree | 15c11d6dca6eeeea2ddd0a238944874d569db617 | |
parent | 6a83facfb3f64f579847166af0321370e4062f9d (diff) |
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.
-rw-r--r-- | sys/src/9/port/netif.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/9/port/netif.c b/sys/src/9/port/netif.c index e775fe847..9df9e40a4 100644 --- a/sys/src/9/port/netif.c +++ b/sys/src/9/port/netif.c @@ -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: |