pclose instead fclose
This commit is contained in:
parent
c942f36e49
commit
f2db85aa33
|
@ -42,3 +42,6 @@
|
|||
reHDD
|
||||
|
||||
reHDD.log
|
||||
|
||||
|
||||
ignoreDrives.conf
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -38,5 +38,5 @@ void Delete::deleteDrive(Drive* drive)
|
|||
{
|
||||
//wipefs running
|
||||
}
|
||||
fclose(deleteCmdOutput);
|
||||
pclose(deleteCmdOutput);
|
||||
}
|
||||
|
|
|
@ -289,7 +289,6 @@ void reHDD::filterNewDrives(list <Drive>* plistOldDrives, list <Drive>* plistNew
|
|||
*/
|
||||
void reHDD::searchDrives(list <Drive>* 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 <Drive>* 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 <Drive>* 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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue