diff options
author | Eric Andersen <andersen@codepoet.org> | 2004-06-25 11:23:03 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2004-06-25 11:23:03 +0000 |
commit | 0373cf1396ad3c6906c7c4a12b90fb2685eda851 (patch) | |
tree | c698d1f8cd88d83387c457479ffb4492a74829b9 | |
parent | 774e6cc29c5c07670028461d8486cde6c2f744ea (diff) | |
download | busybox-w32-0373cf1396ad3c6906c7c4a12b90fb2685eda851.tar.gz busybox-w32-0373cf1396ad3c6906c7c4a12b90fb2685eda851.tar.bz2 busybox-w32-0373cf1396ad3c6906c7c4a12b90fb2685eda851.zip |
Do not mess with the console logging level unless
asked to do so.
-Erik
-rw-r--r-- | sysklogd/klogd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sysklogd/klogd.c b/sysklogd/klogd.c index 9f07d6743..94376fe52 100644 --- a/sysklogd/klogd.c +++ b/sysklogd/klogd.c | |||
@@ -51,8 +51,8 @@ static void klogd_signal(int sig) | |||
51 | exit(EXIT_SUCCESS); | 51 | exit(EXIT_SUCCESS); |
52 | } | 52 | } |
53 | 53 | ||
54 | static void doKlogd(const char console_log_level) __attribute__ ((noreturn)); | 54 | static void doKlogd(const int console_log_level) __attribute__ ((noreturn)); |
55 | static void doKlogd(const char console_log_level) | 55 | static void doKlogd(const int console_log_level) |
56 | { | 56 | { |
57 | int priority = LOG_INFO; | 57 | int priority = LOG_INFO; |
58 | char log_buffer[4096]; | 58 | char log_buffer[4096]; |
@@ -71,7 +71,7 @@ static void doKlogd(const char console_log_level) | |||
71 | klogctl(1, NULL, 0); | 71 | klogctl(1, NULL, 0); |
72 | 72 | ||
73 | /* Set level of kernel console messaging.. */ | 73 | /* Set level of kernel console messaging.. */ |
74 | if (console_log_level) | 74 | if (console_log_level != -1) |
75 | klogctl(8, NULL, console_log_level); | 75 | klogctl(8, NULL, console_log_level); |
76 | 76 | ||
77 | syslog(LOG_NOTICE, "klogd started: " BB_BANNER); | 77 | syslog(LOG_NOTICE, "klogd started: " BB_BANNER); |
@@ -83,7 +83,7 @@ static void doKlogd(const char console_log_level) | |||
83 | if (n < 0) { | 83 | if (n < 0) { |
84 | if (errno == EINTR) | 84 | if (errno == EINTR) |
85 | continue; | 85 | continue; |
86 | syslog(LOG_ERR, "klogd: Error return from sys_sycall: %d - %s.\n", errno, strerror(errno)); | 86 | syslog(LOG_ERR, "klogd: Error return from sys_sycall: %d - %m.\n", errno); |
87 | exit(EXIT_FAILURE); | 87 | exit(EXIT_FAILURE); |
88 | } | 88 | } |
89 | 89 | ||
@@ -118,7 +118,7 @@ extern int klogd_main(int argc, char **argv) | |||
118 | /* no options, no getopt */ | 118 | /* no options, no getopt */ |
119 | int opt; | 119 | int opt; |
120 | int doFork = TRUE; | 120 | int doFork = TRUE; |
121 | unsigned char console_log_level = 7; | 121 | unsigned char console_log_level = -1; |
122 | 122 | ||
123 | /* do normal option parsing */ | 123 | /* do normal option parsing */ |
124 | while ((opt = getopt(argc, argv, "c:n")) > 0) { | 124 | while ((opt = getopt(argc, argv, "c:n")) > 0) { |