aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMark Whitley <markw@lineo.com>2001-03-12 22:51:50 +0000
committerMark Whitley <markw@lineo.com>2001-03-12 22:51:50 +0000
commit6317c4baf79c25d7f77897b064eb4f0b7d9f070e (patch)
tree5fc8fe65a4903f6224925a72b53a4f46e2b0b1d3 /include
parent4987bbf97924044c88007c45ee2674d97b93ad92 (diff)
downloadbusybox-6317c4baf79c25d7f77897b064eb4f0b7d9f070e.tar.gz
Applied patch from Gennady Feldman to split up syslogd.c into syslogd and
klogd (as it should be).
Diffstat (limited to 'include')
-rw-r--r--include/applets.h6
-rw-r--r--include/busybox.h5
-rw-r--r--include/usage.h23
3 files changed, 26 insertions, 8 deletions
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" \