summaryrefslogtreecommitdiff
path: root/lib/commands/toolcontext.h
diff options
context:
space:
mode:
authorPeter Rajnoha <prajnoha@redhat.com>2013-06-26 14:53:57 +0200
committerPeter Rajnoha <prajnoha@redhat.com>2013-07-02 15:22:11 +0200
commitf1c292cc38f4ba2e8d9b7272bc1a1ce17bd729a5 (patch)
treecfddf4a2016df3b31103a8b5bfeb8c3544a796e2 /lib/commands/toolcontext.h
parent8769033e078c79ee4167c5186d7407d1729fd8a4 (diff)
downloadlvm2-f1c292cc38f4ba2e8d9b7272bc1a1ce17bd729a5.tar.gz
config: make it possible to run several instances of configuration check at once
Before, the status of the configuration check (config_def_check fn call) was saved directly in global configuration definitinion array (as part of the cfg_def_item_t/flags) This patch introduces the "struct cft_check_handle" that defines configuration check parameters as well as separate place to store the status (status here means CFG_USED and CFG_VALID flags, formerly saved in cfg_def_item_t/flags). This struct can hold config check parameters as well as the status for each config tree separately, thus making it possible to run several instances of config_def_check without interference.
Diffstat (limited to 'lib/commands/toolcontext.h')
-rw-r--r--lib/commands/toolcontext.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/commands/toolcontext.h b/lib/commands/toolcontext.h
index 42a4e54f2..2d90138ed 100644
--- a/lib/commands/toolcontext.h
+++ b/lib/commands/toolcontext.h
@@ -102,7 +102,9 @@ struct cmd_context {
struct profile_params *profile_params; /* profile handling params including loaded profile configs */
struct dm_config_tree *cft; /* the whole cascade: CONFIG_STRING -> CONFIG_PROFILE -> CONFIG_FILE/CONFIG_MERGED_FILES */
int config_initialized; /* used to reinitialize config if previous init was not successful */
+
struct dm_hash_table *cft_def_hash; /* config definition hash used for validity check (item type + item recognized) */
+ struct cft_check_handle *cft_check_handle;
/* selected settings with original default/configured value which can be changed during cmd processing */
struct config_info default_settings;