Don't mention writing when erasing only (-E)
The old messages were misleading and caused confusion. Probably nobody
noticed because `-E' is rarely used.
Change-Id: I9ed2ba717fbffc274d5d044e1053e6f23f1fdac5
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.sourcearcade.org/c/flashprog/+/256
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
diff --git a/flashprog.c b/flashprog.c
index ec19f46..05c0a53 100644
--- a/flashprog.c
+++ b/flashprog.c
@@ -1198,7 +1198,7 @@
int ret = 0, layout_count = 0;
all_skipped = true;
- msg_cinfo("Erasing and writing flash chip... ");
+ msg_cinfo("Erasing %sflash chip... ", info->newcontents ? "and writing " : "");
if (do_erase) {
layout_count = create_erase_layout(flashctx, &erase_layouts);
@@ -1251,7 +1251,7 @@
}
if (all_skipped)
msg_cinfo("\nWarning: Chip content is identical to the requested image.\n");
- msg_cinfo("Erase/write done.\n");
+ msg_cinfo("Erase%s done.\n", info->newcontents ? "/write" : "");
free_ret:
free_erase_layout(erase_layouts, layout_count);