mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-05 16:00:05 +01:00
Do not require init_done for some deive helpers.
It processes only name, no need to depend on real device checks (for direct-io) etc.
This commit is contained in:
@@ -470,7 +470,7 @@ void device_free(struct crypt_device *cd, struct device *device)
|
||||
/* Get block device path */
|
||||
const char *device_block_path(const struct device *device)
|
||||
{
|
||||
if (!device || !device->init_done)
|
||||
if (!device)
|
||||
return NULL;
|
||||
|
||||
return device->path;
|
||||
@@ -482,7 +482,7 @@ const char *device_dm_name(const struct device *device)
|
||||
const char *dmdir = dm_get_dir();
|
||||
size_t dmdir_len = strlen(dmdir);
|
||||
|
||||
if (!device || !device->init_done)
|
||||
if (!device)
|
||||
return NULL;
|
||||
|
||||
if (strncmp(device->path, dmdir, dmdir_len))
|
||||
|
||||
Reference in New Issue
Block a user