1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
lvm2/lib/config
Peter Rajnoha 34350963d1 dumpconfig: add --type, --atversion and --validate arg
lvm dumpconfig [--type {current|default|missing|new}] [--atversion] [--validate]

This patch adds above-mentioned args to lvm dumpconfig and it maps them
to creation and writing out a configuration tree of a specific type
(see also previous commit):

  - current maps to CFG_TYPE_CURRENT
  - default maps to CFG_TYPE_DEFAULT
  - missing maps to CFG_TYPE_MISSING
  - new maps to CFG_TYPE_NEW

If --type is not defined, dumpconfig defaults to "--type current"
which is the original behaviour of dumpconfig before all these changes.

The --validate option just validates current configuration tree
(lvm.conf/--config) and it writes a simple status message:

  "LVM configuration valid" or "LVM configuration invalid"
2013-03-06 10:46:36 +01: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 dumpconfig: add --type, --atversion and --validate arg 2013-03-06 10:46:36 +01:00
config.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
defaults.h config: refer to config nodes using assigned IDs 2013-03-06 10:14:33 +01:00