Skip to contentSkip to conversation

master - libdm: report logging with errno as changed default

PATCH Zdenek Kabelac 1 participant 1 message Nov 3, 2016

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=e50d434a353efac7d4947c7deeaf7cfd773ea6e1
Commit:        e50d434a353efac7d4947c7deeaf7cfd773ea6e1
Parent:        6af26273cb8c0ef310296ba0f4dd42751ab25b0a
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Thu Nov 3 12:07:27 2016 +0100
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Thu Nov 3 12:43:09 2016 +0100

libdm: report logging with errno as changed default

When user changes logging with 'dm_log_with_errno_init()' also report this as non default dm logging.

---
 WHATS_NEW_DM         |    1 +
 libdm/libdm-common.c |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)
WHATS_NEW_DM +1 -0
index 0b2cd3d..8cf0e05 100644
@@ -1,5 +1,6 @@
 Version 1.02.136 - 
 ======================================
+  Report as non default dm logging also when logging with errno was changed.
   Use log_level() macro to consistently decode message log level in dmeventd.
   Still produce output when dmsetup dependency tree building finds dev missing.
   Check and report pthread_sigmask() failure in dmeventd.
libdm/libdm-common.c +1 -1
index 7756009..5deb555 100644
@@ -174,7 +174,7 @@ void dm_log_init(dm_log_fn fn)
 
 int dm_log_is_non_default(void)
 {
-	return (dm_log == _default_log) ? 0 : 1;
+	return (dm_log == _default_log && dm_log_with_errno == _default_log_with_errno) ? 0 : 1;
 }
 
 void dm_log_with_errno_init(dm_log_with_errno_fn fn)