summaryrefslogtreecommitdiffstats
path: root/0013-libmultipath-condlog-log-to-stderr.patch
diff options
context:
space:
mode:
Diffstat (limited to '0013-libmultipath-condlog-log-to-stderr.patch')
-rw-r--r--0013-libmultipath-condlog-log-to-stderr.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/0013-libmultipath-condlog-log-to-stderr.patch b/0013-libmultipath-condlog-log-to-stderr.patch
new file mode 100644
index 0000000..8819730
--- /dev/null
+++ b/0013-libmultipath-condlog-log-to-stderr.patch
@@ -0,0 +1,35 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Martin Wilck <mwilck@suse.com>
+Date: Sat, 13 Jan 2018 22:19:21 +0100
+Subject: [PATCH] libmultipath: condlog: log to stderr
+
+Calling 'multipath' might result in various error messages, all
+of which should be directed to stderr.
+Having them intermixed with the actual output on stdout makes
+parsing really hard.
+
+Signed-off-by: Martin Wilck <mwilck@suse.com>
+Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
+---
+ libmultipath/debug.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libmultipath/debug.c b/libmultipath/debug.c
+index f89b264..f95a3e5 100644
+--- a/libmultipath/debug.c
++++ b/libmultipath/debug.c
+@@ -37,9 +37,9 @@ void dlog (int sink, int prio, const char * fmt, ...)
+ "%b %d %H:%M:%S", tb);
+ buff[sizeof(buff)-1] = '\0';
+
+- fprintf(stdout, "%s | ", buff);
++ fprintf(stderr, "%s | ", buff);
+ }
+- vfprintf(stdout, fmt, ap);
++ vfprintf(stderr, fmt, ap);
+ }
+ else
+ log_safe(prio + 3, fmt, ap);
+--
+2.7.4
+