From 72d700b064fb64f6bb7e20c23dbb2ce8b6d8feb7 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 9 Oct 2015 21:38:50 +0200 Subject: [PATCH] toolcontext: do not change already set dm_log If the dm_log is already set to non-default logger, avoid to change it. --- WHATS_NEW | 1 + lib/commands/toolcontext.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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);