Show error when trying to run fvault2Dump on a non-fvault device

This commit is contained in:
Vojtech Trefny
2022-09-28 17:13:38 +02:00
committed by Milan Broz
parent cb9deaf354
commit 4bce6d5962

View File

@@ -706,8 +706,10 @@ static int action_fvault2Dump(void)
goto out;
r = crypt_load(cd, CRYPT_FVAULT2, NULL);
if (r < 0)
if (r < 0) {
log_err(_("Device %s is not a valid FVAULT2 device."), action_argv[0]);
goto out;
}
if (ARG_SET(OPT_DUMP_VOLUME_KEY_ID))
r = fvault2Dump_with_volume_key(cd);