random
This commit is contained in:
parent
e7a1cb1887
commit
45dac1a4a7
File diff suppressed because it is too large
Load Diff
|
@ -76,18 +76,19 @@ int Shred::shredDrive(Drive* drive, int* ipSignalFd)
|
|||
unsigned long ulDriveByteCounter = 0U; //used for one shred-iteration to keep track of the current drive position
|
||||
uint32_t u32ChunkDimensionIndex = 0U;
|
||||
|
||||
|
||||
/*
|
||||
if(uiShredIterationCounter == (SHRED_ITERATIONS-1))
|
||||
{
|
||||
//last shred iteration --> overwrite with zeros instead with random data
|
||||
memset(caChunk, 0U, CHUNK_DIMENSION*CHUNK_SIZE);
|
||||
}
|
||||
*/
|
||||
|
||||
while (ulDriveByteCounter < ulDriveByteSize)
|
||||
{
|
||||
int iBytesToShred = 0; //Bytes that will be overwritten in this chunk-iteration
|
||||
/*
|
||||
if((u32ChunkDimensionIndex == 0U) && (uiShredIterationCounter != (SHRED_ITERATIONS-1)))
|
||||
|
||||
if((u32ChunkDimensionIndex == 0U))
|
||||
{
|
||||
//read new chunks from random source if needed and this is NOT the last shred iteration
|
||||
unsigned long ulBytesInChunkBuffer = 0U;
|
||||
|
@ -114,7 +115,7 @@ int Shred::shredDrive(Drive* drive, int* ipSignalFd)
|
|||
#endif
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
if((ulDriveByteSize-ulDriveByteCounter) < CHUNK_SIZE)
|
||||
{
|
||||
iBytesToShred = (ulDriveByteSize-ulDriveByteCounter);
|
||||
|
|
Loading…
Reference in New Issue