diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-11-06 12:17:33 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2019-11-06 12:17:33 +0100 |
commit | 5fa2d158266c24528132589a1bd77b33de7d4d25 (patch) | |
tree | 9c3c6517a1e112a51a02298e8422a33f54841788 /unpack | |
parent | 2c49bf4fca54e9acb47844878cc43617ce2a1422 (diff) |
Cleanup: remove BSD style __progname
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'unpack')
-rw-r--r-- | unpack/options.c | 10 |
1 files changed, 4 insertions, 6 deletions
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] <squashfs-file>\n" +"Usage: rdsquashfs [OPTIONS] <squashfs-file>\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); } |