mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Move wipe debug message and add alignment info.
This commit is contained in:
@@ -172,6 +172,10 @@ int crypt_wipe_device(struct crypt_device *cd,
|
||||
/* Note: LUKS1 calls it with wipe_block not aligned to multiple of bsize */
|
||||
bsize = device_block_size(cd, device);
|
||||
alignment = device_alignment(device);
|
||||
|
||||
log_dbg(cd, "Wipe device %s [%u], offset %" PRIu64 ", length %" PRIu64 ", block %zu, bsize %zu, align %zu.",
|
||||
device_path(device), (unsigned)pattern, offset, length, wipe_block_size, bsize, alignment);
|
||||
|
||||
if (!bsize || !alignment || !wipe_block_size)
|
||||
return -EINVAL;
|
||||
|
||||
@@ -287,9 +291,6 @@ int crypt_wipe(struct crypt_device *cd,
|
||||
if (!wipe_block_size)
|
||||
wipe_block_size = 1024*1024;
|
||||
|
||||
log_dbg(cd, "Wipe [%u] device %s, offset %" PRIu64 ", length %" PRIu64 ", block %zu.",
|
||||
(unsigned)pattern, device_path(device), offset, length, wipe_block_size);
|
||||
|
||||
r = crypt_wipe_device(cd, device, pattern, offset, length,
|
||||
wipe_block_size, progress, usrptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user