aboutsummaryrefslogtreecommitdiff
path: root/ubi-utils
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-01-16 15:30:40 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-01-16 15:34:28 +0200
commit6d9a03eb4f0f5c0b5f917d1092c4d851a392b9fb (patch)
tree6d5af73ee69cf8f4bdc980e44a2a1ab3ec98a861 /ubi-utils
parentadf9d2c53e05e4ebc1b27cc431157b690f741535 (diff)
ubiformat: nicify error messages
In case of error, ubiformat prints error messages at the same line as the previous messages. Fix this. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'ubi-utils')
-rw-r--r--ubi-utils/new-utils/src/ubiformat.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ubi-utils/new-utils/src/ubiformat.c b/ubi-utils/new-utils/src/ubiformat.c
index 7a6d1b7..bf07e5e 100644
--- a/ubi-utils/new-utils/src/ubiformat.c
+++ b/ubi-utils/new-utils/src/ubiformat.c
@@ -506,6 +506,8 @@ static int format(const struct mtd_info *mtd, const struct ubigen_info *ui,
err = mtd_erase(mtd, eb);
if (err) {
+ if (!args.quiet)
+ printf("\n");
sys_errmsg("failed to erase eraseblock %d", eb);
goto out_free;
}
@@ -530,6 +532,8 @@ static int format(const struct mtd_info *mtd, const struct ubigen_info *ui,
err = mtd_write(mtd, eb, 0, hdr, write_size);
if (err) {
+ if (!args.quiet && !args.verbose)
+ printf("\n");
sys_errmsg("cannot write EC header (%d bytes buffer) to eraseblock %d",
write_size, eb);
if (args.subpage_size != mtd->min_io_size)