diff options
author | Denys Vlasenko | 2016-03-30 18:41:23 +0200 |
---|---|---|
committer | Denys Vlasenko | 2016-03-30 18:41:23 +0200 |
commit | 8f2e99c813dcac25faf58162ed18848a02888ff6 (patch) | |
tree | b8e0371701511e7600aad1874c0871148331a36f /libbb | |
parent | 80f0f1d712fb3ab236e1fc8b37dfa7a9224d7849 (diff) | |
download | busybox-8f2e99c813dcac25faf58162ed18848a02888ff6.zip busybox-8f2e99c813dcac25faf58162ed18848a02888ff6.tar.gz |
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 'libbb')
-rw-r--r-- | libbb/Kbuild.src | 1 | ||||
-rw-r--r-- | libbb/info_msg.c | 62 |
2 files changed, 0 insertions, 63 deletions
diff --git a/libbb/Kbuild.src b/libbb/Kbuild.src index 7fb6872..b08ce11 100644 --- a/libbb/Kbuild.src +++ b/libbb/Kbuild.src @@ -46,7 +46,6 @@ lib-y += get_volsize.o lib-y += herror_msg.o lib-y += human_readable.o lib-y += inet_common.o -lib-y += info_msg.o lib-y += inode_hash.o lib-y += isdirectory.o lib-y += kernel_version.o diff --git a/libbb/info_msg.c b/libbb/info_msg.c deleted file mode 100644 index 56ca2ef..0000000 --- a/libbb/info_msg.c +++ /dev/null @@ -1,62 +0,0 @@ -/* vi: set sw=4 ts=4: */ -/* - * Utility routines. - * - * Copyright (C) 1999-2004 by Erik Andersen <andersen@codepoet.org> - * - * Licensed under GPLv2 or later, see file LICENSE in this source tree. - */ - -#include "libbb.h" -#if ENABLE_FEATURE_SYSLOG -# include <syslog.h> -#endif - -void FAST_FUNC bb_info_msg(const char *s, ...) -{ -#ifdef THIS_ONE_DOESNT_DO_SINGLE_WRITE - va_list p; - /* va_copy is used because it is not portable - * to use va_list p twice */ - va_list p2; - - va_start(p, s); - va_copy(p2, p); - if (logmode & LOGMODE_STDIO) { - vprintf(s, p); - fputs(msg_eol, stdout); - } -# if ENABLE_FEATURE_SYSLOG - if (logmode & LOGMODE_SYSLOG) - vsyslog(LOG_INFO, s, p2); -# endif - va_end(p2); - va_end(p); -#else - int used; - char *msg; - va_list p; - - if (logmode == 0) - return; - - va_start(p, s); - used = vasprintf(&msg, s, p); - va_end(p); - if (used < 0) - return; - -# if ENABLE_FEATURE_SYSLOG - if (logmode & LOGMODE_SYSLOG) - syslog(LOG_INFO, "%s", msg); -# endif - if (logmode & LOGMODE_STDIO) { - fflush_all(); - /* used = strlen(msg); - must be true already */ - msg[used++] = '\n'; - full_write(STDOUT_FILENO, msg, used); - } - - free(msg); -#endif -} |