From: Artem Bityutskiy Date: Fri, 16 Jan 2009 13:30:40 +0000 (+0200) Subject: ubiformat: nicify error messages X-Git-Tag: v1.3.0~102 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=6d9a03eb4f0f5c0b5f917d1092c4d851a392b9fb;p=mtd-utils.git 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 --- 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)