summaryrefslogtreecommitdiff
path: root/lib/commands
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2014-12-15 16:27:33 +0100
committerPeter Rajnoha <prajnoha@redhat.com>2015-01-30 13:01:12 +0100
commitbf8943b0f63336272f3434455b906e0167e27b52 (patch)
treebf72e86724b2ad42162d2c281b9a70055af727e4 /lib/commands
parentc50a90c9e6084350682a315ed1732c2a54a3a828 (diff)
downloadlvm2-bf8943b0f63336272f3434455b906e0167e27b52.tar.gz
conf: add devices/external_device_info_source to lvm.conf
Diffstat (limited to 'lib/commands')
-rw-r--r--lib/commands/toolcontext.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 83238fbdd..e914e93bf 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -307,6 +307,7 @@ int process_profilable_config(struct cmd_context *cmd) {
static int _process_config(struct cmd_context *cmd)
{
mode_t old_umask;
+ const char *dev_ext_info_src;
const char *read_ahead;
struct stat st;
const struct dm_config_node *cn;
@@ -340,6 +341,16 @@ static int _process_config(struct cmd_context *cmd)
return_0;
#endif
+ dev_ext_info_src = find_config_tree_str(cmd, devices_external_device_info_source_CFG, NULL);
+ if (!strcmp(dev_ext_info_src, "none"))
+ init_external_device_info_source(DEV_EXT_NONE);
+ else if (!strcmp(dev_ext_info_src, "udev"))
+ init_external_device_info_source(DEV_EXT_UDEV);
+ else {
+ log_error("Invalid external device info source specification.");
+ return 0;
+ }
+
/* proc dir */
if (dm_snprintf(cmd->proc_dir, sizeof(cmd->proc_dir), "%s",
find_config_tree_str(cmd, global_proc_CFG, NULL)) < 0) {