Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1 | From 526e539628e051128abf46a60ec22e18c9b5d84f Mon Sep 17 00:00:00 2001 |
| 2 | From: Benjamin Marzinski <bmarzins@redhat.com> |
| 3 | Date: Wed, 31 May 2017 15:03:02 -0500 |
| 4 | Subject: [PATCH 09/14] multipath: set verbosity to default during config |
| 5 | |
| 6 | condlog was setting the verbosity to 0 if there was no configuration. |
| 7 | This keeps multipath from printing warning messages about config file |
| 8 | problems that are found while loading the configuration. Instead, it |
| 9 | should use the default config level until it loads the configuration |
| 10 | to find the current value. |
| 11 | |
| 12 | Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> |
| 13 | --- |
| 14 | libmultipath/debug.c | 3 ++- |
| 15 | 1 file changed, 2 insertions(+), 1 deletion(-) |
| 16 | |
| 17 | diff --git a/libmultipath/debug.c b/libmultipath/debug.c |
| 18 | index fbe171a..f89b264 100644 |
| 19 | --- a/libmultipath/debug.c |
| 20 | +++ b/libmultipath/debug.c |
| 21 | @@ -11,6 +11,7 @@ |
| 22 | #include "../third-party/valgrind/drd.h" |
| 23 | #include "vector.h" |
| 24 | #include "config.h" |
| 25 | +#include "defaults.h" |
| 26 | |
| 27 | void dlog (int sink, int prio, const char * fmt, ...) |
| 28 | { |
| 29 | @@ -21,7 +22,7 @@ void dlog (int sink, int prio, const char * fmt, ...) |
| 30 | va_start(ap, fmt); |
| 31 | conf = get_multipath_config(); |
| 32 | ANNOTATE_IGNORE_READS_BEGIN(); |
| 33 | - thres = (conf) ? conf->verbosity : 0; |
| 34 | + thres = (conf) ? conf->verbosity : DEFAULT_VERBOSITY; |
| 35 | ANNOTATE_IGNORE_READS_END(); |
| 36 | put_multipath_config(conf); |
| 37 | |
| 38 | -- |
| 39 | 2.8.1 |
| 40 | |