Unify checking for LUKS2 intermediate device.

Use dm_get_active_iname that should be used on all places.

This function return integrioty device name if it shoudl be
maintained by LUKS2 context directly.

Code must not touch other devices that it does not own.
This commit is contained in:
Milan Broz
2025-05-03 21:26:03 +02:00
parent 352cda0302
commit d967c9aaf0
6 changed files with 76 additions and 58 deletions

View File

@@ -223,6 +223,7 @@ int dm_cancel_deferred_removal(const char *name);
const char *dm_get_dir(void);
int dm_get_iname(const char *name, char **iname, bool with_path);
char *dm_get_active_iname(struct crypt_device *cd, const char *name);
int lookup_dm_dev_by_uuid(struct crypt_device *cd, const char *uuid, const char *type);