aboutsummaryrefslogtreecommitdiff
path: root/runit/svlogd.c
diff options
context:
space:
mode:
Diffstat (limited to 'runit/svlogd.c')
-rw-r--r--runit/svlogd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/runit/svlogd.c b/runit/svlogd.c
index dbe8df65c..7cae81cb2 100644
--- a/runit/svlogd.c
+++ b/runit/svlogd.c
@@ -155,6 +155,7 @@ log message, you can use a pattern like this instead
155 155
156#include <sys/file.h> 156#include <sys/file.h>
157#include "libbb.h" 157#include "libbb.h"
158#include "common_bufsiz.h"
158#include "runit_lib.h" 159#include "runit_lib.h"
159 160
160#define LESS(a,b) ((int)((unsigned)(b) - (unsigned)(a)) > 0) 161#define LESS(a,b) ((int)((unsigned)(b) - (unsigned)(a)) > 0)
@@ -233,7 +234,9 @@ struct globals {
233#define blocked_sigset (G.blocked_sigset) 234#define blocked_sigset (G.blocked_sigset)
234#define fl_flag_0 (G.fl_flag_0 ) 235#define fl_flag_0 (G.fl_flag_0 )
235#define dirn (G.dirn ) 236#define dirn (G.dirn )
237#define line bb_common_bufsiz1
236#define INIT_G() do { \ 238#define INIT_G() do { \
239 setup_common_bufsiz(); \
237 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \ 240 SET_PTR_TO_GLOBALS(xzalloc(sizeof(G))); \
238 linemax = 1000; \ 241 linemax = 1000; \
239 /*buflen = 1024;*/ \ 242 /*buflen = 1024;*/ \
@@ -241,8 +244,6 @@ struct globals {
241 replace = ""; \ 244 replace = ""; \
242} while (0) 245} while (0)
243 246
244#define line bb_common_bufsiz1
245
246 247
247#define FATAL "fatal: " 248#define FATAL "fatal: "
248#define WARNING "warning: " 249#define WARNING "warning: "
@@ -1045,9 +1046,9 @@ int svlogd_main(int argc, char **argv)
1045 } 1046 }
1046 if (opt & 2) if (!repl) repl = '_'; // -R 1047 if (opt & 2) if (!repl) repl = '_'; // -R
1047 if (opt & 4) { // -l 1048 if (opt & 4) { // -l
1048 linemax = xatou_range(l, 0, BUFSIZ-26); 1049 linemax = xatou_range(l, 0, COMMON_BUFSIZE-26);
1049 if (linemax == 0) 1050 if (linemax == 0)
1050 linemax = BUFSIZ-26; 1051 linemax = COMMON_BUFSIZE-26;
1051 if (linemax < 256) 1052 if (linemax < 256)
1052 linemax = 256; 1053 linemax = 256;
1053 } 1054 }