summaryrefslogtreecommitdiff
path: root/lib/commands
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2022-10-24 16:15:53 -0500
committerDavid Teigland <teigland@redhat.com>2022-10-24 16:20:28 -0500
commit830ece75e80b1779de5e81e3424a8ee756f66f88 (patch)
tree68b973a36b69de838eb8fbc7799cdc90abb84e6f /lib/commands
parent94dde5769984c5ede211d122cc7392a26f8dbef4 (diff)
downloadlvm2-830ece75e80b1779de5e81e3424a8ee756f66f88.tar.gz
cmd: save device_id_sysfs_dir
read and save device_id_sysfs_dir to avoid spamming debug output from find_config_tree_str.
Diffstat (limited to 'lib/commands')
-rw-r--r--lib/commands/toolcontext.c1
-rw-r--r--lib/commands/toolcontext.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 2666d7b42..b630554a9 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -643,6 +643,7 @@ static int _process_config(struct cmd_context *cmd)
if (!dm_set_uuid_prefix(UUID_PREFIX))
return_0;
#endif
+ cmd->device_id_sysfs_dir = find_config_tree_str(cmd, devices_device_id_sysfs_dir_CFG, NULL);
dev_ext_info_src = find_config_tree_str(cmd, devices_external_device_info_source_CFG, NULL);
diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h
index eb2d1922b..32bfda57a 100644
--- a/lib/commands/toolcontext.h
+++ b/lib/commands/toolcontext.h
@@ -247,6 +247,7 @@ struct cmd_context {
* Paths.
*/
const char *lib_dir; /* cache value global/library_dir */
+ const char *device_id_sysfs_dir;
char system_dir[PATH_MAX];
char dev_dir[PATH_MAX];
char proc_dir[PATH_MAX];