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.
This commit is contained in:
parent
1c77c6b7b0
commit
83e6569390
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=34691
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user