mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-13 20:00:08 +01:00
Add error message when suspending wrong device.
In case user tries to suspend LUKS data device instead of dm-crypt mapping. See issue#622.
This commit is contained in:
committed by
Milan Broz
parent
93382071a5
commit
969be38a7a
@@ -2214,8 +2214,11 @@ static int action_luksSuspend(void)
|
|||||||
int r;
|
int r;
|
||||||
|
|
||||||
r = crypt_init_by_name_and_header(&cd, action_argv[0], uuid_or_device(opt_header_device));
|
r = crypt_init_by_name_and_header(&cd, action_argv[0], uuid_or_device(opt_header_device));
|
||||||
if (!r)
|
if (!r) {
|
||||||
r = crypt_suspend(cd, action_argv[0]);
|
r = crypt_suspend(cd, action_argv[0]);
|
||||||
|
if (r == -ENODEV)
|
||||||
|
log_err(_("%s is not active %s device name."), action_argv[0], "LUKS");
|
||||||
|
}
|
||||||
|
|
||||||
crypt_free(cd);
|
crypt_free(cd);
|
||||||
return r;
|
return r;
|
||||||
|
|||||||
Reference in New Issue
Block a user