Add CONFIG_FEATURE_SYSLOG which controls whether

bb_xx_msg will ever try to send output to syslog.
Add "select CONFIG_FEATURE_SYSLOG" to relevant applets.
This allows to omit syslog code if we do not have
any syslog-capable applets in the build.
This commit is contained in:
Denis Vlasenko 2006-09-07 06:02:39 +00:00
parent b7d8dd9ab1
commit 049d6b8c08
9 changed files with 26 additions and 12 deletions

View file

@ -32,7 +32,7 @@ void bb_verror_msg(const char *s, va_list p, const char* strerr)
else
fprintf(stderr, ": %s\n", strerr);
}
if (logmode & LOGMODE_SYSLOG) {
if (ENABLE_FEATURE_SYSLOG & (logmode & LOGMODE_SYSLOG)) {
if (!strerr)
vsyslog(LOG_ERR, s, p2);
else {

View file

@ -24,7 +24,7 @@ void bb_vinfo_msg(const char *s, va_list p)
vprintf(s, p);
putchar('\n');
}
if (logmode & LOGMODE_SYSLOG)
if (ENABLE_FEATURE_SYSLOG & (logmode & LOGMODE_SYSLOG))
vsyslog(LOG_INFO, s, p2);
va_end(p2);
}