summaryrefslogtreecommitdiffstats
path: root/sbin/ifconfig
diff options
context:
space:
mode:
authorarchie <archie@FreeBSD.org>2000-07-18 22:07:31 +0000
committerarchie <archie@FreeBSD.org>2000-07-18 22:07:31 +0000
commite58c321b82d2de60cbd3cae2af253ea6a58f7841 (patch)
tree0cd7d1065b46a1ce707b51bf8ef36d7c1131cafd /sbin/ifconfig
parentf793ebc47960cacc9913e95462391a55be39e13b (diff)
downloadFreeBSD-src-e58c321b82d2de60cbd3cae2af253ea6a58f7841.zip
FreeBSD-src-e58c321b82d2de60cbd3cae2af253ea6a58f7841.tar.gz
Make "ifconfig" with no arguments equivalent to "ifconfig -a".
Diffstat (limited to 'sbin/ifconfig')
-rw-r--r--sbin/ifconfig/ifconfig.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 3642464..cfc4722 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -390,6 +390,10 @@ main(argc, argv)
if (uponly && downonly)
usage();
+ /* no arguments is equivalent to '-a' */
+ if (!namesonly && argc < 1)
+ all = 1;
+
/* -a and -l allow an address family arg to limit the output */
if (all || namesonly) {
if (argc > 1)
OpenPOWER on IntegriCloud