This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.18-742-g0c813d1


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  0c813d1f3e31b59844655c0c1b61462b32102c1a (commit)
      from  20f4a8d9937b2a824a5d20583dd850070fe29988 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0c813d1f3e31b59844655c0c1b61462b32102c1a

commit 0c813d1f3e31b59844655c0c1b61462b32102c1a
Author: Sami Kerola <kerolasa@iki.fi>
Date:   Fri Jan 3 21:00:56 2014 +0000

    nscd: list all tables in usage()
    
    Usage output for option --invalidate=TABLE is not helpful without
    list of tables.  The list is also missing from nscd(8) manual which
    made it pretty difficult to know what are the tables.

diff --git a/ChangeLog b/ChangeLog
index ddfb69a..2acd69d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+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.
diff --git a/nscd/nscd.c b/nscd/nscd.c
index e7f04f8..63d9d83 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;
 }
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog   |    4 ++++
 nscd/nscd.c |   25 ++++++++++++++++++++++---
 2 files changed, 26 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]