+2014-01-04 Sami Kerola <kerolasa@iki.fi>
+
+ * nscd/nscd.c: Improve usage() output.
+
2014-01-04 Mike Frysinger <vapier@gentoo.org>
* config.h.in: Add HAVE_LINUX_FANOTIFY_H template.
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;
}