mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 19:00:02 +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;
|
||||
|
||||
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]);
|
||||
if (r == -ENODEV)
|
||||
log_err(_("%s is not active %s device name."), action_argv[0], "LUKS");
|
||||
}
|
||||
|
||||
crypt_free(cd);
|
||||
return r;
|
||||
|
||||
Reference in New Issue
Block a user