summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2015-10-09 21:38:50 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2015-10-13 14:39:37 +0200
commit72d700b064fb64f6bb7e20c23dbb2ce8b6d8feb7 (patch)
tree9488473d7c39e923803f2be90b17a37cb37b4a0b
parent86b04ebd193c9db09ee5f03a2de4997aa2ab52c3 (diff)
downloadlvm2-72d700b064fb64f6bb7e20c23dbb2ce8b6d8feb7.tar.gz
toolcontext: do not change already set dm_log
If the dm_log is already set to non-default logger, avoid to change it.
-rw-r--r--WHATS_NEW1
-rw-r--r--lib/commands/toolcontext.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/WHATS_NEW b/WHATS_NEW
index 348c09986..c089228e8 100644
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
Version 2.02.133 -
======================================
+ Do not change logging in lvm2 library when it's already set.
Check for enough space in thin-pool in command before creating new thin.
Make libblkid detect all copies of the same signature if use_blkid_wiping=1.
Fix vgimportclone with -n to not add number unnecessarily to base VG name.
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index c8d96ca84..c150991dd 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -362,7 +362,8 @@ static void _init_logging(struct cmd_context *cmd)
/* Tell device-mapper about our logging */
#ifdef DEVMAPPER_SUPPORT
- dm_log_with_errno_init(print_log);
+ if (!dm_log_is_non_default())
+ dm_log_with_errno_init(print_log);
#endif
reset_log_duplicated();
reset_lvm_errno(1);