1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00
lvm2/lib/commands
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
..
errors.h pre-release tidy up 2009-06-30 18:39:31 +00:00
toolcontext.c config: add config_source_t type to identify configuration source 2013-07-02 15:19:08 +02:00
toolcontext.h refactor: make device type recognition code common for general use 2013-06-12 12:08:56 +02:00