summaryrefslogtreecommitdiff
path: root/ubi-utils
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-08-24 15:24:41 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-08-24 15:24:41 +0300
commitf3ab1c8d26fbb29c6ed7424cfad19f570e739987 (patch)
tree53da1d333c6624ced21c2cb882cf0f59d5bf8678 /ubi-utils
parented777541152b791e0055cd718126b576c90e5116 (diff)
mkfs.ubifs: do not forget to torture PEB
We added PEB torturing for the case when we fail during flashing an image, but forgot to add it for the case when we are formating the flash. Add the forgottent torturing call. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils')
-rw-r--r--ubi-utils/src/ubiformat.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ubi-utils/src/ubiformat.c b/ubi-utils/src/ubiformat.c
index 3f1f512..fe7040e 100644
--- a/ubi-utils/src/ubiformat.c
+++ b/ubi-utils/src/ubiformat.c
@@ -527,10 +527,8 @@ static int flash_image(const struct mtd_dev_info *mtd, struct ubi_scan_info *si)
err = mtd_torture(mtd, args.node_fd, eb);
if (err) {
- if (mark_bad(mtd, si, eb)) {
- normsg("operation incomplete");
+ if (mark_bad(mtd, si, eb))
goto out_close;
- }
}
continue;
}
@@ -636,9 +634,10 @@ static int format(const struct mtd_dev_info *mtd, const struct ubigen_info *ui,
goto out_free;
}
- if (mark_bad(mtd, si, eb)) {
- normsg("operation incomplete");
- goto out_free;
+ err = mtd_torture(mtd, args.node_fd, eb);
+ if (err) {
+ if (mark_bad(mtd, si, eb))
+ goto out_free;
}
continue;