From d4a5e255c479647d172c9d7d7f61049277b7c0b9 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 19 Dec 2003 11:32:14 +0000 Subject: Patch from Fillod Stephane: You will find in the attached file "syslog.patch" a patch which adds config options to set at compile time the size of the circular buffer, and some documentation update. --- sysklogd/logread.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'sysklogd/logread.c') diff --git a/sysklogd/logread.c b/sysklogd/logread.c index 524178fe8..207e78b57 100644 --- a/sysklogd/logread.c +++ b/sysklogd/logread.c @@ -108,8 +108,7 @@ extern int logread_main(int argc, char **argv) i = follow ? buf->tail : buf->head; do { -#undef RC_LOGREAD -#ifdef RC_LOGREAD +#ifdef CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING char *buf_data; int log_len,j; #endif @@ -128,7 +127,7 @@ extern int logread_main(int argc, char **argv) } // Read Memory -#ifdef RC_LOGREAD +#ifdef CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING log_len = buf->tail - i; if (log_len < 0) log_len += buf->size; @@ -155,7 +154,7 @@ extern int logread_main(int argc, char **argv) // release the lock on the log chain sem_up(log_semid); -#ifdef RC_LOGREAD +#ifdef CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING for (j=0; j < log_len; j+=strlen(buf_data+j)+1) { printf("%s", buf_data+j); if (follow) -- cgit v1.2.3-55-g6feb