summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>1998-03-19 20:58:45 +0000
committereivind <eivind@FreeBSD.org>1998-03-19 20:58:45 +0000
commit7be3e77c0acdb8f6edfb7faed259eb29ff968fa6 (patch)
tree8349bd9d857b46effc4337a9e177f799124bf14d /sbin
parentdc6d7f19f8e06542012c2a9f18666a06cc44fec6 (diff)
downloadFreeBSD-src-7be3e77c0acdb8f6edfb7faed259eb29ff968fa6.zip
FreeBSD-src-7be3e77c0acdb8f6edfb7faed259eb29ff968fa6.tar.gz
Make 'ifconfig -l ether' only list Ethernet interfaces. This is
useful, intuitive, and match the old comments in the source. Previously, 'ifconfig -l ether' and 'ifconfig -l' were equal.
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ifconfig/ifconfig.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index a4618c4..4d47f06 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";
*/
static const char rcsid[] =
- "$Id: ifconfig.c,v 1.33 1997/12/24 00:57:41 imp Exp $";
+ "$Id: ifconfig.c,v 1.34 1997/12/26 23:28:04 imp Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -448,10 +448,14 @@ main(argc, argv)
strncpy(name, sdl->sdl_data, sdl->sdl_nlen);
name[sdl->sdl_nlen] = '\0';
if (namesonly) {
- if (need_nl)
- putchar(' ');
- fputs(name, stdout);
- need_nl++;
+ if (afp == NULL ||
+ afp->af_status != ether_status ||
+ sdl->sdl_type == IFT_ETHER) {
+ if (need_nl)
+ putchar(' ');
+ fputs(name, stdout);
+ need_nl++;
+ }
continue;
}
} else {
OpenPOWER on IntegriCloud