Add stand alone dm_resume_device routine.

This commit is contained in:
Ondrej Kozina
2018-12-06 11:03:23 +01:00
committed by Milan Broz
parent 3c1dc9cfaa
commit 2cd85ddf11
2 changed files with 15 additions and 0 deletions

View File

@@ -2243,6 +2243,20 @@ out:
return r;
}
int dm_resume_device(struct crypt_device *cd, const char *name, uint32_t flags)
{
int r;
if (dm_init_context(cd, DM_UNKNOWN))
return -ENOTSUP;
r = _dm_resume_device(name, flags);
dm_exit_context();
return r;
}
int dm_resume_and_reinstate_key(struct crypt_device *cd, const char *name,
const struct volume_key *vk)
{

View File

@@ -144,6 +144,7 @@ int dm_reload_device(struct crypt_device *cd, const char *name,
struct crypt_dm_active_device *dmd, unsigned resume);
int dm_suspend_device(struct crypt_device *cd, const char *name);
int dm_suspend_and_wipe_key(struct crypt_device *cd, const char *name);
int dm_resume_device(struct crypt_device *cd, const char *name, uint32_t flags);
int dm_resume_and_reinstate_key(struct crypt_device *cd, const char *name,
const struct volume_key *vk);