diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2010-04-12 17:09:50 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2010-04-12 17:09:50 +0200 |
commit | 2a8d484a73654c26e427a11fb10162a41a7be79d (patch) | |
tree | 80edec55637063ca2d05052d8bcfb43ee1fbfa75 /plugins/imklog/solaris.c | |
parent | 7053a438efd07361b6e33de4bdf254b1d3b58553 (diff) | |
download | rsyslog-2a8d484a73654c26e427a11fb10162a41a7be79d.tar.gz rsyslog-2a8d484a73654c26e427a11fb10162a41a7be79d.tar.xz rsyslog-2a8d484a73654c26e427a11fb10162a41a7be79d.zip |
some cleanup of solaris imklog
Diffstat (limited to 'plugins/imklog/solaris.c')
-rw-r--r-- | plugins/imklog/solaris.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/plugins/imklog/solaris.c b/plugins/imklog/solaris.c index c2aec30a..8a6d5af1 100644 --- a/plugins/imklog/solaris.c +++ b/plugins/imklog/solaris.c @@ -42,6 +42,7 @@ #include "rsyslog.h" #include "imklog.h" +#include "srUtils.h" #include "unicode-helper.h" #include "solaris_cddl.h" @@ -70,8 +71,8 @@ klogWillRun(void) char errStr[1024]; int err = errno; rs_strerror_r(err, errStr, sizeof(errStr)); - DBGPRINTF("error %d opening log socket: %s\n", - GetPath(), errStr); + DBGPRINTF("error %s opening log socket: %s\n", + errStr, GetPath()); iRet = RS_RET_ERR; // TODO: better error code } @@ -79,6 +80,7 @@ klogWillRun(void) } +#if 0 /* Read /dev/klog while data are available, split into lines. * Contrary to standard BSD syslogd, we do a blocking read. We can * afford this as imklog is running on its own threads. So if we have @@ -125,7 +127,7 @@ readklog(void) break; } - for (p = pRcv; (q = strchr(p, '\n')) != NULL; p = q + 1) { + for(p = pRcv; (q = strchr(p, '\n')) != NULL; p = q + 1) { *q = '\0'; Syslog(LOG_INFO, (uchar*) p); } @@ -143,6 +145,7 @@ readklog(void) if(pRcv != NULL && (size_t) iMaxLine >= sizeof(bufRcv) - 1) free(pRcv); } +#endif /* to be called in the module's AfterRun entry point |