diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-21 11:09:40 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-04-21 11:09:40 +0000 |
commit | 5e34ff29bcc870936ab18172f438a34d042d4e03 (patch) | |
tree | a5e7a528f2f916eb883f1161eadceacdf2dca4be /networking/udhcp/dhcpc.c | |
parent | 8b814b4a349e2262c0ad25793b05206a14651ebb (diff) | |
download | busybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.tar.gz busybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.tar.bz2 busybox-w32-5e34ff29bcc870936ab18172f438a34d042d4e03.zip |
*: mass renaming of USE_XXXX to IF_XXXX
and SKIP_XXXX to IF_NOT_XXXX - the second one was especially
badly named. It was not skipping anything!
Diffstat (limited to 'networking/udhcp/dhcpc.c')
-rw-r--r-- | networking/udhcp/dhcpc.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/networking/udhcp/dhcpc.c b/networking/udhcp/dhcpc.c index e9f99e39c..2dd3cd077 100644 --- a/networking/udhcp/dhcpc.c +++ b/networking/udhcp/dhcpc.c | |||
@@ -133,7 +133,7 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) | |||
133 | { | 133 | { |
134 | uint8_t *temp, *message; | 134 | uint8_t *temp, *message; |
135 | char *str_c, *str_V, *str_h, *str_F, *str_r; | 135 | char *str_c, *str_V, *str_h, *str_F, *str_r; |
136 | USE_FEATURE_UDHCP_PORT(char *str_P;) | 136 | IF_FEATURE_UDHCP_PORT(char *str_P;) |
137 | llist_t *list_O = NULL; | 137 | llist_t *list_O = NULL; |
138 | int tryagain_timeout = 20; | 138 | int tryagain_timeout = 20; |
139 | int discover_timeout = 3; | 139 | int discover_timeout = 3; |
@@ -175,8 +175,8 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) | |||
175 | "no-default-options\0" No_argument "o" | 175 | "no-default-options\0" No_argument "o" |
176 | "foreground\0" No_argument "f" | 176 | "foreground\0" No_argument "f" |
177 | "background\0" No_argument "b" | 177 | "background\0" No_argument "b" |
178 | USE_FEATURE_UDHCPC_ARPING("arping\0" No_argument "a") | 178 | IF_FEATURE_UDHCPC_ARPING("arping\0" No_argument "a") |
179 | USE_FEATURE_UDHCP_PORT("client-port\0" Required_argument "P") | 179 | IF_FEATURE_UDHCP_PORT("client-port\0" Required_argument "P") |
180 | ; | 180 | ; |
181 | #endif | 181 | #endif |
182 | enum { | 182 | enum { |
@@ -204,33 +204,33 @@ int udhcpc_main(int argc UNUSED_PARAM, char **argv) | |||
204 | /* The rest has variable bit positions, need to be clever */ | 204 | /* The rest has variable bit positions, need to be clever */ |
205 | OPTBIT_f = 20, | 205 | OPTBIT_f = 20, |
206 | USE_FOR_MMU( OPTBIT_b,) | 206 | USE_FOR_MMU( OPTBIT_b,) |
207 | USE_FEATURE_UDHCPC_ARPING(OPTBIT_a,) | 207 | IF_FEATURE_UDHCPC_ARPING(OPTBIT_a,) |
208 | USE_FEATURE_UDHCP_PORT( OPTBIT_P,) | 208 | IF_FEATURE_UDHCP_PORT( OPTBIT_P,) |
209 | USE_FOR_MMU( OPT_b = 1 << OPTBIT_b,) | 209 | USE_FOR_MMU( OPT_b = 1 << OPTBIT_b,) |
210 | USE_FEATURE_UDHCPC_ARPING(OPT_a = 1 << OPTBIT_a,) | 210 | IF_FEATURE_UDHCPC_ARPING(OPT_a = 1 << OPTBIT_a,) |
211 | USE_FEATURE_UDHCP_PORT( OPT_P = 1 << OPTBIT_P,) | 211 | IF_FEATURE_UDHCP_PORT( OPT_P = 1 << OPTBIT_P,) |
212 | }; | 212 | }; |
213 | 213 | ||
214 | /* Default options. */ | 214 | /* Default options. */ |
215 | USE_FEATURE_UDHCP_PORT(SERVER_PORT = 67;) | 215 | IF_FEATURE_UDHCP_PORT(SERVER_PORT = 67;) |
216 | USE_FEATURE_UDHCP_PORT(CLIENT_PORT = 68;) | 216 | IF_FEATURE_UDHCP_PORT(CLIENT_PORT = 68;) |
217 | client_config.interface = "eth0"; | 217 | client_config.interface = "eth0"; |
218 | client_config.script = DEFAULT_SCRIPT; | 218 | client_config.script = DEFAULT_SCRIPT; |
219 | 219 | ||
220 | /* Parse command line */ | 220 | /* Parse command line */ |
221 | /* Cc: mutually exclusive; O: list; -T,-t,-A take numeric param */ | 221 | /* Cc: mutually exclusive; O: list; -T,-t,-A take numeric param */ |
222 | opt_complementary = "c--C:C--c:O::T+:t+:A+"; | 222 | opt_complementary = "c--C:C--c:O::T+:t+:A+"; |
223 | USE_GETOPT_LONG(applet_long_options = udhcpc_longopts;) | 223 | IF_GETOPT_LONG(applet_long_options = udhcpc_longopts;) |
224 | opt = getopt32(argv, "c:CV:H:h:F:i:np:qRr:s:T:t:vSA:O:of" | 224 | opt = getopt32(argv, "c:CV:H:h:F:i:np:qRr:s:T:t:vSA:O:of" |
225 | USE_FOR_MMU("b") | 225 | USE_FOR_MMU("b") |
226 | USE_FEATURE_UDHCPC_ARPING("a") | 226 | IF_FEATURE_UDHCPC_ARPING("a") |
227 | USE_FEATURE_UDHCP_PORT("P:") | 227 | IF_FEATURE_UDHCP_PORT("P:") |
228 | , &str_c, &str_V, &str_h, &str_h, &str_F | 228 | , &str_c, &str_V, &str_h, &str_h, &str_F |
229 | , &client_config.interface, &client_config.pidfile, &str_r /* i,p */ | 229 | , &client_config.interface, &client_config.pidfile, &str_r /* i,p */ |
230 | , &client_config.script /* s */ | 230 | , &client_config.script /* s */ |
231 | , &discover_timeout, &discover_retries, &tryagain_timeout /* T,t,A */ | 231 | , &discover_timeout, &discover_retries, &tryagain_timeout /* T,t,A */ |
232 | , &list_O | 232 | , &list_O |
233 | USE_FEATURE_UDHCP_PORT(, &str_P) | 233 | IF_FEATURE_UDHCP_PORT(, &str_P) |
234 | ); | 234 | ); |
235 | if (opt & OPT_c) | 235 | if (opt & OPT_c) |
236 | client_config.clientid = alloc_dhcp_option(DHCP_CLIENT_ID, str_c, 0); | 236 | client_config.clientid = alloc_dhcp_option(DHCP_CLIENT_ID, str_c, 0); |