mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-12 19:30:04 +01:00
Detect old dm-crypt module and disable LUKS suspend/resume.
Fix apitest to work on older systems. git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@205 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
@@ -1304,7 +1304,9 @@ int crypt_suspend(struct crypt_device *cd,
|
||||
}
|
||||
|
||||
r = dm_suspend_and_wipe_key(name);
|
||||
if (r)
|
||||
if (r == -ENOTSUP)
|
||||
log_err(cd, "Suspend is not supported for device %s.\n", name);
|
||||
else if (r)
|
||||
log_err(cd, "Error during suspending device %s.\n", name);
|
||||
out:
|
||||
if (!cd)
|
||||
@@ -1348,7 +1350,9 @@ int crypt_resume_by_passphrase(struct crypt_device *cd,
|
||||
if (r >= 0) {
|
||||
keyslot = r;
|
||||
r = dm_resume_and_reinstate_key(name, mk->keyLength, mk->key);
|
||||
if (r)
|
||||
if (r == -ENOTSUP)
|
||||
log_err(cd, "Resume is not supported for device %s.\n", name);
|
||||
else if (r)
|
||||
log_err(cd, "Error during resuming device %s.\n", name);
|
||||
} else
|
||||
r = keyslot;
|
||||
|
||||
Reference in New Issue
Block a user