]> sourceware.org Git - lvm2.git/commit
config: fix some settings incorrectly marked as CFG_DEFAULT_COMMENTED instead of...
authorPeter Rajnoha <prajnoha@redhat.com>
Wed, 17 Jun 2015 11:26:11 +0000 (13:26 +0200)
committerPeter Rajnoha <prajnoha@redhat.com>
Wed, 17 Jun 2015 11:34:31 +0000 (13:34 +0200)
commita9bc53d5f33afd5c4c3ad36450146f753c568a7c
tree811a843ab7145dc13f24b7aba9a7cef507dd34b4
parentda1f88706060baf03bceb9e4d788c65646b831b7
config: fix some settings incorrectly marked as CFG_DEFAULT_COMMENTED instead of CFG_DEFAULT_UNDEFINED and causing segfault

This patch fixes segfault which was caused by incorrectly marking some
settings CFG_DEFAULT_COMMENTED instead of CFG_DEFAULT_UNDEFINED - the
ones which have NULL default value, hence they're really undefined.
A regression caused by a98ceceb1d101f0b19a6115f406e23f13feab5ae.

For example:

$ lvmconfig log/file
file="/a"

Before this patch:

$ lvmconfig --type diff
Segmentation fault (core dumped)

With this patch applied:

$ lvmconfig --type diff
log {
file="/a"
}

The same applies for these settings:

  log/activate_file
  global/library_dir
  global/system_id_file
  <disk_area>/disk_area_id

There were also other settings with NULL default value and marked as
CFG_DEFAULT_COMMENTED instead of CFG_DEFAULT_UNDEFINED, but they were
cfg_array config settings where the NULL value was not causing segfault
(NULL == empty array).
WHATS_NEW
lib/config/config_settings.h
This page took 0.040427 seconds and 5 git commands to generate.