diff --git a/include/reHDD.h b/include/reHDD.h index bd9adfb..1305773 100644 --- a/include/reHDD.h +++ b/include/reHDD.h @@ -8,7 +8,7 @@ #ifndef REHDD_H_ #define REHDD_H_ -#define REHDD_VERSION "V1.2.0" +#define REHDD_VERSION "bV1.1.0" // Drive handling Settings #define WORSE_HOURS 19200 //mark drive if at this limit or beyond @@ -20,7 +20,7 @@ // Logger Settings #define LOG_PATH "./reHDD.log" -#define DESCRIPTION "reHDD - Copyright Hendrik Schutter 2024" +#define DESCRIPTION "reHDD - Copyright Hendrik Schutter 2022" #define DEVICE_ID "generic" #define SOFTWARE_VERSION "alpha" #define HARDWARE_VERSION "generic" @@ -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 diff --git a/src/reHDD.cpp b/src/reHDD.cpp index 4ed5f68..b3e2195 100644 --- a/src/reHDD.cpp +++ b/src/reHDD.cpp @@ -305,7 +305,7 @@ void reHDD::searchDrives(list * plistDrives) char * cLine = NULL; size_t len = 0; - FILE* outputfileHwinfo = popen("lsblk -I 8 -d -o NAME", "r"); + FILE* outputfileHwinfo = popen("lsblk -e 11 -d -o NAME", "r"); if (outputfileHwinfo == NULL) { @@ -321,7 +321,16 @@ void reHDD::searchDrives(list * plistDrives) tmpDrive->state = Drive::NONE; tmpDrive->bIsOffline = false; plistDrives->push_back(*tmpDrive); - //Logger::logThis()->info("drive found: " + tmpDrive->getPath()); + //Logger::logThis()->info("SATA drive found: " + tmpDrive->getPath()); + } + + if (string(cLine).length() == 8) + { + Drive* tmpDrive = new Drive("/dev/" + string(cLine).substr(0, 7)); + tmpDrive->state = Drive::NONE; + tmpDrive->bIsOffline = false; + plistDrives->push_back(*tmpDrive); + //Logger::logThis()->info("NVME drive found: " + tmpDrive->getPath()); } } pclose(outputfileHwinfo);