mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-11 19:00:02 +01:00
Return suspended status also for unknow target types.
This patch allows dm_status_suspended() to report if device is suspended or not also for unknown target types from libcryptsetup perspective (e.g.: dm-cache).
This commit is contained in:
@@ -1911,7 +1911,7 @@ int dm_status_suspended(struct crypt_device *cd, const char *name)
|
|||||||
r = dm_status_dmi(name, &dmi, NULL, NULL);
|
r = dm_status_dmi(name, &dmi, NULL, NULL);
|
||||||
dm_exit_context();
|
dm_exit_context();
|
||||||
|
|
||||||
if (r < 0)
|
if (r < 0 && r != -EEXIST)
|
||||||
return r;
|
return r;
|
||||||
|
|
||||||
return dmi.suspended ? 1 : 0;
|
return dmi.suspended ? 1 : 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user