diff options
author | laforge <laforge> | 2005-11-05 15:29:03 +0000 |
---|---|---|
committer | laforge <laforge> | 2005-11-05 15:29:03 +0000 |
commit | fd6ba2d621a014eb0faf1c8a4160f93b669f6eb1 (patch) | |
tree | af0336f7d877794aad0fd2712b1bd7bfe2f32da3 /output | |
parent | 6b4725c892a3db508dbe864efa4b35077e8252c4 (diff) |
add 'sync' config option
Diffstat (limited to 'output')
-rw-r--r-- | output/ulogd_output_OPRINT.c | 19 |
1 files changed, 14 insertions, 5 deletions
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 }, }, }, }; |