From fc5aa5ba7961c9cae924300ca61f0fb529703fa1 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Tue, 27 Jan 2009 11:21:54 +0100 Subject: Display which keys are optional in info mode. This patch adds a "optional" keyword to description of input key which are optional when --info is used to dump information about a plugin. --- src/ulogd.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ulogd.c b/src/ulogd.c index 2e86b9d..1428373 100644 --- a/src/ulogd.c +++ b/src/ulogd.c @@ -320,9 +320,14 @@ void get_plugin_infos(struct ulogd_plugin *me) for(i = 0; i < me->input.num_keys; i++) { char *tstring = type_to_string(me->input.keys[i].type); - printf("\tKey: %s (%s)\n", + printf("\tKey: %s (%s", me->input.keys[i].name, tstring); + if (me->input.keys[i].flags + & ULOGD_KEYF_OPTIONAL) + printf(", optional)\n"); + else + printf(")\n"); free(tstring); } } -- cgit v1.2.3