aboutsummaryrefslogtreecommitdiff
path: root/networking/ifupdown.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/ifupdown.c')
-rw-r--r--networking/ifupdown.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index 6334cbc43..f572b487d 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -89,7 +89,6 @@ struct interfaces_file_t
89 struct mapping_defn_t *mappings; 89 struct mapping_defn_t *mappings;
90}; 90};
91 91
92static unsigned option_mask;
93#define OPTION_STR "anvf" USE_FEATURE_IFUPDOWN_MAPPING("m") "i:" 92#define OPTION_STR "anvf" USE_FEATURE_IFUPDOWN_MAPPING("m") "i:"
94enum { 93enum {
95 OPT_do_all = 0x1, 94 OPT_do_all = 0x1,
@@ -98,11 +97,11 @@ enum {
98 OPT_force = 0x8, 97 OPT_force = 0x8,
99 OPT_no_mappings = 0x10, 98 OPT_no_mappings = 0x10,
100}; 99};
101#define DO_ALL (option_mask & OPT_do_all) 100#define DO_ALL (option_mask32 & OPT_do_all)
102#define NO_ACT (option_mask & OPT_no_act) 101#define NO_ACT (option_mask32 & OPT_no_act)
103#define VERBOSE (option_mask & OPT_verbose) 102#define VERBOSE (option_mask32 & OPT_verbose)
104#define FORCE (option_mask & OPT_force) 103#define FORCE (option_mask32 & OPT_force)
105#define NO_MAPPINGS (option_mask & OPT_no_mappings) 104#define NO_MAPPINGS (option_mask32 & OPT_no_mappings)
106 105
107static char **__myenviron; 106static char **__myenviron;
108 107
@@ -881,10 +880,10 @@ static void set_environ(struct interface_defn_t *iface, const char *mode)
881 880
882static int doit(char *str) 881static int doit(char *str)
883{ 882{
884 if (option_mask & (OPT_no_act|OPT_verbose)) { 883 if (option_mask32 & (OPT_no_act|OPT_verbose)) {
885 puts(str); 884 puts(str);
886 } 885 }
887 if (!(option_mask & OPT_no_act)) { 886 if (!(option_mask32 & OPT_no_act)) {
888 pid_t child; 887 pid_t child;
889 int status; 888 int status;
890 889
@@ -1088,7 +1087,7 @@ int ifupdown_main(int argc, char **argv)
1088 cmds = iface_down; 1087 cmds = iface_down;
1089 } 1088 }
1090 1089
1091 option_mask = getopt32(argc, argv, OPTION_STR, &interfaces); 1090 getopt32(argc, argv, OPTION_STR, &interfaces);
1092 if (argc - optind > 0) { 1091 if (argc - optind > 0) {
1093 if (DO_ALL) bb_show_usage(); 1092 if (DO_ALL) bb_show_usage();
1094 } else 1093 } else