mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 10:50:01 +01:00
Print error message if crypt_load() detects unsupported version of LUKS.
This commit is contained in:
@@ -782,8 +782,11 @@ static int _crypt_load_luks(struct crypt_device *cd, const char *requested_type,
|
||||
* perform repair.
|
||||
*/
|
||||
r = _crypt_load_luks2(cd, cd->type != NULL, repair);
|
||||
} else
|
||||
} else {
|
||||
if (version > 2)
|
||||
log_err(cd, _("Unsupported LUKS version %d."), version);
|
||||
r = -EINVAL;
|
||||
}
|
||||
out:
|
||||
crypt_memzero(&hdr, sizeof(hdr));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user