aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mkfs/mkfs.c6
-rw-r--r--mkfs/options.c5
2 files changed, 5 insertions, 6 deletions
diff --git a/mkfs/mkfs.c b/mkfs/mkfs.c
index c958d73..1fd95be 100644
--- a/mkfs/mkfs.c
+++ b/mkfs/mkfs.c
@@ -47,12 +47,6 @@ int main(int argc, char **argv)
process_command_line(&info.opt, argc, argv);
- if (info.opt.comp_extra != NULL &&
- strcmp(info.opt.comp_extra, "help") == 0) {
- compressor_print_help(info.opt.compressor);
- return EXIT_SUCCESS;
- }
-
if (sqfs_super_init(&info.super, info.opt.blksz, info.opt.def_mtime,
info.opt.compressor)) {
return EXIT_FAILURE;
diff --git a/mkfs/options.c b/mkfs/options.c
index 14c648d..36539b7 100644
--- a/mkfs/options.c
+++ b/mkfs/options.c
@@ -308,6 +308,11 @@ void process_command_line(options_t *opt, int argc, char **argv)
}
}
+ if (opt->comp_extra != NULL && strcmp(opt->comp_extra, "help") == 0) {
+ compressor_print_help(opt->compressor);
+ exit(EXIT_SUCCESS);
+ }
+
if ((optind + 1) >= argc) {
fputs("Missing arguments: input and output files.\n", stderr);
goto fail_arg;