diff options
-rw-r--r-- | mkfs.ubifs/mkfs.ubifs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c index e49a980..a306dd6 100644 --- a/mkfs.ubifs/mkfs.ubifs.c +++ b/mkfs.ubifs/mkfs.ubifs.c @@ -675,8 +675,11 @@ static int get_options(int argc, char**argv) if (optind != argc && !output) output = strdup(argv[optind]); - if (output) - out_ubi = !open_ubi(output); + + if (!output) + return err_msg("not output device or file specified"); + + out_ubi = !open_ubi(output); if (out_ubi) { c->min_io_size = c->di.min_io_size; @@ -684,9 +687,6 @@ static int get_options(int argc, char**argv) c->max_leb_cnt = c->vi.rsvd_lebs; } - if (!output) - return err_msg("not output device or file specified"); - if (c->min_io_size == -1) return err_msg("min. I/O unit was not specified " "(use -h for help)"); |