mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-18 14:20:09 +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:
@@ -2234,8 +2234,11 @@ static int action_luksSuspend(void)
|
||||
int r;
|
||||
|
||||
r = crypt_init_by_name_and_header(&cd, action_argv[0], uuid_or_device(ARG_STR(OPT_HEADER_ID)));
|
||||
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