[lxc-devel] [lxc/master] CMD log macros: append a newline

tych0 on Github lxc-bot at linuxcontainers.org
Tue Dec 11 16:53:08 UTC 2018


A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 501 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20181211/086443ef/attachment.bin>
-------------- next part --------------
From cd427d39e37f624df539520b070b99e55c1727f6 Mon Sep 17 00:00:00 2001
From: Tycho Andersen <tycho at tycho.ws>
Date: Tue, 11 Dec 2018 09:51:31 -0700
Subject: [PATCH] CMD log macros: append a newline

The log appenders for the regular log macros append a newline as necessary,
and the usage of these is written so it does to. So, let's add a newline.

Signed-off-by: Tycho Andersen <tycho at tycho.ws>
---
 src/lxc/log.h | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/lxc/log.h b/src/lxc/log.h
index 008df7a73..d4a89d616 100644
--- a/src/lxc/log.h
+++ b/src/lxc/log.h
@@ -452,16 +452,16 @@ ATTR_UNUSED static inline void LXC_##LEVEL(struct lxc_log_locinfo* locinfo,	\
 		ERROR("%s - " format, ptr, ##__VA_ARGS__); \
 	} while (0)
 
-#define CMD_SYSERROR(format, ...)                                    \
-	do {                                                         \
-		lxc_log_strerror_r;                                  \
-		fprintf(stderr, "%s - " format, ptr, ##__VA_ARGS__); \
+#define CMD_SYSERROR(format, ...)                                      \
+	do {                                                           \
+		lxc_log_strerror_r;                                    \
+		fprintf(stderr, "%s - \n" format, ptr, ##__VA_ARGS__); \
 	} while (0)
 
-#define CMD_SYSINFO(format, ...)                            \
-	do {                                                \
-		lxc_log_strerror_r;                         \
-		printf("%s - " format, ptr, ##__VA_ARGS__); \
+#define CMD_SYSINFO(format, ...)                              \
+	do {                                                  \
+		lxc_log_strerror_r;                           \
+		printf("%s - \n" format, ptr, ##__VA_ARGS__); \
 	} while (0)
 
 extern int lxc_log_fd;


More information about the lxc-devel mailing list