summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-09-05 11:56:22 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-09-05 11:56:22 +0300
commitb7acac9855a053c6b5ceb50bba5d21a8ace85ac5 (patch)
tree9d1f887b35a35aafb5aa5f25f45dc8fefe167765
parenteda3e06d868640a7e655a683489da79a5ea4a251 (diff)
mkfs.ubifs: check max_leb_count
Complain and exit if max. count of LEBs was not specified. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
-rw-r--r--mkfs.ubifs/mkfs.ubifs.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c
index f20396f..2ea8f7b 100644
--- a/mkfs.ubifs/mkfs.ubifs.c
+++ b/mkfs.ubifs/mkfs.ubifs.c
@@ -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;