Make CRYPT_WIPE_ENCRYPTED_ZERO obsolete.

It was never implemented (the idea was to speed up wipe), but
with the recent RNG performance changes it makes no longer sense.
This commit is contained in:
Milan Broz
2022-05-05 14:05:26 +02:00
parent 4d6e9e7c32
commit 5d9e362553
2 changed files with 3 additions and 7 deletions

View File

@@ -135,12 +135,8 @@ static int wipe_block(struct crypt_device *cd, int devfd, crypt_wipe_pattern pat
memset(sf, 0, wipe_block_size);
*need_block_init = false;
r = 0;
} else if (pattern == CRYPT_WIPE_RANDOM) {
r = crypt_random_get(cd, sf, wipe_block_size,
CRYPT_RND_NORMAL) ? -EIO : 0;
*need_block_init = true;
} else if (pattern == CRYPT_WIPE_ENCRYPTED_ZERO) {
// FIXME
} else if (pattern == CRYPT_WIPE_RANDOM ||
pattern == CRYPT_WIPE_ENCRYPTED_ZERO) {
r = crypt_random_get(cd, sf, wipe_block_size,
CRYPT_RND_NORMAL) ? -EIO : 0;
*need_block_init = true;