diff options
Diffstat (limited to 'lib/device/device_id.c')
-rw-r--r-- | lib/device/device_id.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/device/device_id.c b/lib/device/device_id.c index 252654861..34469e262 100644 --- a/lib/device/device_id.c +++ b/lib/device/device_id.c @@ -193,9 +193,7 @@ static int _read_sys_block(struct cmd_context *cmd, struct device *dev, dev_t prim = 0; int ret; - if (!(sysfs_dir = find_config_tree_str(cmd, devices_device_id_sysfs_dir_CFG, NULL))) - sysfs_dir = dm_sysfs_dir(); - + sysfs_dir = cmd->device_id_sysfs_dir ?: dm_sysfs_dir(); retry: if (dm_snprintf(path, sizeof(path), "%sdev/block/%d:%d/%s", sysfs_dir, (int)MAJOR(devt), (int)MINOR(devt), suffix) < 0) { |