From 716ab5614f57c14d58e2c5e512244037dec1915d Mon Sep 17 00:00:00 2001 From: localhorst Date: Fri, 1 May 2026 15:28:02 +0200 Subject: [PATCH] add comments --- src/shred.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/shred.cpp b/src/shred.cpp index 283f3cb..faac86a 100644 --- a/src/shred.cpp +++ b/src/shred.cpp @@ -455,8 +455,10 @@ int Shred::shredDrive(Drive *drive, int *ipSignalFd) if ((d32Percent - d32TmpPercent) >= 0.01) { + // set shred percentage drive->setTaskPercentage(d32TmpPercent); d32TmpPercent = d32Percent; + // signal process in shredding write(*ipSignalFd, "A", 1); } @@ -563,7 +565,7 @@ double Shred::calcProgress() unsigned int uiMaxShredIteration = SHRED_ITERATIONS; #ifdef ZERO_CHECK - uiMaxShredIteration++; + uiMaxShredIteration++; // increment because we will check after SHRED_ITERATIONS the drive for non-zero bytes #endif if (this->ulDriveByteSize == 0) @@ -641,6 +643,8 @@ unsigned int Shred::uiCalcChecksum(fileDescriptor file, Drive *drive, int *ipSig unsigned int uiChecksum = 0; unsigned long ulDriveByteCounter = 0U; + Logger::logThis()->info("Check-Task: Starting checksum verification - Drive: " + drive->getSerial()); + #ifdef ADAPTIVE_CHUNK_SIZE size_t checkChunkSize = CHUNK_SIZE_MAX; #else