log used syscall parameter
This commit is contained in:
parent
8c54e0e7d9
commit
85d3b99d35
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -122,6 +122,10 @@ void Shred::shredDrive(Drive* drive, int* ipSignalFd)
|
||||||
}
|
}
|
||||||
memset(buf, 0, blksz);
|
memset(buf, 0, blksz);
|
||||||
|
|
||||||
|
#ifdef LOG_LEVEL_HIGH
|
||||||
|
Logger::logThis()->info("Shred-Task: RandomRead: " + to_string(blksz) + " - Drive: " + drive->getSerial());
|
||||||
|
#endif
|
||||||
|
|
||||||
if (read(rsf, buf, blksz) <= 0) fprintf(stderr, "%s: read 0 bytes (wanted %zu)\n", randsrc, blksz);
|
if (read(rsf, buf, blksz) <= 0) fprintf(stderr, "%s: read 0 bytes (wanted %zu)\n", randsrc, blksz);
|
||||||
tfnge_init(&tfnge, buf);
|
tfnge_init(&tfnge, buf);
|
||||||
|
|
||||||
|
@ -141,6 +145,9 @@ void Shred::shredDrive(Drive* drive, int* ipSignalFd)
|
||||||
}
|
}
|
||||||
else if (!alwaysrand)
|
else if (!alwaysrand)
|
||||||
{
|
{
|
||||||
|
#ifdef LOG_LEVEL_HIGH
|
||||||
|
Logger::logThis()->info("Shred-Task: alwaysrand");
|
||||||
|
#endif
|
||||||
if (read(rsf, &rc, 1) <= 0) fprintf(stderr, "%s: read 0 bytes (wanted 1)\n", randsrc);
|
if (read(rsf, &rc, 1) <= 0) fprintf(stderr, "%s: read 0 bytes (wanted 1)\n", randsrc);
|
||||||
pat = rc%2;
|
pat = rc%2;
|
||||||
if (read(rsf, &rc, 1) <= 0) fprintf(stderr, "%s: read 0 bytes (wanted 1)\n", randsrc);
|
if (read(rsf, &rc, 1) <= 0) fprintf(stderr, "%s: read 0 bytes (wanted 1)\n", randsrc);
|
||||||
|
@ -193,6 +200,9 @@ void Shred::shredDrive(Drive* drive, int* ipSignalFd)
|
||||||
last = 1;
|
last = 1;
|
||||||
}
|
}
|
||||||
errno = 0;
|
errno = 0;
|
||||||
|
#ifdef LOG_LEVEL_HIGH
|
||||||
|
Logger::logThis()->info("Shred-Task: DriveWrite: " + to_string((noround && last) ? l : blksz) + " - Drive: " + drive->getSerial());
|
||||||
|
#endif
|
||||||
l -= write(f, buf, (noround && last) ? l : blksz);
|
l -= write(f, buf, (noround && last) ? l : blksz);
|
||||||
if (errno)
|
if (errno)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue