From 6317c4baf79c25d7f77897b064eb4f0b7d9f070e Mon Sep 17 00:00:00 2001 From: Mark Whitley Date: Mon, 12 Mar 2001 22:51:50 +0000 Subject: Applied patch from Gennady Feldman to split up syslogd.c into syslogd and klogd (as it should be). --- include/applets.h | 6 ++++++ include/busybox.h | 5 +++++ include/usage.h | 23 +++++++++++++++-------- 3 files changed, 26 insertions(+), 8 deletions(-) (limited to 'include') diff --git a/include/applets.h b/include/applets.h index 36817fef7..b3fb291d7 100644 --- a/include/applets.h +++ b/include/applets.h @@ -191,6 +191,9 @@ #ifdef BB_KILLALL APPLET(killall, kill_main, _BB_DIR_USR_BIN) #endif +#ifdef BB_KLOGD + APPLET(klogd, klogd_main, _BB_DIR_SBIN) +#endif #ifdef BB_LENGTH APPLET(length, length_main, _BB_DIR_USR_BIN) #endif @@ -215,6 +218,9 @@ #ifdef BB_LOGNAME APPLET(logname, logname_main, _BB_DIR_USR_BIN) #endif +#ifdef BB_LOGREAD + APPLET(logread, logread_main, _BB_DIR_SBIN) +#endif #ifdef BB_LS APPLET(ls, ls_main, _BB_DIR_BIN) #endif diff --git a/include/busybox.h b/include/busybox.h index d9362b58b..abf62410f 100644 --- a/include/busybox.h +++ b/include/busybox.h @@ -205,6 +205,11 @@ int nfsmount(const char *spec, const char *node, int *flags, #define RB_POWER_OFF 0x4321fedc #endif +#if defined(BB_KLOGD) || defined(BB_LOGGER) +void syslog_msg_with_name(const char *name, int facility, int pri, const char *msg); +void syslog_msg(int facility, int pri, const char *msg); +#endif + /* Include our own copy of struct sysinfo to avoid binary compatability * problems with Linux 2.4, which changed things. Grumble, grumble. */ struct sysinfo { diff --git a/include/usage.h b/include/usage.h index 8ba86d569..f241d3a04 100644 --- a/include/usage.h +++ b/include/usage.h @@ -468,6 +468,13 @@ "Options:\n" \ "\t-l\tList all signal names and numbers." +#define klogd_trivial_usage \ + "-n" +#define klogd_full_usage \ + "Kernel logger.\n"\ + "Options:\n"\ + "\t-n\tRun as a foreground process." + #define length_trivial_usage \ "STRING" #define length_full_usage \ @@ -513,6 +520,12 @@ #define logname_full_usage \ "Print the name of the current user." +#define logread_trivial_usage \ + "" + +#define logread_full_usage \ + "Shows the messages from syslogd (using circular buffer)." + #ifdef BB_FEATURE_LS_TIMESTAMPS #define USAGE_LS_TIMESTAMPS(a) a #else @@ -913,11 +926,6 @@ "Write all buffered filesystem blocks to disk." -#ifdef BB_FEATURE_KLOGD - #define USAGE_KLOGD(a) a -#else - #define USAGE_KLOGD(a) -#endif #ifdef BB_FEATURE_REMOTE_LOG #define USAGE_REMOTE_LOG(a) a #else @@ -926,12 +934,11 @@ #define syslogd_trivial_usage \ "[OPTION]..." #define syslogd_full_usage \ - "Linux system and kernel (provides klogd) logging utility.\n" \ - "Note that this version of syslogd/klogd ignores /etc/syslog.conf.\n\n" \ + "Linux system and kernel logging utility.\n" \ + "Note that this version of syslogd ignores /etc/syslog.conf.\n\n" \ "Options:\n" \ "\t-m NUM\t\tInterval between MARK lines (default=20min, 0=off)\n" \ "\t-n\t\tRun as a foreground process\n" \ - USAGE_KLOGD("\t-K\t\tDo not start up the klogd process\n") \ "\t-O FILE\t\tUse an alternate log file (default=/var/log/messages)" \ USAGE_REMOTE_LOG( \ "\n\t-R HOST[:PORT]\tLog to IP or hostname on PORT (default PORT=514/UDP)\n" \ -- cgit v1.2.3