1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib/config
Peter Rajnoha da3ea66a96 config: add config_source_t type to identify configuration source
A helper type that helps with identification of the configuration source
which makes handling the configuration cascade a bit easier, mainly
removing and adding configuration trees to cascade dynamically.

Currently, the possible types are:

  CONFIG_UNDEFINED - configuration is not defined yet (not initialized)
  CONFIG_FILE - one file configuration
  CONFIG_MERGED_FILES - configuration that is a result of merging more files into one
  CONFIG_STRING - configuration string typed on cmd line directly
  CONFIG_PROFILE - profile configuration (the new type of configuration, patches will follow...)

Also, generalize existing "remove_overridden_config_tree" to work with
configuration type identification in a cascade. Before, it was just
the CONFIG_STRING we used. Now, we need some more to add in a
cascade (like the CONFIG_PROFILE). So, we have:

  struct dm_config_tree *remove_config_tree_by_source(struct cmd_context *cmd, config_source_t source);
  config_source_t config_get_source_type(struct dm_config_tree *cft);

... for removing the tree by its source type from the cascade and
simply getting the source type.
2013-07-02 15:19:08 +02:00
..
config_settings.h config: use config checks and add support for creating trees from config definition (config_def_create_tree fn) 2013-03-06 10:46:35 +01:00
config.c config: add config_source_t type to identify configuration source 2013-07-02 15:19:08 +02:00
config.h config: add config_source_t type to identify configuration source 2013-07-02 15:19:08 +02:00
defaults.h config: make DEFAULT_MAX_HISTORY unconditional 2013-03-06 12:47:23 +01:00