mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
iucvconn/iucvtty: Direct --help output to stdout
Both iucvconn and iucvtty write output for --help to stderr. To be consistent with other s390-tools and GNU coding guide lines, fix this by using stdout for tool-generated usage help. Reviewed-by: Hendrik Brueckner <brueckner@linux.ibm.com> Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
f2f572fa70
commit
5ef1320a7b
@@ -75,9 +75,11 @@ static const struct tool_info iucv_tool[2] = {
|
||||
static void __noreturn usage_exit(const struct tool_info *prg, int is_error,
|
||||
const char *msg)
|
||||
{
|
||||
FILE *file = is_error ? stderr : stdout;
|
||||
|
||||
if (msg != NULL)
|
||||
fprintf(stderr, _("%s: %s\n"), prg->name, msg);
|
||||
fprintf(stderr, _(prg->usage), prg->name, prg->name);
|
||||
fprintf(file, _("%s: %s\n"), prg->name, msg);
|
||||
fprintf(file, _(prg->usage), prg->name, prg->name);
|
||||
exit(is_error ? 1 : 0); /* rc=1 .. invalid args */
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user