Merge pull request 'feature/drive-type-ipc' (#80) from feature/drive-type-ipc into master
Reviewed-on: #80
This commit is contained in:
@ -26,11 +26,11 @@ typedef struct
|
||||
char caDriveShredDuration[STR_BUFFER_SIZE];
|
||||
char caDriveCapacity[STR_BUFFER_SIZE];
|
||||
char caDriveState[STR_BUFFER_SIZE];
|
||||
char caDriveConnectionType[STR_BUFFER_SIZE];
|
||||
char caDriveModelFamily[STR_BUFFER_SIZE];
|
||||
char caDriveModelName[STR_BUFFER_SIZE];
|
||||
char caDriveSerialnumber[STR_BUFFER_SIZE];
|
||||
char caDriveReHddVersion[STR_BUFFER_SIZE];
|
||||
|
||||
} t_driveData;
|
||||
|
||||
typedef struct
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
#ifndef REHDD_H_
|
||||
#define REHDD_H_
|
||||
|
||||
#define REHDD_VERSION "V1.2.0"
|
||||
#define REHDD_VERSION "V1.2.1"
|
||||
|
||||
// Drive handling Settings
|
||||
#define WORSE_HOURS 19200 // mark drive if at this limit or beyond
|
||||
|
||||
@ -53,6 +53,23 @@ void Printer::print(Drive *drive)
|
||||
sprintf(msgQueueData.driveData.caDriveErrors, "%i", drive->getErrorCount());
|
||||
sprintf(msgQueueData.driveData.caDriveShredTimestamp, "%li", drive->getActionStartTimestamp());
|
||||
sprintf(msgQueueData.driveData.caDriveShredDuration, "%li", drive->getTaskDuration());
|
||||
|
||||
switch (drive->connectionType)
|
||||
{
|
||||
case Drive::USB:
|
||||
strcpy(msgQueueData.driveData.caDriveConnectionType, "usb");
|
||||
break;
|
||||
case Drive::SATA:
|
||||
strcpy(msgQueueData.driveData.caDriveConnectionType, "sata");
|
||||
break;
|
||||
case Drive::NVME:
|
||||
strcpy(msgQueueData.driveData.caDriveConnectionType, "nvme");
|
||||
break;
|
||||
case Drive::UNKNOWN:
|
||||
default:
|
||||
strcpy(msgQueueData.driveData.caDriveConnectionType, "na");
|
||||
}
|
||||
|
||||
sprintf(msgQueueData.driveData.caDriveReHddVersion, REHDD_VERSION);
|
||||
|
||||
if (-1 == msgsnd(this->msqid, &msgQueueData, sizeof(t_msgQueueData) - sizeof(long), 0))
|
||||
|
||||
Reference in New Issue
Block a user