mirror of
https://github.com/martijnvanbrummelen/nwipe.git
synced 2026-02-20 05:32:14 +00:00
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:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user