mirror of
https://github.com/martijnvanbrummelen/nwipe.git
synced 2026-02-20 22:15:41 +00:00
Fix summary table message precedence
Previously if a drive failed during a multiple drive wipe and the user decided to abort nwipe to say remove the drive and start over, the user would use CONTROl-C to abort. This would be reflected in the summary table as ALL drives having been aborted including the drive that failed. It makes more sense for a failed drive to be marked as failed in the summary table even though the user aborted the wipe. This patch fixes that, so that if a drive failed it reflects that drives status in the summary even if the user aborts the wipe.
This commit is contained in:
@@ -613,17 +613,18 @@ void nwipe_log_summary( nwipe_context_t** ptr, int nwipe_selected )
|
||||
/* Any errors ? if so set the exclamation_flag and fail message,
|
||||
* All status messages should be eight characters EXACTLY !
|
||||
*/
|
||||
if( user_abort == 1 )
|
||||
if( c[i]->result < 0 )
|
||||
{
|
||||
strncpy( exclamation_flag, "!", 1 );
|
||||
exclamation_flag[1] = 0;
|
||||
|
||||
strncpy( status, "UABORTED", 8 );
|
||||
strncpy( status, "-FAILED-", 8 );
|
||||
status[8] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( c[i]->result != 0 )
|
||||
|
||||
if( c[i]->pass_errors != 0 )
|
||||
{
|
||||
strncpy( exclamation_flag, "!", 1 );
|
||||
exclamation_flag[1] = 0;
|
||||
@@ -633,13 +634,12 @@ void nwipe_log_summary( nwipe_context_t** ptr, int nwipe_selected )
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if( c[i]->pass_errors != 0 )
|
||||
if( user_abort == 1 )
|
||||
{
|
||||
strncpy( exclamation_flag, "!", 1 );
|
||||
exclamation_flag[1] = 0;
|
||||
|
||||
strncpy( status, "-FAILED-", 8 );
|
||||
strncpy( status, "UABORTED", 8 );
|
||||
status[8] = 0;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user