Print error message if crypt_load() detects unsupported version of LUKS.

This commit is contained in:
Milan Broz
2018-10-12 12:34:43 +02:00
parent 484692aacd
commit 8f350f9b9f

View File

@@ -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));