From 5ed8f1b0b72b22754e3025f9c74b37feac6fd720 Mon Sep 17 00:00:00 2001 From: Brandon Maier Date: Wed, 2 Nov 2022 17:47:57 -0500 Subject: misc-utils: flashcp: abort on --partition and --erase-all Signed-off-by: Brandon Maier Signed-off-by: David Oberhollenzer --- misc-utils/flashcp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/misc-utils/flashcp.c b/misc-utils/flashcp.c index f4acba5..2e8d4c1 100644 --- a/misc-utils/flashcp.c +++ b/misc-utils/flashcp.c @@ -282,6 +282,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 */ -- cgit v1.2.3