mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Add new internal state marking resilience type as not set.
This commit is contained in:
@@ -139,7 +139,8 @@ typedef struct {
|
||||
} keyslot_handler;
|
||||
|
||||
struct reenc_protection {
|
||||
enum { REENC_PROTECTION_NONE = 0, /* none should be 0 always */
|
||||
enum { REENC_PROTECTION_NOT_SET = 0,
|
||||
REENC_PROTECTION_NONE,
|
||||
REENC_PROTECTION_CHECKSUM,
|
||||
REENC_PROTECTION_JOURNAL,
|
||||
REENC_PROTECTION_DATASHIFT } type;
|
||||
|
||||
@@ -1229,6 +1229,9 @@ static int reencrypt_hotzone_protect_ready(struct crypt_device *cd,
|
||||
{
|
||||
assert(rp);
|
||||
|
||||
if (rp->type == REENC_PROTECTION_NOT_SET)
|
||||
return -EINVAL;
|
||||
|
||||
if (rp->type != REENC_PROTECTION_CHECKSUM)
|
||||
return 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user