forked from localhorst/reHDD
Disable delete after shred was once started. (#69)
documented here: localhorst/reHDD#65 Reviewed-on: localhorst/reHDD#69 Co-authored-by: localhorst <localhorst@mosad.xyz> Co-committed-by: localhorst <localhorst@mosad.xyz>
This commit is contained in:
@ -32,11 +32,15 @@ void Delete::deleteDrive(Drive *drive)
|
||||
const char *cpComand = sCMD.c_str();
|
||||
// cout << "delete: " << cpComand << endl;
|
||||
|
||||
FILE *deleteCmdOutput = popen(cpComand, "r");
|
||||
|
||||
while ((getline(&cLine, &len, deleteCmdOutput)) != -1)
|
||||
if (drive->bWasShredStarted == false)
|
||||
{
|
||||
// wipefs running
|
||||
//only start delete if the drive was not shredded before
|
||||
FILE *deleteCmdOutput = popen(cpComand, "r");
|
||||
|
||||
while ((getline(&cLine, &len, deleteCmdOutput)) != -1)
|
||||
{
|
||||
// wipefs running
|
||||
}
|
||||
pclose(deleteCmdOutput);
|
||||
}
|
||||
pclose(deleteCmdOutput);
|
||||
}
|
||||
|
Reference in New Issue
Block a user