]> www.infradead.org Git - mtd-utils.git/commitdiff
ubiformat: make badblocks output less confusing
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Sun, 26 Jul 2009 12:51:11 +0000 (15:51 +0300)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Sun, 26 Jul 2009 12:56:20 +0000 (15:56 +0300)
When ubiformat prints something like

ubiformat: bad eraseblocks: 1400

it looks like there are 1400 bad eraseblock, although there is
only one with number 1400. Fix this but turning the print into

ubiformat: 1 bad eraseblock found, numbers: 1400

Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
ubi-utils/src/ubiformat.c

index 3807102b4fbc464f1c8a2dceaad23f82267b9e16..6ffb090a4f1ff5a271006a927906d707908007e6 100644 (file)
@@ -269,7 +269,7 @@ static void print_bad_eraseblocks(const struct mtd_dev_info *mtd,
        if (si->bad_cnt == 0)
                return;
 
-       normsg_cont("bad eraseblocks: ");
+       normsg_cont("%d bad eraseblocks found, numbers: ", si->bad_cnt);
        for (eb = 0; eb < mtd->eb_cnt; eb++) {
                if (si->ec[eb] != EB_BAD)
                        continue;