get status from smartctl correct
This commit is contained in:
@ -8,7 +8,7 @@
|
||||
#ifndef REHDD_H_
|
||||
#define REHDD_H_
|
||||
|
||||
#define REHDD_VERSION "V1.1.1"
|
||||
#define REHDD_VERSION "V1.1.2"
|
||||
|
||||
// Drive handling Settings
|
||||
#define WORSE_HOURS 19200 // mark drive if at this limit or beyond
|
||||
@ -31,7 +31,7 @@
|
||||
#endif
|
||||
|
||||
// Logic
|
||||
// #define DRYRUN //don´t touch the drives
|
||||
#define DRYRUN //don´t touch the drives
|
||||
#define FROZEN_ALERT // show alert if drive is frozen
|
||||
#define ZERO_CHECK // check drive after shred if all bytes are zero, show alert if this fails
|
||||
|
||||
|
@ -19,24 +19,15 @@ public:
|
||||
private:
|
||||
SMART(void);
|
||||
|
||||
static uint8_t parseExitStatus(string sLine);
|
||||
static void parseModelFamily(string sLine);
|
||||
static void parseModelName(string sLine);
|
||||
static void parseSerial(string sLine);
|
||||
static void parseCapacity(string sLine);
|
||||
static void parseErrorCount(string sLine);
|
||||
static void parsePowerOnHours(string sLine);
|
||||
static void parsePowerCycle(string sLine);
|
||||
static void parseTemperature(string sLine);
|
||||
|
||||
static string modelFamily;
|
||||
static string modelName;
|
||||
static string serial;
|
||||
static uint64_t capacity;
|
||||
static uint32_t errorCount;
|
||||
static uint32_t powerOnHours;
|
||||
static uint32_t powerCycle;
|
||||
static uint32_t temperature;
|
||||
static bool parseExitStatus(string sLine, uint8_t &status);
|
||||
static bool parseModelFamily(string sLine, string &modelFamily);
|
||||
static bool parseModelName(string sLine, string &modelName);
|
||||
static bool parseSerial(string sLine, string &serial);
|
||||
static bool parseCapacity(string sLine, uint64_t &capacity);
|
||||
static bool parseErrorCount(string sLine, uint32_t &errorCount);
|
||||
static bool parsePowerOnHours(string sLine, uint32_t &powerOnHours);
|
||||
static bool parsePowerCycles(string sLine, uint32_t &powerCycles);
|
||||
static bool parseTemperature(string sLine, uint32_t &temperature);
|
||||
};
|
||||
|
||||
#endif // SMART_H_
|
Reference in New Issue
Block a user