[PATCH mtd-utils 7/7] misc-utils: flashcp: abort on --partition and --erase-all

Brandon Maier brandon.maier at collins.com
Wed Nov 2 15:47:57 PDT 2022


Signed-off-by: Brandon Maier <brandon.maier at collins.com>
---
 misc-utils/flashcp.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/misc-utils/flashcp.c b/misc-utils/flashcp.c
index 13ff2f1..80f2086 100644
--- a/misc-utils/flashcp.c
+++ b/misc-utils/flashcp.c
@@ -283,6 +283,9 @@ int main (int argc,char *argv[])
 	if (flags & FLAG_HELP || device == NULL)
 		showusage(flags != FLAG_HELP);
 
+	if (flags & FLAG_PARTITION && flags & FLAG_ERASE_ALL)
+		log_failure("Option --partition does not support --erase-all\n");
+
 	atexit (cleanup);
 
 	/* get some info about the flash device */
-- 
2.38.1




More information about the linux-mtd mailing list