aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Norris <computersforpeace@gmail.com>2014-03-21 23:45:44 -0700
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2014-03-31 12:49:39 +0300
commit4f291fbfa3ea677fd476466c82492a69ce6e562d (patch)
treee92c3cb701b02ce04b2f60c24fcce3554a4b05df
parent6a9db93c239ff61412ba6629919b4411d836ae23 (diff)
mkfs.ubifs: correct and improve LEB size error prints
The error message is incorrect for "too small LEB size" -- we were printing the minimum I/O size instead of the LEB size. At the same time, let's print the max LEB size along with the message for "too large LEB size", to be consistent and more helpful. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-rw-r--r--mkfs.ubifs/mkfs.ubifs.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mkfs.ubifs/mkfs.ubifs.c b/mkfs.ubifs/mkfs.ubifs.c
index f9977bc..200c8a5 100644
--- a/mkfs.ubifs/mkfs.ubifs.c
+++ b/mkfs.ubifs/mkfs.ubifs.c
@@ -352,13 +352,14 @@ static int validate_options(void)
return err_msg("min. I/O unit cannot be larger than LEB size");
if (c->leb_size < UBIFS_MIN_LEB_SZ)
return err_msg("too small LEB size %d, minimum is %d",
- c->min_io_size, UBIFS_MIN_LEB_SZ);
+ c->leb_size, UBIFS_MIN_LEB_SZ);
if (c->leb_size % c->min_io_size)
return err_msg("LEB should be multiple of min. I/O units");
if (c->leb_size % 8)
return err_msg("LEB size has to be multiple of 8");
if (c->leb_size > UBIFS_MAX_LEB_SZ)
- return err_msg("too large LEB size %d", c->leb_size);
+ return err_msg("too large LEB size %d, maximum is %d",
+ c->leb_size, UBIFS_MAX_LEB_SZ);
if (c->max_leb_cnt < UBIFS_MIN_LEB_CNT)
return err_msg("too low max. count of LEBs, minimum is %d",
UBIFS_MIN_LEB_CNT);