diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-12-19 11:32:14 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-12-19 11:32:14 +0000 |
commit | d4a5e255c479647d172c9d7d7f61049277b7c0b9 (patch) | |
tree | 7931e79c7b1cc3c4d8804c39da6dc6cf9fb667ab /sysklogd/logread.c | |
parent | 3752d337b3b8e704f1fe27451d481eae85d64f48 (diff) | |
download | busybox-w32-d4a5e255c479647d172c9d7d7f61049277b7c0b9.tar.gz busybox-w32-d4a5e255c479647d172c9d7d7f61049277b7c0b9.tar.bz2 busybox-w32-d4a5e255c479647d172c9d7d7f61049277b7c0b9.zip |
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.
Diffstat (limited to 'sysklogd/logread.c')
-rw-r--r-- | sysklogd/logread.c | 7 |
1 files changed, 3 insertions, 4 deletions
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) | |||
108 | i = follow ? buf->tail : buf->head; | 108 | i = follow ? buf->tail : buf->head; |
109 | 109 | ||
110 | do { | 110 | do { |
111 | #undef RC_LOGREAD | 111 | #ifdef CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING |
112 | #ifdef RC_LOGREAD | ||
113 | char *buf_data; | 112 | char *buf_data; |
114 | int log_len,j; | 113 | int log_len,j; |
115 | #endif | 114 | #endif |
@@ -128,7 +127,7 @@ extern int logread_main(int argc, char **argv) | |||
128 | } | 127 | } |
129 | 128 | ||
130 | // Read Memory | 129 | // Read Memory |
131 | #ifdef RC_LOGREAD | 130 | #ifdef CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING |
132 | log_len = buf->tail - i; | 131 | log_len = buf->tail - i; |
133 | if (log_len < 0) | 132 | if (log_len < 0) |
134 | log_len += buf->size; | 133 | log_len += buf->size; |
@@ -155,7 +154,7 @@ extern int logread_main(int argc, char **argv) | |||
155 | // release the lock on the log chain | 154 | // release the lock on the log chain |
156 | sem_up(log_semid); | 155 | sem_up(log_semid); |
157 | 156 | ||
158 | #ifdef RC_LOGREAD | 157 | #ifdef CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING |
159 | for (j=0; j < log_len; j+=strlen(buf_data+j)+1) { | 158 | for (j=0; j < log_len; j+=strlen(buf_data+j)+1) { |
160 | printf("%s", buf_data+j); | 159 | printf("%s", buf_data+j); |
161 | if (follow) | 160 | if (follow) |