diff options
author | Denys Vlasenko | 2018-03-05 17:46:17 +0100 |
---|---|---|
committer | Denys Vlasenko | 2018-03-05 17:46:17 +0100 |
commit | 82ec89480d524a219ad027d1f7c5aa42cc6373d5 (patch) | |
tree | ad36e295337e149aa170b0d241a0b441d828dd3e /networking/ifconfig.c | |
parent | 8a5299fcfd54ae3b895b66249d6d105e956192cb (diff) | |
download | busybox-82ec89480d524a219ad027d1f7c5aa42cc6373d5.zip busybox-82ec89480d524a219ad027d1f7c5aa42cc6373d5.tar.gz |
networking/interface.c: get rid of global "smallint interface_opt_a"
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/ifconfig.c')
-rw-r--r-- | networking/ifconfig.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/networking/ifconfig.c b/networking/ifconfig.c index 61d9178..5c47abc 100644 --- a/networking/ifconfig.c +++ b/networking/ifconfig.c @@ -338,6 +338,7 @@ int ifconfig_main(int argc UNUSED_PARAM, char **argv) char *p; /*char host[128];*/ const char *host = NULL; /* make gcc happy */ + IF_FEATURE_IFCONFIG_STATUS(char *show_all_param;) did_flags = 0; #if ENABLE_FEATURE_IFCONFIG_BROADCAST_PLUS @@ -349,15 +350,16 @@ int ifconfig_main(int argc UNUSED_PARAM, char **argv) ++argv; #if ENABLE_FEATURE_IFCONFIG_STATUS - if (argv[0] && (argv[0][0] == '-' && argv[0][1] == 'a' && !argv[0][2])) { - interface_opt_a = 1; + show_all_param = NULL; + if (argv[0] && argv[0][0] == '-' && argv[0][1] == 'a' && !argv[0][2]) { ++argv; + show_all_param = IFNAME_SHOW_DOWNED_TOO; } #endif if (!argv[0] || !argv[1]) { /* one or no args */ #if ENABLE_FEATURE_IFCONFIG_STATUS - return display_interfaces(argv[0] /* can be NULL */); + return display_interfaces(argv[0] ? argv[0] : show_all_param); #else bb_error_msg_and_die("no support for status display"); #endif |