mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-13 03:40:05 +01:00
cryptsetup-reencrypt: drop unreachable code path
MAKE_USABLE flag is never used in device_check()
This commit is contained in:
committed by
Milan Broz
parent
830edb22cf
commit
a0fc06280e
@@ -179,11 +179,6 @@ static int device_check(struct reenc_ctx *rc, header_magic set_magic)
|
|||||||
log_verbose(_("Marking LUKS device %s unusable.\n"), rc->device);
|
log_verbose(_("Marking LUKS device %s unusable.\n"), rc->device);
|
||||||
memcpy(buf, NOMAGIC, MAGIC_L);
|
memcpy(buf, NOMAGIC, MAGIC_L);
|
||||||
r = 0;
|
r = 0;
|
||||||
} else if (set_magic == MAKE_USABLE && !memcmp(buf, NOMAGIC, MAGIC_L) &&
|
|
||||||
version == 1) {
|
|
||||||
log_verbose(_("Marking LUKS device %s usable.\n"), rc->device);
|
|
||||||
memcpy(buf, MAGIC, MAGIC_L);
|
|
||||||
r = 0;
|
|
||||||
} else if (set_magic == CHECK_UNUSABLE && version == 1) {
|
} else if (set_magic == CHECK_UNUSABLE && version == 1) {
|
||||||
r = memcmp(buf, NOMAGIC, MAGIC_L) ? -EINVAL : 0;
|
r = memcmp(buf, NOMAGIC, MAGIC_L) ? -EINVAL : 0;
|
||||||
if (!r)
|
if (!r)
|
||||||
|
|||||||
Reference in New Issue
Block a user