From: Brandon Maier Date: Wed, 2 Nov 2022 22:47:57 +0000 (-0500) Subject: misc-utils: flashcp: abort on --partition and --erase-all X-Git-Tag: v2.1.6~14 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5ed8f1b0b72b22754e3025f9c74b37feac6fd720;p=mtd-utils.git misc-utils: flashcp: abort on --partition and --erase-all Signed-off-by: Brandon Maier Signed-off-by: David Oberhollenzer --- 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 */