Skip to content

Commit 58db7d2

Browse files
committed
Move wipe debug message and add alignment info.
1 parent dd68e53 commit 58db7d2

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

lib/utils_wipe.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,10 @@ int crypt_wipe_device(struct crypt_device *cd,
172172
/* Note: LUKS1 calls it with wipe_block not aligned to multiple of bsize */
173173
bsize = device_block_size(cd, device);
174174
alignment = device_alignment(device);
175+
176+
log_dbg(cd, "Wipe device %s [%u], offset %" PRIu64 ", length %" PRIu64 ", block %zu, bsize %zu, align %zu.",
177+
device_path(device), (unsigned)pattern, offset, length, wipe_block_size, bsize, alignment);
178+
175179
if (!bsize || !alignment || !wipe_block_size)
176180
return -EINVAL;
177181

@@ -287,9 +291,6 @@ int crypt_wipe(struct crypt_device *cd,
287291
if (!wipe_block_size)
288292
wipe_block_size = 1024*1024;
289293

290-
log_dbg(cd, "Wipe [%u] device %s, offset %" PRIu64 ", length %" PRIu64 ", block %zu.",
291-
(unsigned)pattern, device_path(device), offset, length, wipe_block_size);
292-
293294
r = crypt_wipe_device(cd, device, pattern, offset, length,
294295
wipe_block_size, progress, usrptr);
295296

0 commit comments

Comments
 (0)