syslogd: make maximum message length configurable
authorJanne Kiviluoto <janne.kiviluoto@bluegiga.com>
Wed, 31 Mar 2010 13:58:58 +0000 (15:58 +0200)
committerDenys Vlasenko <vda.linux@googlemail.com>
Wed, 31 Mar 2010 13:58:58 +0000 (15:58 +0200)
Signed-off-by: Janne Kiviluoto <janne.kiviluoto@bluegiga.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
sysklogd/Config.in
sysklogd/syslogd.c

index 0664be08d341c0b12878a50decf53adaf2a4d904..0d819e19554c152afa05755c4d5fc0524082ab57 100644 (file)
@@ -50,6 +50,16 @@ config FEATURE_SYSLOGD_DUP
          Option -D instructs syslogd to drop consecutive messages
          which are totally the same.
 
+config FEATURE_SYSLOGD_READ_BUFFER_SIZE
+       int "Read buffer size in bytes"
+       default 256
+       range 256 20000
+       depends on SYSLOGD
+       help
+         This option sets the size of the syslog read buffer.
+         Actual memory usage increases around five times the
+         change done here.
+
 config FEATURE_IPC_SYSLOG
        bool "Circular Buffer support"
        default n
index 33203697d37373b90553de27f6145cb7d207e8a8..6bc450bf998bc0fe696ce928e4486eacf08fc957 100644 (file)
@@ -46,7 +46,7 @@
 #undef SYSLOGD_WRLOCK
 
 enum {
-       MAX_READ = 256,
+       MAX_READ = CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE,
        DNS_WAIT_SEC = 2 * 60,
 };