From fd6ba2d621a014eb0faf1c8a4160f93b669f6eb1 Mon Sep 17 00:00:00 2001 From: laforge Date: Sat, 5 Nov 2005 15:29:03 +0000 Subject: add 'sync' config option --- output/ulogd_output_OPRINT.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'output') diff --git a/output/ulogd_output_OPRINT.c b/output/ulogd_output_OPRINT.c index f44c8a0..b6f38bd 100644 --- a/output/ulogd_output_OPRINT.c +++ b/output/ulogd_output_OPRINT.c @@ -86,17 +86,26 @@ static int oprint_interp(struct ulogd_pluginstance *upi) break; } } + if (upi->config_kset->ces[1].u.value != 0) + fflush(opi->of); + return 0; } static struct config_keyset oprint_kset = { - .num_ces = 1, + .num_ces = 2, .ces = { { - .key = "file", - .type = CONFIG_TYPE_STRING, - .options = CONFIG_OPT_NONE, - .u = {.string = ULOGD_OPRINT_DEFAULT }, + .key = "file", + .type = CONFIG_TYPE_STRING, + .options = CONFIG_OPT_NONE, + .u = {.string = ULOGD_OPRINT_DEFAULT }, + }, + { + .key = "sync", + .type = CONFIG_TYPE_INT, + .options = CONFIG_OPT_NONE, + .u = { .value = 0 }, }, }, }; -- cgit v1.2.3