busybox/networking/udhcp
James Byrne 253c4e787a Optionally re-introduce bb_info_msg()
Between Busybox 1.24.2 and 1.25.0 the bb_info_msg() function was
eliminated and calls to it changed to be bb_error_msg(). The downside of
this is that daemons now log all messages to syslog at the LOG_ERR level
which makes it hard to filter errors from informational messages.

This change optionally re-introduces bb_info_msg(), controlled by a new
option FEATURE_SYSLOG_INFO, restores all the calls to bb_info_msg() that
were removed (only in applets that set logmode to LOGMODE_SYSLOG or
LOGMODE_BOTH), and also changes informational messages in ifplugd and
ntpd.

The code size change of this is as follows (using 'defconfig' on x86_64
with gcc 7.3.0-27ubuntu1~18.04)

function                                             old     new   delta
bb_info_msg                                            -     182    +182
bb_vinfo_msg                                           -      27     +27
static.log7                                          194     198      +4
log8                                                 190     191      +1
log5                                                 190     191      +1
crondlog                                              45       -     -45
------------------------------------------------------------------------------
(add/remove: 2/1 grow/shrink: 3/0 up/down: 215/-45)           Total: 170 bytes

If you don't care about everything being logged at LOG_ERR level
then when FEATURE_SYSLOG_INFO is disabled Busybox actually gets smaller:

function                                             old     new   delta
static.log7                                          194     200      +6
log8                                                 190     193      +3
log5                                                 190     193      +3
syslog_level                                           1       -      -1
bb_verror_msg                                        583     581      -2
crondlog                                              45       -     -45
------------------------------------------------------------------------------
(add/remove: 0/2 grow/shrink: 3/1 up/down: 12/-48)            Total: -36 bytes

Signed-off-by: James Byrne <james.byrne@origamienergy.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2019-04-30 10:51:27 +02:00
..
arpping.c dhcp: merge leases.c and static_leases.c into dhcpd.c 2016-10-04 00:56:58 +02:00
common.c Optionally re-introduce bb_info_msg() 2019-04-30 10:51:27 +02:00
common.h Optionally re-introduce bb_info_msg() 2019-04-30 10:51:27 +02:00
Config.src config: add size information for three more applets 2018-12-28 13:37:44 +01:00
d6_common.h udhcpc6: code shrink 2019-04-14 17:01:10 +02:00
d6_dhcpc.c Optionally re-introduce bb_info_msg() 2019-04-30 10:51:27 +02:00
d6_packet.c Optionally re-introduce bb_info_msg() 2019-04-30 10:51:27 +02:00
d6_socket.c udhcpc6: code shrink 2019-04-14 17:01:10 +02:00
dhcpc.c Optionally re-introduce bb_info_msg() 2019-04-30 10:51:27 +02:00
dhcpc.h udhcpc6: make -O OPT work 2017-06-28 19:18:17 +02:00
dhcpd.c Optionally re-introduce bb_info_msg() 2019-04-30 10:51:27 +02:00
dhcpd.h dhcp: merge leases.c and static_leases.c into dhcpd.c 2016-10-04 00:56:58 +02:00
dhcprelay.c dhcprelay: code shrink 2018-01-08 10:14:17 +01:00
domain_codec.c whitespace and comment format fixes, no code changes 2017-10-05 14:40:24 +02:00
dumpleases.c getopt32: remove opt_complementary 2017-08-08 21:55:02 +02:00
Kbuild.src fix breakage found by mass one-applet builds 2016-12-23 02:42:26 +01:00
packet.c Optionally re-introduce bb_info_msg() 2019-04-30 10:51:27 +02:00
signalpipe.c udhcpd: fix "not dying on SIGTERM" 2018-03-10 19:34:39 +01:00
socket.c udhcpc: downgrade "MAC X:X:X:X:X:X" message to log2 level 2017-07-24 13:37:38 +02:00