diff --git a/.gitignore b/.gitignore index ee41a9d..9862cb4 100644 --- a/.gitignore +++ b/.gitignore @@ -42,3 +42,6 @@ reHDD reHDD.log + + +ignoreDrives.conf diff --git a/include/reHDD.h b/include/reHDD.h index 48c5733..755ce7a 100644 --- a/include/reHDD.h +++ b/include/reHDD.h @@ -8,7 +8,7 @@ #ifndef REHDD_H_ #define REHDD_H_ -#define REHDD_VERSION "bV0.2.0" +#define REHDD_VERSION "bV0.2.1" // Drive handling Settings #define WORSE_HOURS 19200 //mark drive if at this limit or beyond @@ -18,7 +18,7 @@ // Logger Settings #define LOG_PATH "./reHDD.log" -#define DESCRIPTION "reHDD - Copyright Hendrik Schutter 2020" +#define DESCRIPTION "reHDD - Copyright Hendrik Schutter 2022" #define DEVICE_ID "generic" #define SOFTWARE_VERSION "alpha" #define HARDWARE_VERSION "generic" diff --git a/src/delete.cpp b/src/delete.cpp index 68b2984..0d60b25 100644 --- a/src/delete.cpp +++ b/src/delete.cpp @@ -38,5 +38,5 @@ void Delete::deleteDrive(Drive* drive) { //wipefs running } - fclose(deleteCmdOutput); + pclose(deleteCmdOutput); } diff --git a/src/reHDD.cpp b/src/reHDD.cpp index 5cc7443..9695079 100644 --- a/src/reHDD.cpp +++ b/src/reHDD.cpp @@ -289,7 +289,6 @@ void reHDD::filterNewDrives(list * plistOldDrives, list * plistNew */ void reHDD::searchDrives(list * plistDrives) { - // cout << "search drives ..." << endl; Logger::logThis()->info("--> search drives <--"); char * cLine = NULL; size_t len = 0; @@ -310,10 +309,10 @@ 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("drive found: " + tmpDrive->getPath()); } } - fclose(outputfileHwinfo); + pclose(outputfileHwinfo); } /** @@ -378,7 +377,7 @@ void reHDD::filterIgnoredDrives(list * plistDrives) //cout << "blkid uuid:" << sUUID << endl; } } - fclose(outputfileBlkid); + pclose(outputfileBlkid); //cout << "blkid uuid:" << sUUID << endl; if (get<1>(row).compare(sUUID)) //compare uuid from ignore file and uuid from drive diff --git a/src/smart.cpp b/src/smart.cpp index 815ef00..1a787af 100644 --- a/src/smart.cpp +++ b/src/smart.cpp @@ -51,7 +51,7 @@ void SMART::readSMARTData(Drive* drive) SMART::parsePowerOnHours(sLine); SMART::parsePowerCycle(sLine); } - fclose(outputfileSmart); + pclose(outputfileSmart); drive->setDriveSMARTData(modelFamily, modelName, serial, capacity, errorCount, powerOnHours, powerCycle); //wirte data in drive }