diff mbox series

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

Message ID 20221102224757.58012-8-brandon.maier@collins.com
State Accepted
Delegated to: David Oberhollenzer
Headers show
Series misc-utils: flashcp: Bugfixes to --partition | expand

Commit Message

Brandon Maier Nov. 2, 2022, 10:47 p.m. UTC
Signed-off-by: Brandon Maier <brandon.maier@collins.com>
---
 misc-utils/flashcp.c | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

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 */