[Devel] [PATCH 1/7] log: pr_warn_once -- Fix formatting

Cyrill Gorcunov gorcunov at gmail.com
Thu Feb 15 23:30:24 MSK 2018


Signed-off-by: Cyrill Gorcunov <gorcunov at virtuozzo.com>
---
 criu/include/log.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/criu/include/log.h b/criu/include/log.h
index f6b9ec28a..a77c606ca 100644
--- a/criu/include/log.h
+++ b/criu/include/log.h
@@ -63,7 +63,9 @@ extern void print_on_level(unsigned int loglevel, const char *format, ...)
 		       __FILE__, __LINE__, ##__VA_ARGS__)
 
 #define pr_warn_once(fmt, ...)						\
-	print_once(LOG_WARN, fmt, ##__VA_ARGS__)
+	print_once(LOG_WARN,						\
+		       "Warn  (%s:%d): " LOG_PREFIX fmt,		\
+		       __FILE__, __LINE__, ##__VA_ARGS__)
 
 #define pr_debug(fmt, ...)						\
 	print_on_level(LOG_DEBUG,					\
-- 
2.14.3



More information about the Devel mailing list