busybox/miscutils
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
..
adjtimex.c config: update size information 2018-12-28 03:20:17 +01:00
bbconfig.c libarchive: add a function to unpack embedded data 2018-11-02 14:14:51 +01:00
bc.c bc: implement pass-by-reference code from upstream 2019-01-25 16:22:15 +01:00
beep.c config: update size information 2018-12-28 03:20:17 +01:00
chat.c config: update size information 2018-12-28 03:20:17 +01:00
Config.src restore documentation on the build config language 2018-06-06 15:16:48 +02:00
conspy.c getopt32: remove applet_long_options 2017-08-08 17:09:40 +02:00
crond.c Optionally re-introduce bb_info_msg() 2019-04-30 10:51:27 +02:00
crontab.c config: update size information 2018-12-28 03:20:17 +01:00
dc.c dc: fix "small dc" to have standard command line API 2018-12-08 18:59:07 +01:00
devfsd.c Optionally re-introduce bb_info_msg() 2019-04-30 10:51:27 +02:00
devmem.c whitespace and comment format fixes, no code changes 2017-10-05 14:40:24 +02:00
fbsplash.c config: update size information 2018-12-28 03:20:17 +01:00
fbsplash.cfg fbsplash: cosmetic comment and Config text fixes; rename .ini -> .cfg 2008-03-26 15:12:11 +00:00
flash_eraseall.c config: update size information 2018-12-28 03:20:17 +01:00
flash_lock_unlock.c whitespace and comment format fixes, no code changes 2017-10-05 15:33:28 +02:00
flashcp.c config: update size information 2018-12-28 03:20:17 +01:00
hdparm.c config: update size information 2018-12-28 03:20:17 +01:00
hexedit.c config: update size information 2018-12-28 03:20:17 +01:00
i2c_tools.c i2c_tools.c: i2ctransfer 2019-02-11 12:34:13 +01:00
inotifyd.c config: update size information 2018-12-28 03:20:17 +01:00
Kbuild.src Remove trailing empty lines 2016-11-23 10:43:39 +01:00
less.c config: update size information 2018-12-28 03:20:17 +01:00
lsscsi.c config: update size information 2018-12-28 03:20:17 +01:00
makedevs.c config: update size information 2018-12-28 03:20:17 +01:00
man.c man: add "/usr/share/man" as another default MANPATH, fix col override 2019-03-30 17:27:09 +01:00
microcom.c config: update size information 2018-12-28 03:20:17 +01:00
mt.c config: update size information 2018-12-28 03:20:17 +01:00
nandwrite.c config: update size information 2018-12-28 03:20:17 +01:00
partprobe.c config: update size information 2018-12-28 03:20:17 +01:00
raidautorun.c config: update size information 2018-12-28 03:20:17 +01:00
readahead.c config: update size information 2018-12-28 03:20:17 +01:00
rfkill.c config: update size information 2018-12-28 03:20:17 +01:00
runlevel.c config: more tweaks 2018-12-28 17:52:43 +01:00
rx.c config: deindent all help texts 2017-07-21 09:50:55 +02:00
setfattr.c config: update size information 2018-12-28 03:20:17 +01:00
setserial.c config: update size information 2018-12-28 03:20:17 +01:00
strings.c config: update size information 2018-12-28 03:20:17 +01:00
time.c config: update size information 2018-12-28 03:20:17 +01:00
ts.c ts: do call localtime() when neither -s nor -i specified 2019-03-26 11:51:21 +01:00
ttysize.c config: update size information 2018-12-28 03:20:17 +01:00
ubi_tools.c config: update size information 2018-12-28 03:20:17 +01:00
ubirename.c config: update size information 2018-12-28 03:20:17 +01:00
volname.c config: update size information 2018-12-28 03:20:17 +01:00
watchdog.c do not duplicate CONFIG_PID_FILE_PATH and ".pid" strings 2019-03-17 19:48:39 +01:00