detect frozen drives and show that the user

This commit is contained in:
2020-09-11 17:18:53 +02:00
parent 5f593682e2
commit 67b8e302be
7 changed files with 103 additions and 15 deletions

View File

@ -18,7 +18,8 @@ public:
SHRED_SELECTED,
SHRED_ACTIVE,
DELETE_SELECTED,
DELETE_ACTIVE
DELETE_ACTIVE,
FROZEN
} state;
bool bWasShredded = false;
@ -34,9 +35,11 @@ private:
uint32_t u32ErrorCount = 0U;
uint32_t u32PowerOnHours = 0U; //in hours
uint32_t u32PowerCycles = 0U;
time_t u32Timestamp = 0U; //unix timestamp for detecting a frozen drive
double d32TaskPercentage = 0U; //in percent for Shred (1 to 100)
private:
void setTimestamp();
protected:
@ -54,6 +57,7 @@ public:
uint32_t getErrorCount(void);
uint32_t getPowerOnHours(void); //in hours
uint32_t getPowerCycles(void);
void checkFrozenDrive(void);
void setDriveSMARTData( string modelFamily,
string modelName,