diff options
author | phk <phk@FreeBSD.org> | 1999-06-19 20:07:24 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-06-19 20:07:24 +0000 |
commit | ff773191969ea0eb35218ab5f90ca57d05cff015 (patch) | |
tree | 52413aa2cf053c3f5f82dfdd137501f67ed53df2 /sbin/ifconfig/ifconfig.c | |
parent | 90290405cf286aa3cad1ac14a252091d056f8001 (diff) | |
download | FreeBSD-src-ff773191969ea0eb35218ab5f90ca57d05cff015.zip FreeBSD-src-ff773191969ea0eb35218ab5f90ca57d05cff015.tar.gz |
Move the IFSTATUS stuff after the address listing.
Diffstat (limited to 'sbin/ifconfig/ifconfig.c')
-rw-r--r-- | sbin/ifconfig/ifconfig.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c index f2ab7de..9252396 100644 --- a/sbin/ifconfig/ifconfig.c +++ b/sbin/ifconfig/ifconfig.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)ifconfig.c 8.2 (Berkeley) 2/16/94"; #endif static const char rcsid[] = - "$Id: ifconfig.c,v 1.40 1999/06/06 09:17:30 phk Exp $"; + "$Id: ifconfig.c,v 1.41 1999/06/19 18:42:19 phk Exp $"; #endif /* not lint */ #include <sys/param.h> @@ -758,10 +758,6 @@ status(afp, addrcount, sdl, ifm, ifam) printf(" mtu %d", mtu); putchar('\n'); - strncpy(ifs.ifs_name, name, sizeof ifs.ifs_name); - if (ioctl(s, SIOCGIFSTATUS, &ifs) == 0) - printf("%s", ifs.ascii); - while (addrcount > 0) { info.rti_addrs = ifam->ifam_addrs; @@ -806,6 +802,10 @@ status(afp, addrcount, sdl, ifm, ifam) if (allfamilies || afp->af_status == vlan_status) vlan_status(s, NULL); #endif + strncpy(ifs.ifs_name, name, sizeof ifs.ifs_name); + if (ioctl(s, SIOCGIFSTATUS, &ifs) == 0) + printf("%s", ifs.ascii); + if (!allfamilies && !p && afp->af_status != media_status && afp->af_status != ether_status && afp->af_status != vlan_status) warnx("%s has no %s interface address!", name, afp->af_name); |