diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-03-30 18:41:23 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2016-03-30 18:41:23 +0200 |
commit | 8f2e99c813dcac25faf58162ed18848a02888ff6 (patch) | |
tree | b8e0371701511e7600aad1874c0871148331a36f /networking/udhcp/common.c | |
parent | 80f0f1d712fb3ab236e1fc8b37dfa7a9224d7849 (diff) | |
download | busybox-w32-8f2e99c813dcac25faf58162ed18848a02888ff6.tar.gz busybox-w32-8f2e99c813dcac25faf58162ed18848a02888ff6.tar.bz2 busybox-w32-8f2e99c813dcac25faf58162ed18848a02888ff6.zip |
udhcp: get rid of bb_info_msg()
function old new delta
udhcpd_main 1501 1531 +30
d6_recv_raw_packet 251 264 +13
perform_d6_release 188 198 +10
udhcpc6_main 2443 2449 +6
udhcp_recv_raw_packet 582 588 +6
udhcp_recv_kernel_packet 132 138 +6
send_d6_renew 140 146 +6
d6_recv_kernel_packet 118 124 +6
send_renew 77 82 +5
send_discover 85 90 +5
send_decline 84 89 +5
send_d6_select 97 102 +5
send_d6_discover 174 179 +5
perform_release 167 172 +5
count_lines 72 74 +2
udhcpc_main 2836 2837 +1
bb_info_msg 125 - -125
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 17/4 up/down: 117/-180) Total: -63 bytes
text data bss dec hex filename
924935 906 17160 943001 e6399 busybox_old
924736 906 17160 942802 e62d2 busybox_unstripped
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'networking/udhcp/common.c')
-rw-r--r-- | networking/udhcp/common.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/networking/udhcp/common.c b/networking/udhcp/common.c index 680852ce4..1c1863451 100644 --- a/networking/udhcp/common.c +++ b/networking/udhcp/common.c | |||
@@ -183,7 +183,7 @@ static void log_option(const char *pfx, const uint8_t *opt) | |||
183 | if (dhcp_verbose >= 2) { | 183 | if (dhcp_verbose >= 2) { |
184 | char buf[256 * 2 + 2]; | 184 | char buf[256 * 2 + 2]; |
185 | *bin2hex(buf, (void*) (opt + OPT_DATA), opt[OPT_LEN]) = '\0'; | 185 | *bin2hex(buf, (void*) (opt + OPT_DATA), opt[OPT_LEN]) = '\0'; |
186 | bb_info_msg("%s: 0x%02x %s", pfx, opt[OPT_CODE], buf); | 186 | bb_error_msg("%s: 0x%02x %s", pfx, opt[OPT_CODE], buf); |
187 | } | 187 | } |
188 | } | 188 | } |
189 | #else | 189 | #else |
@@ -269,7 +269,7 @@ uint8_t* FAST_FUNC udhcp_get_option(struct dhcp_packet *packet, int code) | |||
269 | } | 269 | } |
270 | 270 | ||
271 | /* log3 because udhcpc uses it a lot - very noisy */ | 271 | /* log3 because udhcpc uses it a lot - very noisy */ |
272 | log3("Option 0x%02x not found", code); | 272 | log3("option 0x%02x not found", code); |
273 | return NULL; | 273 | return NULL; |
274 | } | 274 | } |
275 | 275 | ||
@@ -402,7 +402,7 @@ static NOINLINE void attach_option( | |||
402 | struct option_set *new, **curr; | 402 | struct option_set *new, **curr; |
403 | 403 | ||
404 | /* make a new option */ | 404 | /* make a new option */ |
405 | log2("Attaching option %02x to list", optflag->code); | 405 | log2("attaching option %02x to list", optflag->code); |
406 | new = xmalloc(sizeof(*new)); | 406 | new = xmalloc(sizeof(*new)); |
407 | new->data = xmalloc(length + OPT_DATA); | 407 | new->data = xmalloc(length + OPT_DATA); |
408 | new->data[OPT_CODE] = optflag->code; | 408 | new->data[OPT_CODE] = optflag->code; |
@@ -422,7 +422,7 @@ static NOINLINE void attach_option( | |||
422 | unsigned old_len; | 422 | unsigned old_len; |
423 | 423 | ||
424 | /* add it to an existing option */ | 424 | /* add it to an existing option */ |
425 | log2("Attaching option %02x to existing member of list", optflag->code); | 425 | log2("attaching option %02x to existing member of list", optflag->code); |
426 | old_len = existing->data[OPT_LEN]; | 426 | old_len = existing->data[OPT_LEN]; |
427 | if (old_len + length < 255) { | 427 | if (old_len + length < 255) { |
428 | /* actually 255 is ok too, but adding a space can overlow it */ | 428 | /* actually 255 is ok too, but adding a space can overlow it */ |