From b5b28b435ede727c24233aa4d0ba8507e8a169b9 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 1 Mar 2010 10:51:12 +0100 Subject: [PATCH] ldattach: prints help to stdout Signed-off-by: Karel Zak --- sys-utils/ldattach.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys-utils/ldattach.c b/sys-utils/ldattach.c index 26cf10a7..4fe5a7bb 100644 --- a/sys-utils/ldattach.c +++ b/sys-utils/ldattach.c @@ -145,13 +145,15 @@ static int parse_iflag(char *str, int *set_iflag, int *clr_iflag) static void __attribute__((__noreturn__)) usage(int exitcode) { - fprintf(stderr, + FILE *out = exitcode == EXIT_SUCCESS ? stdout : stderr; + + fprintf(out, _("\nUsage: %s [ -dhV78neo12 ] [ -s ] [ -i [-] ] \n"), progname); - fputs(_("\nKnown names:\n"), stderr); - print_table(stderr, ld_discs); - fputs(_("\nKnown names:\n"), stderr); - print_table(stderr, ld_iflags); + fputs(_("\nKnown names:\n"), out); + print_table(out, ld_discs); + fputs(_("\nKnown names:\n"), out); + print_table(out, ld_iflags); exit(exitcode); } -- 2.39.5