show HDD warnings based on sectors

This commit is contained in:
2026-04-28 21:20:30 +02:00
parent 157e769268
commit 831a892041
7 changed files with 191 additions and 9 deletions
+11 -2
View File
@@ -72,7 +72,10 @@ private:
uint32_t u32ErrorCount = 0U;
uint32_t u32PowerOnHours = 0U; // in hours
uint32_t u32PowerCycles = 0U;
uint32_t u32Temperature = 0U; // in Fahrenheit, just kidding: degree Celsius
uint32_t u32Temperature = 0U; // in Fahrenheit, just kidding: degree Celsius
uint32_t u32ReallocatedSectors = 0U; // ID 0x05 - Reallocated Sectors Count
uint32_t u32PendingSectors = 0U; // ID 0xC5 - Current Pending Sector Count
uint32_t u32UncorrectableSectors = 0U; // ID 0xC6 - Offline Uncorrectable Sector Count
} sSmartData;
private:
@@ -106,6 +109,9 @@ public:
uint32_t getPowerOnHours(void); // in hours
uint32_t getPowerCycles(void);
uint32_t getTemperature(void); // in Fahrenheit, just kidding: degree Celsius
uint32_t getReallocatedSectors(void);
uint32_t getPendingSectors(void);
uint32_t getUncorrectableSectors(void);
void checkFrozenDrive(void);
void setDriveSMARTData(std::string modelFamily,
@@ -115,7 +121,10 @@ public:
uint32_t errorCount,
uint32_t powerOnHours,
uint32_t powerCycles,
uint32_t temperature);
uint32_t temperature,
uint32_t reallocatedSectors,
uint32_t pendingSectors,
uint32_t uncorrectableSectors);
std::string sCapacityToText();
std::string sErrorCountToText();