X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=libbb%2Finfo_msg.c;h=ffef05e54636a9305322743fcd8baa45ddb19398;hb=9579d87be4ab9b02195749c15a2112e2a4466ab4;hp=c763ce60cf65a52a8ade72ac760239d3ecd9d3c1;hpb=0de3c55b4286498753751b7cd63f3af12f0ebd0f;p=oweals%2Fbusybox.git diff --git a/libbb/info_msg.c b/libbb/info_msg.c index c763ce60c..ffef05e54 100644 --- a/libbb/info_msg.c +++ b/libbb/info_msg.c @@ -8,12 +8,23 @@ */ #include "libbb.h" +#include -void bb_info_msg(const char *s, ...) +void FAST_FUNC bb_info_msg(const char *s, ...) { 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); - bb_vinfo_msg(s, p); + va_copy(p2, p); + if (logmode & LOGMODE_STDIO) { + vprintf(s, p); + fputs(msg_eol, stdout); + } + if (ENABLE_FEATURE_SYSLOG && (logmode & LOGMODE_SYSLOG)) + vsyslog(LOG_INFO, s, p2); + va_end(p2); va_end(p); }