added drive wipe

This commit is contained in:
2020-05-03 17:17:20 +02:00
parent eccd7b0a8b
commit 36e8f5b62c
5 changed files with 115 additions and 2 deletions

View File

@ -30,6 +30,18 @@ void reHDD::app_logic(void)
filterIgnoredDrives(&vecDrives); //filter out ignored drives
addSMARTData(&vecDrives); //add S.M.A.R.T. Data to the drives
printDrives(&vecDrives); //print currently attached drives
size_t u64SelectedDriveIndex = 0U;
size_t u64DriveVecSize = (vecDrives.size());
cout << "Select drive to wipe:" << endl;
cin >> u64SelectedDriveIndex;
cout << "Selected drive index: " << u64SelectedDriveIndex << endl;
if(u64SelectedDriveIndex < (u64DriveVecSize)) {
Wipe::wipeDrive(&vecDrives[u64SelectedDriveIndex]);
}
}
/**
@ -158,6 +170,7 @@ void reHDD::printDrives(vector <Drive>* pvecDrives)
vector <Drive>::iterator it;
for (it = pvecDrives->begin(); it != pvecDrives->end(); ++it)
{
cout << " Drive: " << distance(pvecDrives->begin(), it) << endl;
cout << "Path: " << it->getPath() << endl;
cout << "ModelFamily: " << it->getModelFamily() << endl;
cout << "ModelName: " << it->getModelName() << endl;