klogd: make it work on non-linux systems

The klogctl() interface allows changing the console loglevel, but is
Linux-specific. The more portable method of reading from _PATH_KLOG is
added as an alternative.

Adapted from the Debian kFreeBSD patch at:
http://svn.debian.org/viewsvn/d-i/people/slackydeb/kfreebsd/busybox/1.14/debian/klogd.diff

Signed-off-by: Jeremie Koenig <jk@jk.fr.eu.org>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Jeremie Koenig
2010-08-01 03:01:44 +02:00
committed by Denys Vlasenko
parent 17662801ec
commit 63c2e7ecc0
2 changed files with 126 additions and 19 deletions

View File

@@ -109,7 +109,6 @@ config FEATURE_LOGREAD_REDUCED_LOCKING
config KLOGD
bool "klogd"
default y
depends on PLATFORM_LINUX
help
klogd is a utility which intercepts and logs all
messages from the Linux kernel and sends the messages
@@ -117,6 +116,22 @@ config KLOGD
you wish to record the messages produced by the kernel,
you should enable this option.
config FEATURE_KLOGD_KLOGCTL
bool "Use the klogctl() interface"
default y
depends on KLOGD && PLATFORM_LINUX
help
The klogd applet supports two interfaces for reading
kernel messages. Linux provides the klogctl() interface
which allows reading messages from the kernel ring buffer
independently from the file system.
If you answer 'N' here, klogd will use the more portable
approach of reading them from /proc or a device node.
However, this method requires the file to be available.
If in doubt, say 'Y'.
config LOGGER
bool "logger"
default y