Applied patch from Gennady Feldman to split up syslogd.c into syslogd and
klogd (as it should be).
diff --git a/utility.c b/utility.c
index e54a3ea..c557130 100644
--- a/utility.c
+++ b/utility.c
@@ -77,6 +77,10 @@
# endif
#endif
+#if defined(BB_KLOGD) || defined(BB_LOGGER)
+#include <syslog.h>
+#endif
+
static struct BB_applet *applet_using;
extern void show_usage(void)
@@ -1828,6 +1832,20 @@
}
#endif
+#if defined(BB_KLOGD) || defined(BB_LOGGER)
+void syslog_msg_with_name(const char *name, int facility, int pri, const char *msg)
+{
+ openlog(name, 0, facility);
+ syslog(pri, "%s", msg);
+ closelog();
+}
+
+void syslog_msg(int facility, int pri, const char *msg)
+{
+ syslog_msg_with_name(applet_using->name, facility, pri, msg);
+}
+#endif
+
#if defined(BB_SH)
void trim(char *s)
{