]> sourceware.org Git - lvm2.git/commitdiff
config: fix verbose type to int
authorM.H. Tsai <mingnus@gmail.com>
Wed, 27 Jan 2016 11:11:03 +0000 (19:11 +0800)
committerZdenek Kabelac <zkabelac@redhat.com>
Thu, 11 Feb 2016 17:30:39 +0000 (18:30 +0100)
'verbose' was marked as a boolean option while it
takes integer args - so it has limited usage to 0 or 1,
but we supported 0-4 at least.

Fix it by switching to corrent int type.
(Hopefully noone was trying to use this variable as true/yes/false/no
way - as the would be unsupported/undocumented).

WHATS_NEW
lib/commands/toolcontext.c
lib/config/config_settings.h

index 002217d484d4f8f20c87e42ac6a87c256bf1a615..a757f799f1c742d1e175a748a0e9f5ba85c9e357 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.142 - 
 ====================================
+  Fix config type of 'log/verbose' from bool to int (2.02.99).
   Fix thinp watermark calc for data LV for faster dmeventd responce (2.02.133).
   Use use_blkid_wiping=0 if not defined in lvm.conf and support not compiled in.
   Do not check for suspended devices if scanning for lvmetad update.
index 4f94df4af7717aed8010d99be9e57f456b97bc30..1d7ca58986b283ef2ad34f7bfd2d5af5357f03cc 100644 (file)
@@ -315,7 +315,7 @@ static void _init_logging(struct cmd_context *cmd)
        init_silent(cmd->default_settings.silent);
 
        /* Verbose level for tty output */
-       cmd->default_settings.verbose = find_config_tree_bool(cmd, log_verbose_CFG, NULL);
+       cmd->default_settings.verbose = find_config_tree_int(cmd, log_verbose_CFG, NULL);
        init_verbose(cmd->default_settings.verbose + VERBOSE_BASE_LEVEL);
 
        /* Log message formatting */
index e554b8eddcdb6ce33702f764f20db18d8452a022..1143c8b6ea5867aa6cb085679d1301d6b6200816 100644 (file)
@@ -535,7 +535,7 @@ cfg_runtime(allocation_thin_pool_chunk_size_CFG, "thin_pool_chunk_size", allocat
 cfg(allocation_physical_extent_size_CFG, "physical_extent_size", allocation_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_INT, DEFAULT_EXTENT_SIZE, vsn(2, 2, 112), NULL, 0, NULL,
        "Default physical extent size in KiB to use for new VGs.\n")
 
-cfg(log_verbose_CFG, "verbose", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_VERBOSE, vsn(1, 0, 0), NULL, 0, NULL,
+cfg(log_verbose_CFG, "verbose", log_CFG_SECTION, 0, CFG_TYPE_INT, DEFAULT_VERBOSE, vsn(1, 0, 0), NULL, 0, NULL,
        "Controls the messages sent to stdout or stderr.\n")
 
 cfg(log_silent_CFG, "silent", log_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_SILENT, vsn(2, 2, 98), NULL, 0, NULL,
This page took 0.056927 seconds and 5 git commands to generate.