diff options
Diffstat (limited to 'plugins/imklog')
-rw-r--r-- | plugins/imklog/linux.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/plugins/imklog/linux.c b/plugins/imklog/linux.c index d00723dd..32cf70c4 100644 --- a/plugins/imklog/linux.c +++ b/plugins/imklog/linux.c @@ -146,9 +146,7 @@ static enum LOGSRC GetKernelLogSrc(void) if ( (kmsg = open(_PATH_KLOG, O_RDONLY)) < 0 ) { - char sz[512]; - snprintf(sz, sizeof(sz), "imklog: Cannot open proc file system, %d - %s.\n", errno, strerror(errno)); - logmsgInternal(LOG_SYSLOG|LOG_ERR, sz, ADDDATE); + imklogLogIntMsg(LOG_ERR, "imklog: Cannot open proc file system, %d.\n", errno); ksyslog(7, NULL, 0); /* TODO: check this, implement more */ return(none); } @@ -427,11 +425,9 @@ static void LogKernelLine(void) memset(log_buffer, '\0', sizeof(log_buffer)); if ( (rdcnt = ksyslog(2, log_buffer, sizeof(log_buffer)-1)) < 0 ) { - char sz[512]; if(errno == EINTR) return; - snprintf(sz, sizeof(sz), "imklog: Error return from sys_sycall: %d - %s\n", errno, strerror(errno)); - logmsgInternal(LOG_SYSLOG|LOG_ERR, sz, ADDDATE); + imklogLogIntMsg(LOG_ERR, "imklog Error return from sys_sycall: %d\n", errno); } else LogLine(log_buffer, rdcnt); |