diff mbox series

libtraceevent: Add new line to trace-seq warnings

Message ID 20210514093858.4e862bda@gandalf.local.home (mailing list archive)
State Accepted
Commit e62c776a6abf214e854b20dd78673cc013601f43
Headers show
Series libtraceevent: Add new line to trace-seq warnings | expand

Commit Message

Steven Rostedt May 14, 2021, 1:38 p.m. UTC
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>

The WARN_ONCE() logic in trace_seq is based off of the WARN_ONCE() logic
in the Linux kernel, where the message does not require to end with a new
line. But the implementation is different than the kernel, and it lacks
adding a new line when it writes the output.

Add the new line to make it match what happens in the Linux kernel.

Link: https://lore.kernel.org/linux-trace-devel/20210514122825.162203-1-y.karadz@gmail.com/

Fixes: 3b760f95 ("tools include: Move perf's bug.h to a generic place")
Reported-by: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
 include/asm/bug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/asm/bug.h b/include/asm/bug.h
index 550223f..de8f8fe 100644
--- a/include/asm/bug.h
+++ b/include/asm/bug.h
@@ -5,7 +5,7 @@ 
 #include <linux/compiler.h>
 #include <stdio.h>
 
-#define __WARN_printf(arg...)	do { fprintf(stderr, arg); } while (0)
+#define __WARN_printf(arg...)	do { fprintf(stderr, arg); fprintf(stderr, "\n");} while (0)
 
 #define WARN(condition, format...) ({		\
 	int __ret_warn_on = !!(condition);	\