diff --git a/lib/libcryptsetup.h b/lib/libcryptsetup.h index 07695c59..dd144adc 100644 --- a/lib/libcryptsetup.h +++ b/lib/libcryptsetup.h @@ -1996,7 +1996,7 @@ int crypt_keyfile_read(struct crypt_device *cd, typedef enum { CRYPT_WIPE_ZERO, /**< Fill with zeroes */ CRYPT_WIPE_RANDOM, /**< Use RNG to fill data */ - CRYPT_WIPE_ENCRYPTED_ZERO, /**< Add encryption and fill with zeroes as plaintext */ + CRYPT_WIPE_ENCRYPTED_ZERO, /**< Obsolete, same as CRYPT_WIPE_RANDOM */ CRYPT_WIPE_SPECIAL, /**< Compatibility only, do not use (Gutmann method) */ } crypt_wipe_pattern; diff --git a/lib/utils_wipe.c b/lib/utils_wipe.c index 43fb8b6c..285a9e77 100644 --- a/lib/utils_wipe.c +++ b/lib/utils_wipe.c @@ -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;