mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zdump: refactor usage print
The function will be reused in a later patch. Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Acked-by: Alexander Egorenkov <egorenar@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
f957d895cd
commit
f0fb4a180a
@@ -103,10 +103,15 @@ static void init_defaults(struct options *opts)
|
||||
*/
|
||||
void __noreturn print_usage_exit(const char *prog_name)
|
||||
{
|
||||
STDERR("Try '%s --help' for more information.\n", prog_name);
|
||||
opts_print_usage(prog_name);
|
||||
zg_exit(1);
|
||||
}
|
||||
|
||||
void opts_print_usage(const char *prog_name)
|
||||
{
|
||||
STDERR("Try '%s --help' for more information.\n", prog_name);
|
||||
}
|
||||
|
||||
/*
|
||||
* Print help text
|
||||
*/
|
||||
|
||||
@@ -36,6 +36,7 @@ extern const char *OPTS_SELECT_PROD;
|
||||
extern const char *OPTS_SELECT_ALL;
|
||||
|
||||
void opts_parse(int argc, char *argv[], struct options *opts);
|
||||
void opts_print_usage(const char *prog_name);
|
||||
void __noreturn print_usage_exit(const char *prog_name);
|
||||
|
||||
#endif /* OPTS_H */
|
||||
|
||||
Reference in New Issue
Block a user