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>
This commit is contained in:
desertwitch
2025-11-14 23:35:13 +01:00
parent 3e79c46f45
commit 0d043a3745

View File

@@ -553,6 +553,13 @@ int nwipe_options_parse( int argc, char** argv )
} /* command line options */ } /* 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 the number of options that were processed. */
return optind; return optind;
} }