summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2015-04-21 16:01:15 -0500
committerDavid Teigland <teigland@redhat.com>2015-04-21 16:03:54 -0500
commit2e035162a13d9ed6036b1bd8cdacbfa7ba1fd748 (patch)
tree69baff16907215531d45dcc1bd592cb7f7a9b327
parent3b15f79bf02d5276fa352cdb87fa0a80a34c1465 (diff)
downloadlvm2-2e035162a13d9ed6036b1bd8cdacbfa7ba1fd748.tar.gz
config: thin_repair_options and cache_repair_options are undefined
By default these are empty strings, so the config settings should be flagged as undefined, so they will be commented out of the generated config. Otherwise, the lines: thin_repair_options="" cache_repair_options="" in the dump output cause a warning when processed since lvm doesn't want an empty string. Also regenerate lvm.conf.in.
-rw-r--r--conf/example.conf.in6
-rw-r--r--lib/config/config_settings.h4
2 files changed, 6 insertions, 4 deletions
diff --git a/conf/example.conf.in b/conf/example.conf.in
index 48090cf0b..eedefb537 100644
--- a/conf/example.conf.in
+++ b/conf/example.conf.in
@@ -867,7 +867,8 @@ global {
# Configuration option global/thin_repair_options.
# String of options passed to the thin_repair command.
- thin_repair_options=""
+ # This configuration option does not have a default value defined.
+# thin_repair_options=""
# Configuration option global/thin_disabled_features.
# Features to not use in the thin driver.
@@ -913,7 +914,8 @@ global {
# Configuration option global/cache_repair_options.
# String of options passed to the cache_repair command.
- cache_repair_options=""
+ # This configuration option does not have a default value defined.
+# cache_repair_options=""
# Configuration option global/system_id_source.
# The method LVM uses to set the local system ID.
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index 78304ed78..1a0ebf70d 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -820,7 +820,7 @@ cfg_array(global_thin_check_options_CFG, "thin_check_options", global_CFG_SECTIO
"With thin_check version 3.2 or newer you should add\n"
"--clear-needs-check-flag.\n")
-cfg_array(global_thin_repair_options_CFG, "thin_repair_options", global_CFG_SECTION, 0, CFG_TYPE_STRING, "#S" DEFAULT_THIN_REPAIR_OPTIONS, vsn(2, 2, 100), NULL,
+cfg_array(global_thin_repair_options_CFG, "thin_repair_options", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, "#S" DEFAULT_THIN_REPAIR_OPTIONS, vsn(2, 2, 100), NULL,
"String of options passed to the thin_repair command.\n")
cfg_array(global_thin_disabled_features_CFG, "thin_disabled_features", global_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, NULL, vsn(2, 2, 99), NULL,
@@ -860,7 +860,7 @@ cfg(global_cache_repair_executable_CFG, "cache_repair_executable", global_CFG_SE
cfg_array(global_cache_check_options_CFG, "cache_check_options", global_CFG_SECTION, 0, CFG_TYPE_STRING, "#S" DEFAULT_CACHE_CHECK_OPTIONS, vsn(2, 2, 108), NULL,
"String of options passed to the cache_check command.\n")
-cfg_array(global_cache_repair_options_CFG, "cache_repair_options", global_CFG_SECTION, 0, CFG_TYPE_STRING, "#S" DEFAULT_CACHE_REPAIR_OPTIONS, vsn(2, 2, 108), NULL,
+cfg_array(global_cache_repair_options_CFG, "cache_repair_options", global_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, "#S" DEFAULT_CACHE_REPAIR_OPTIONS, vsn(2, 2, 108), NULL,
"String of options passed to the cache_repair command.\n")
cfg(global_system_id_source_CFG, "system_id_source", global_CFG_SECTION, 0, CFG_TYPE_STRING, DEFAULT_SYSTEM_ID_SOURCE, vsn(2, 2, 117), NULL,