forked from localhorst/reHDD
added drive wipe
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user