mirror of
https://github.com/sheumann/hush.git
synced 2025-01-03 16:29:50 +00:00
patch from John Hall <john.hall@optionexist.co.uk> to change the
klogd specific messages to facility LOG_SYSLOG and tidies up some of the priorities.
This commit is contained in:
parent
420b208a45
commit
06c35da6af
@ -55,7 +55,7 @@ static void klogd_signal(int sig)
|
|||||||
klogctl(7, NULL, 0);
|
klogctl(7, NULL, 0);
|
||||||
klogctl(0, 0, 0);
|
klogctl(0, 0, 0);
|
||||||
/* logMessage(0, "Kernel log daemon exiting."); */
|
/* logMessage(0, "Kernel log daemon exiting."); */
|
||||||
syslog_msg(LOG_DAEMON, 0, "Kernel log daemon exiting.");
|
syslog_msg(LOG_SYSLOG, LOG_NOTICE, "Kernel log daemon exiting.");
|
||||||
exit(TRUE);
|
exit(TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ static void doKlogd(void)
|
|||||||
/* "Open the log. Currently a NOP." */
|
/* "Open the log. Currently a NOP." */
|
||||||
klogctl(1, NULL, 0);
|
klogctl(1, NULL, 0);
|
||||||
|
|
||||||
syslog_msg(LOG_DAEMON, 0, "klogd started: " BB_BANNER);
|
syslog_msg(LOG_SYSLOG, LOG_NOTICE, "klogd started: " BB_BANNER);
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
/* Use kernel syscalls */
|
/* Use kernel syscalls */
|
||||||
@ -90,7 +90,7 @@ static void doKlogd(void)
|
|||||||
snprintf(message, 79,
|
snprintf(message, 79,
|
||||||
"klogd: Error return from sys_sycall: %d - %s.\n", errno,
|
"klogd: Error return from sys_sycall: %d - %s.\n", errno,
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
syslog_msg(LOG_DAEMON, LOG_SYSLOG | LOG_ERR, message);
|
syslog_msg(LOG_SYSLOG, LOG_ERR, message);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ static void doKlogd(void)
|
|||||||
}
|
}
|
||||||
if (log_buffer[i] == '\n') {
|
if (log_buffer[i] == '\n') {
|
||||||
log_buffer[i] = '\0'; /* zero terminate this message */
|
log_buffer[i] = '\0'; /* zero terminate this message */
|
||||||
syslog_msg(LOG_DAEMON, LOG_KERN | priority, start);
|
syslog_msg(LOG_KERN, priority, start);
|
||||||
start = &log_buffer[i + 1];
|
start = &log_buffer[i + 1];
|
||||||
priority = LOG_INFO;
|
priority = LOG_INFO;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user