diff --git a/src/nwipe.c b/src/nwipe.c index 6835900..82bb948 100644 --- a/src/nwipe.c +++ b/src/nwipe.c @@ -722,10 +722,21 @@ int main( int argc, char** argv ) { for( i = 0; i < nwipe_selected; i++ ) { - /* Check for non-fatal errors. */ + /* Check for errors. */ if( c2[i]->result != 0 || c2[i]->pass_errors != 0 || c2[i]->verify_errors != 0 || c2[i]->fsyncdata_errors != 0 ) { + /* If the run_method ever returns anything other than zero then makesure there is at least one pass + * error This is so that the log summary tables correctly show a failure when one occurs as it only + * shows pass, verification and fdatasync errors. */ + if( c2[i]->result != 0 ) + { + if( c2[i]->pass_errors == 0 ) + { + c2[i]->pass_errors = 1; + } + } + nwipe_log( NWIPE_LOG_FATAL, "Nwipe exited with errors on device = %s, see log for specific error\n", c2[i]->device_name ); diff --git a/src/version.c b/src/version.c index 0e363d3..c2b1cf5 100644 --- a/src/version.c +++ b/src/version.c @@ -4,7 +4,7 @@ * used by configure to dynamically assign those values * to documentation files. */ -const char* version_string = "0.32.021"; +const char* version_string = "0.32.022"; const char* program_name = "nwipe"; const char* author_name = "Martijn van Brummelen"; const char* email_address = "git@brumit.nl"; @@ -14,4 +14,4 @@ Modifications to original dwipe Copyright Andy Beverley \n\ This is free software; see the source for copying conditions.\n\ There is NO warranty; not even for MERCHANTABILITY or FITNESS\n\ FOR A PARTICULAR PURPOSE.\n"; -const char* banner = "nwipe 0.32.021"; +const char* banner = "nwipe 0.32.022";