From 0d043a37457abbba80f794f7a12b2a30832b3e07 Mon Sep 17 00:00:00 2001 From: desertwitch <24509509+desertwitch@users.noreply.github.com> Date: Fri, 14 Nov 2025 23:35:13 +0100 Subject: [PATCH] fix: respect no-blanking methods in --nogui mode also This fixes an issue where a default blanking pass was added to methods which do not support it when in --nogui mode. Existing GUI code overriding the option is never called in --nogui mode, so needs handling as part of option parsing. Signed-off-by: desertwitch <24509509+desertwitch@users.noreply.github.com> --- src/options.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/options.c b/src/options.c index 926d999..7d61c74 100644 --- a/src/options.c +++ b/src/options.c @@ -553,6 +553,13 @@ int nwipe_options_parse( int argc, char** argv ) } /* command line options */ + /* Disable blanking for ops2 and verify methods */ + if( nwipe_options.method == &nwipe_ops2 || nwipe_options.method == &nwipe_verify_zero + || nwipe_options.method == &nwipe_verify_one ) + { + nwipe_options.noblank = 1; + } + /* Return the number of options that were processed. */ return optind; }