From 5fa2d158266c24528132589a1bd77b33de7d4d25 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Wed, 6 Nov 2019 12:17:33 +0100 Subject: Cleanup: remove BSD style __progname Signed-off-by: David Oberhollenzer --- unpack/options.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'unpack') diff --git a/unpack/options.c b/unpack/options.c index 7a96123..b9d4744 100644 --- a/unpack/options.c +++ b/unpack/options.c @@ -38,7 +38,7 @@ static const char *short_opts = ; static const char *help_string = -"Usage: %s [OPTIONS] \n" +"Usage: rdsquashfs [OPTIONS] \n" "\n" "View or extract the contents of a squashfs image.\n" "\n" @@ -83,8 +83,6 @@ static const char *help_string = " --version, -V Print version information and exit.\n" "\n"; -extern const char *__progname; - static char *get_path(char *old, const char *arg) { char *path; @@ -183,11 +181,11 @@ void process_command_line(options_t *opt, int argc, char **argv) opt->flags |= UNPACK_QUIET; break; case 'h': - printf(help_string, __progname); + fputs(help_string, stdout); free(opt->cmdpath); exit(EXIT_SUCCESS); case 'V': - print_version(); + print_version("rdsquashfs"); free(opt->cmdpath); exit(EXIT_SUCCESS); default: @@ -212,7 +210,7 @@ void process_command_line(options_t *opt, int argc, char **argv) opt->image_name = argv[optind++]; return; fail_arg: - fprintf(stderr, "Try `%s --help' for more information.\n", __progname); + fputs("Try `rdsquashfs --help' for more information.\n", stderr); free(opt->cmdpath); exit(EXIT_FAILURE); } -- cgit v1.2.3