From 0a53ec9c42a77d58d2bbb8f5db03c3e4bff13110 Mon Sep 17 00:00:00 2001 From: PartialVolume Date: Sun, 12 Jan 2020 10:20:17 +0000 Subject: [PATCH] Fix percentage calculation for IS5 only --- src/method.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/method.c b/src/method.c index a9e24fd..9324de0 100644 --- a/src/method.c +++ b/src/method.c @@ -1196,12 +1196,19 @@ void calculate_round_size( nwipe_context_t* c ) /* This method ALWAYS verifies the 3rd pass so increase by device size, * and does not need to be increased by device size for VERIFY_ALL*/ - c->round_size += c->device_size; - if( nwipe_options.verify == NWIPE_VERIFY_LAST ) { c->round_size += c->device_size; } + if( nwipe_options.verify == NWIPE_VERIFY_ALL ) + { + c->round_size += c->device_size; + } + else + { + /* Adjusts for verify on every third pass multiplied by number of rounds */ + c->round_size += ( c->device_size * c->round_count ); + } if( nwipe_options.noblank == 0 ) { c->round_size += c->device_size;