From aaf469565606335dc0121a51dd58b3f3a0aaf68d Mon Sep 17 00:00:00 2001 From: localhorst Date: Sun, 7 Dec 2025 17:51:16 +0100 Subject: [PATCH 1/2] IPC connection type --- include/printer.h | 2 +- src/printer.cpp | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/include/printer.h b/include/printer.h index b67a1e4..6fbfccf 100644 --- a/include/printer.h +++ b/include/printer.h @@ -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 diff --git a/src/printer.cpp b/src/printer.cpp index 7bf620a..0e8c60f 100644 --- a/src/printer.cpp +++ b/src/printer.cpp @@ -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)) -- 2.50.1 From 47ab9cc36f7055ee17ec1befef2f6d6afb68a76e Mon Sep 17 00:00:00 2001 From: localhorst Date: Sun, 7 Dec 2025 18:04:52 +0100 Subject: [PATCH 2/2] update Version --- include/reHDD.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/reHDD.h b/include/reHDD.h index 78fbd11..893b0bd 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 "V1.2.1" // Drive handling Settings #define WORSE_HOURS 19200 // mark drive if at this limit or beyond -- 2.50.1