Defensive drive state (#89)
fixes #79 Reviewed-on: #89 Co-authored-by: localhorst <localhorst@mosad.xyz> Co-committed-by: localhorst <localhorst@mosad.xyz>
This commit is contained in:
@ -38,6 +38,10 @@ int Shred::shredDrive(Drive *drive, int *ipSignalFd)
|
||||
address << (void const *)&(*drive);
|
||||
Logger::logThis()->info("Shred-Task started - Drive: " + drive->getModelName() + "-" + drive->getSerial() + " @" + address.str());
|
||||
drive->bWasShredStarted = true; // Mark drive as partly shredded
|
||||
drive->bWasShredded = false;
|
||||
drive->setTaskPercentage(0.0);
|
||||
drive->u32DriveChecksumAfterShredding = UINT32_MAX;
|
||||
drive->state = Drive::TaskState::SHRED_ACTIVE;
|
||||
|
||||
#ifdef DRYRUN
|
||||
for (int i = 0; i <= 100; i++)
|
||||
|
||||
Reference in New Issue
Block a user