mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-21 22:04:19 +03:00
687bc5cecf
If configuration consists of several sources in config cascade ("config cascade" defined in man lvmconfig(8)), lvmconfig displayed only difference from defaults of the topmost config in the cascade. Fix lvmconfig to display complete difference, considering all the configuration in the cascade. For example, before this patch: (use_lvmetad=0 set in lvm.conf which differs from defaults) $ lvmconfig --type diff global { use_lvmetad=0 } (compact_output=1 set on cmd line) $ lvmconfig --type diff --config report/compact_output=1 report { compact_output=1 } (headings=0 set in profile) $ lvmconfig --type diff --commandprofile test report { headings=0 } (difference in topmost configuration source is displayed) $ lvmconfig --type diff --commandprofile test --config report/compact_output=1 report { compact_output=1 } With this patch applied (the config cascade is merged before looking for difference from defaults in configuration): $ lvmconfig --type diff global { use_lvmetad=0 } $ lvmconfig --type diff --config report/compact_output=1 report { compact_output=1 } global { use_lvmetad=0 } $ lvmconfig --type diff --profile test report { headings=0 } global { use_lvmetad=0 } $ lvmconfig --type diff --profile test --config report/compact_output=1 report { headings=0 compact_output=1 } global { use_lvmetad=0 }