[BusyBox-cvs] CVS update of busybox/sysklogd (klogd.c)
Erik Andersen
andersen at codepoet.org
Fri Jun 25 11:23:04 UTC 2004
Date: Friday, June 25, 2004 @ 05:23:04
Author: andersen
Path: /var/cvs/busybox/sysklogd
Modified: klogd.c (1.21 -> 1.22)
Do not mess with the console logging level unless
asked to do so.
-Erik
Index: busybox/sysklogd/klogd.c
diff -u busybox/sysklogd/klogd.c:1.21 busybox/sysklogd/klogd.c:1.22
--- busybox/sysklogd/klogd.c:1.21 Tue Jun 22 04:07:17 2004
+++ busybox/sysklogd/klogd.c Fri Jun 25 05:23:03 2004
@@ -51,8 +51,8 @@
exit(EXIT_SUCCESS);
}
-static void doKlogd(const char console_log_level) __attribute__ ((noreturn));
-static void doKlogd(const char console_log_level)
+static void doKlogd(const int console_log_level) __attribute__ ((noreturn));
+static void doKlogd(const int console_log_level)
{
int priority = LOG_INFO;
char log_buffer[4096];
@@ -71,7 +71,7 @@
klogctl(1, NULL, 0);
/* Set level of kernel console messaging.. */
- if (console_log_level)
+ if (console_log_level != -1)
klogctl(8, NULL, console_log_level);
syslog(LOG_NOTICE, "klogd started: " BB_BANNER);
@@ -83,7 +83,7 @@
if (n < 0) {
if (errno == EINTR)
continue;
- syslog(LOG_ERR, "klogd: Error return from sys_sycall: %d - %s.\n", errno, strerror(errno));
+ syslog(LOG_ERR, "klogd: Error return from sys_sycall: %d - %m.\n", errno);
exit(EXIT_FAILURE);
}
@@ -118,7 +118,7 @@
/* no options, no getopt */
int opt;
int doFork = TRUE;
- unsigned char console_log_level = 7;
+ unsigned char console_log_level = -1;
/* do normal option parsing */
while ((opt = getopt(argc, argv, "c:n")) > 0) {
More information about the busybox-cvs
mailing list