diff options
author | Ulrich Drepper <drepper@redhat.com> | 2009-02-06 20:13:07 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2009-02-06 20:13:07 +0000 |
commit | cbbcaf2369b2111d9388ce54ea18854319dbfab3 (patch) | |
tree | 0ffc9cafd19065f44923eee2d1e6fac3afb114d4 /nscd | |
parent | e2e390fad8271da33a51075cc2bf27c9fe78861b (diff) | |
download | glibc-cbbcaf2369b2111d9388ce54ea18854319dbfab3.tar.gz glibc-cbbcaf2369b2111d9388ce54ea18854319dbfab3.tar.xz glibc-cbbcaf2369b2111d9388ce54ea18854319dbfab3.zip |
* debug/xtrace.sh: Unify translatable messages.
* elf/ldd.bash.in: Likewise. * elf/sprof.c: Likewise. * locale/programs/locale.c: Likewise. * malloc/memusage.sh: Likewise. * nss/getent.c: Likewise. 2009-02-06 Joseph Myers <joseph@codesourcery.com> * debug/pcprofiledump.c (print_version, argp_program_version_hook): New function. * elf/ldconfig.c (more_help): New function. (argp): Use it. * elf/sln.c (usage): New function. (main): Support --help and --version. * malloc/memusagestat.c (print_version): New function. (argp_program_version_hook): New variable. * nscd/nscd.c (more_help): New function. (argp): Use it. * posix/getconf.c (main): Send --version output to stdout. Support --help. * sunrpc/rpc_main.c (usage, options_usage): Take STREAM and STATUS arguments. All callers changed. (print_version): New function. (parseargs): Support --help and --version. * sunrpc/rpcinfo.c (usage): Take STREAM argument. All callers changed. (print_version): New function. (main): Use getopt_long. Support --help and --version. * sysdeps/unix/sysv/linux/lddlibc4.c (main): Support --help and --version. 2009-02-06 Ulrich Drepper <drepper@redhat.com>
Diffstat (limited to 'nscd')
-rw-r--r-- | nscd/nscd.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/nscd/nscd.c b/nscd/nscd.c index 1129cf8480..3265ea8973 100644 --- a/nscd/nscd.c +++ b/nscd/nscd.c @@ -91,6 +91,9 @@ static int write_pid (const char *file); static void print_version (FILE *stream, struct argp_state *state); void (*argp_program_version_hook) (FILE *, struct argp_state *) = print_version; +/* Function to print some extra text in the help message. */ +static char *more_help (int key, const char *text, void *input); + /* Definitions of arguments for argp functions. */ static const struct argp_option options[] = { @@ -117,7 +120,7 @@ static error_t parse_opt (int key, char *arg, struct argp_state *state); /* Data structure to communicate with argp functions. */ static struct argp argp = { - options, parse_opt, NULL, doc, + options, parse_opt, NULL, doc, NULL, more_help }; /* True if only statistics are requested. */ @@ -401,6 +404,23 @@ parse_opt (int key, char *arg, struct argp_state *state) return 0; } +/* Print bug-reporting information in the help message. */ +static char * +more_help (int key, const char *text, void *input) +{ + switch (key) + { + case ARGP_KEY_HELP_EXTRA: + /* We print some extra information. */ + return strdup (gettext ("\ +For bug reporting instructions, please see:\n\ +<http://www.gnu.org/software/libc/bugs.html>.\n")); + default: + break; + } + return (char *) text; +} + /* Print the version information. */ static void print_version (FILE *stream, struct argp_state *state) |