summaryrefslogtreecommitdiff
path: root/nscd
diff options
context:
space:
mode:
Diffstat (limited to 'nscd')
-rw-r--r--nscd/nscd.c25
1 files changed, 22 insertions, 3 deletions
diff --git a/nscd/nscd.c b/nscd/nscd.c
index e7f04f808c..63d9d83599 100644
--- a/nscd/nscd.c
+++ b/nscd/nscd.c
@@ -442,19 +442,38 @@ parse_opt (int key, char *arg, struct argp_state *state)
static char *
more_help (int key, const char *text, void *input)
{
- char *tp = NULL;
+ char *tables, *tp = NULL;
+
switch (key)
{
case ARGP_KEY_HELP_EXTRA:
+ {
+ dbtype cnt;
+
+ tables = xmalloc (sizeof (dbnames) + 1);
+ for (cnt = 0; cnt < lastdb; cnt++)
+ {
+ strcat (tables, dbnames[cnt]);
+ strcat (tables, " ");
+ }
+ }
+
/* We print some extra information. */
if (asprintf (&tp, gettext ("\
+Supported tables:\n\
+%s\n\
+\n\
For bug reporting instructions, please see:\n\
-%s.\n"), REPORT_BUGS_TO) < 0)
- return NULL;
+%s.\n\
+"), tables, REPORT_BUGS_TO) < 0)
+ tp = NULL;
+ free (tables);
return tp;
+
default:
break;
}
+
return (char *) text;
}