summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Leblond <eric@inl.fr>2009-01-27 11:21:54 +0100
committerEric Leblond <eric@inl.fr>2009-01-27 23:48:05 +0100
commitfc5aa5ba7961c9cae924300ca61f0fb529703fa1 (patch)
tree4306bbb1e949a265bab2ac2dda0ed694976dff89
parent13643ceb7396101cc8611c5c366df2a7f0fa5c17 (diff)
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.
-rw-r--r--src/ulogd.c7
1 files changed, 6 insertions, 1 deletions
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);
}
}