From 4bce6d59628e92347a81fd907ff85b3e338d2fe5 Mon Sep 17 00:00:00 2001 From: Vojtech Trefny Date: Wed, 28 Sep 2022 17:13:38 +0200 Subject: [PATCH] Show error when trying to run fvault2Dump on a non-fvault device --- src/cryptsetup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cryptsetup.c b/src/cryptsetup.c index 68604c70..ac854b37 100644 --- a/src/cryptsetup.c +++ b/src/cryptsetup.c @@ -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);