summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2003-11-08 01:01:56 +0000
committersam <sam@FreeBSD.org>2003-11-08 01:01:56 +0000
commitc40a1d04019ca7fb4604c315c502046e6e6f4527 (patch)
tree33d61c3507468ae7fcfc6cbdcd80f437e8136bb2 /tools
parent8a034c943d5bc584a995d60d8d888f7a5f01aaf0 (diff)
downloadFreeBSD-src-c40a1d04019ca7fb4604c315c502046e6e6f4527.zip
FreeBSD-src-c40a1d04019ca7fb4604c315c502046e6e6f4527.tar.gz
catchup with if_xname change
Diffstat (limited to 'tools')
-rw-r--r--tools/tools/ath/athstats.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/tools/tools/ath/athstats.c b/tools/tools/ath/athstats.c
index 75d7a2d..74f04c6 100644
--- a/tools/tools/ath/athstats.c
+++ b/tools/tools/ath/athstats.c
@@ -257,15 +257,11 @@ ifnetsetup(const char *interface, u_long off)
return;
firstifnet = (u_long)TAILQ_FIRST(&ifnethead);
for (off = firstifnet; off;) {
- char name[16], tname[16];
+ char name[IFNAMSIZ];
if (kread(off, (char *)&ifnet, sizeof ifnet))
break;
- if (kread((u_long)ifnet.if_name, tname, sizeof(tname)))
- break;
- tname[sizeof(tname) - 1] = '\0';
- snprintf(name, sizeof(name), "%s%d", tname, ifnet.if_unit);
- if (interface && strcmp(name, interface) == 0)
+ if (interface && strcmp(ifnet.if_xname, interface) == 0)
return off;
off = (u_long)TAILQ_NEXT(&ifnet, if_link);
}
OpenPOWER on IntegriCloud