diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-06 09:49:47 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-06 09:49:47 +0000 |
commit | c12f53090bd41dbb87279083bc442769cb0610f0 (patch) | |
tree | 079fff1c37f04ea7f25f00cdc4360d52a69b77c5 /networking/ifupdown.c | |
parent | 4e6ceb44554d265eed24c414b9a201d51d00fee2 (diff) | |
download | busybox-w32-c12f53090bd41dbb87279083bc442769cb0610f0.tar.gz busybox-w32-c12f53090bd41dbb87279083bc442769cb0610f0.tar.bz2 busybox-w32-c12f53090bd41dbb87279083bc442769cb0610f0.zip |
dnsd fix; option_mask32 added. dnsd needs more love.
Diffstat (limited to 'networking/ifupdown.c')
-rw-r--r-- | networking/ifupdown.c | 17 |
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 | ||
92 | static 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:" |
94 | enum { | 93 | enum { |
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 | ||
107 | static char **__myenviron; | 106 | static char **__myenviron; |
108 | 107 | ||
@@ -881,10 +880,10 @@ static void set_environ(struct interface_defn_t *iface, const char *mode) | |||
881 | 880 | ||
882 | static int doit(char *str) | 881 | static 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 |