diff options
Diffstat (limited to 'libc/elf/ldconfig.c')
-rw-r--r-- | libc/elf/ldconfig.c | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/libc/elf/ldconfig.c b/libc/elf/ldconfig.c index d3ffb3144..93a8d7aa7 100644 --- a/libc/elf/ldconfig.c +++ b/libc/elf/ldconfig.c @@ -132,6 +132,9 @@ 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[] = { @@ -153,9 +156,7 @@ static const struct argp_option options[] = #include <dl-procinfo.c> /* Short description of program. */ -static const char doc[] = N_("Configure Dynamic Linker Run Time Bindings.\v\ -For bug reporting instructions, please see:\n\ -"REPORT_BUGS_TO".\n"); +static const char doc[] = N_("Configure Dynamic Linker Run Time Bindings."); /* Prototype for option handler. */ static error_t parse_opt (int key, char *arg, struct argp_state *state); @@ -163,7 +164,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, NULL, NULL, NULL + options, parse_opt, NULL, doc, NULL, more_help, NULL }; /* Check if string corresponds to an important hardware capability or @@ -290,6 +291,26 @@ 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) +{ + char *tp = NULL; + switch (key) + { + case ARGP_KEY_HELP_EXTRA: + /* We print some extra information. */ + if (asprintf (&tp, gettext ("\ +For bug reporting instructions, please see:\n\ +%s.\n"), REPORT_BUGS_TO) < 0) + return NULL; + return tp; + default: + break; + } + return (char *) text; +} + /* Print the version information. */ static void print_version (FILE *stream, struct argp_state *state) |