hush: do not assign to readonly VAR in "VAR=VAL CMD" syntax too
[oweals/busybox.git] / sysklogd / klogd.c
index 03d65b37fb542862aca6199eb290b703034fdc14..4db72110d9d5e51c3a3f38c5b7cfb6ab38463240 100644 (file)
@@ -58,6 +58,7 @@
 //usage:     "\n       -n      Run in foreground"
 
 #include "libbb.h"
+#include "common_bufsiz.h"
 #include <syslog.h>
 
 
@@ -147,7 +148,7 @@ static void klogd_close(void)
 
 #define log_buffer bb_common_bufsiz1
 enum {
-       KLOGD_LOGBUF_SIZE = sizeof(log_buffer),
+       KLOGD_LOGBUF_SIZE = COMMON_BUFSIZE,
        OPT_LEVEL      = (1 << 0),
        OPT_FOREGROUND = (1 << 1),
 };
@@ -173,6 +174,8 @@ int klogd_main(int argc UNUSED_PARAM, char **argv)
        int opt;
        int used;
 
+       setup_common_bufsiz();
+
        opt = getopt32(argv, "c:n", &opt_c);
        if (opt & OPT_LEVEL) {
                /* Valid levels are between 1 and 8 */