mirror of
https://github.com/martijnvanbrummelen/nwipe.git
synced 2026-02-20 13:42:14 +00:00
Fixed uninitialized io_blocksize in random pass
This commit is contained in:
@@ -393,6 +393,9 @@ int nwipe_random_pass( NWIPE_METHOD_SIGNATURE )
|
||||
syncRate = 0;
|
||||
}
|
||||
|
||||
/* Select effective I/O block size (e.g. 4 MiB, never smaller than st_blksize). */
|
||||
io_blocksize = nwipe_effective_io_blocksize( c );
|
||||
|
||||
/* Compute the per-write sync rate based on io_blocksize and old semantics. */
|
||||
syncRate = nwipe_compute_sync_rate_for_device( c, io_blocksize );
|
||||
|
||||
@@ -411,9 +414,6 @@ int nwipe_random_pass( NWIPE_METHOD_SIGNATURE )
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Select effective I/O block size (e.g. 4 MiB, never smaller than st_blksize). */
|
||||
io_blocksize = nwipe_effective_io_blocksize( c );
|
||||
|
||||
/*
|
||||
* Allocate a generic 16 MiB buffer (by default) that is used as the
|
||||
* scratch area for random data. We will only fill and write "blocksize"
|
||||
|
||||
Reference in New Issue
Block a user