]> www.infradead.org Git - mtd-utils.git/commitdiff
mkfs.ubifs: check max_leb_count
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 5 Sep 2008 08:56:22 +0000 (11:56 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Fri, 5 Sep 2008 08:56:22 +0000 (11:56 +0300)
Complain and exit if max. count of LEBs was not specified.

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
mkfs.ubifs/mkfs.ubifs.c

index f20396f4bc32793875d6174acbbc440265aac397..2ea8f7b88d8835c45dec97e0090d8a93e6e183f1 100644 (file)
@@ -437,6 +437,7 @@ static int get_options(int argc, char**argv)
        c->lsave_cnt = 256;
        c->leb_size = -1;
        c->min_io_size = -1;
+       c->max_leb_cnt = -1;
        c->max_bud_bytes = -1;
        c->log_lebs = -1;
 
@@ -563,6 +564,10 @@ static int get_options(int argc, char**argv)
        if (c->leb_size == -1)
                return err_msg("LEB size was not specified (use -h for help)");
 
+       if (c->max_leb_cnt == -1)
+               return err_msg("Maximum count of LEBs was not specified "
+                              "(use -h for help)");
+
        if (c->max_bud_bytes == -1) {
                int lebs;