[CRIU] [PATCH 3/3] criu-log.h: fit macros in 80 columns
Kir Kolyshkin
kir at openvz.org
Thu Dec 19 13:24:29 PST 2013
Before this patch, backslash was at 81th column which makes the text
twice longer on a standard 80 col terminal, which is quite annoying.
Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
include/criu-log.h | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/include/criu-log.h b/include/criu-log.h
index bc278c9..613f70f 100644
--- a/include/criu-log.h
+++ b/include/criu-log.h
@@ -33,38 +33,38 @@ extern void print_on_level(unsigned int loglevel, const char *format, ...)
# define LOG_PREFIX
#endif
-#define pr_msg(fmt, ...) \
- print_on_level(LOG_MSG, \
+#define pr_msg(fmt, ...) \
+ print_on_level(LOG_MSG, \
fmt, ##__VA_ARGS__)
-#define pr_info(fmt, ...) \
- print_on_level(LOG_INFO, \
+#define pr_info(fmt, ...) \
+ print_on_level(LOG_INFO, \
LOG_PREFIX fmt, ##__VA_ARGS__)
-#define pr_err(fmt, ...) \
- print_on_level(LOG_ERROR, \
- "Error (%s:%d): " LOG_PREFIX fmt, \
+#define pr_err(fmt, ...) \
+ print_on_level(LOG_ERROR, \
+ "Error (%s:%d): " LOG_PREFIX fmt, \
__FILE__, __LINE__, ##__VA_ARGS__)
-#define pr_err_once(fmt, ...) \
- do { \
- static bool __printed; \
- if (!__printed) { \
- pr_err(fmt, ##__VA_ARGS__); \
- __printed = 1; \
- } \
+#define pr_err_once(fmt, ...) \
+ do { \
+ static bool __printed; \
+ if (!__printed) { \
+ pr_err(fmt, ##__VA_ARGS__); \
+ __printed = 1; \
+ } \
} while (0)
-#define pr_warn(fmt, ...) \
- print_on_level(LOG_WARN, \
- "Warn (%s:%d): " LOG_PREFIX fmt, \
+#define pr_warn(fmt, ...) \
+ print_on_level(LOG_WARN, \
+ "Warn (%s:%d): " LOG_PREFIX fmt, \
__FILE__, __LINE__, ##__VA_ARGS__)
-#define pr_debug(fmt, ...) \
- print_on_level(LOG_DEBUG, \
+#define pr_debug(fmt, ...) \
+ print_on_level(LOG_DEBUG, \
LOG_PREFIX fmt, ##__VA_ARGS__)
-#define pr_perror(fmt, ...) \
+#define pr_perror(fmt, ...) \
pr_err(fmt ": %m\n", ##__VA_ARGS__)
#endif /* __CR_LOG_LEVELS_H__ */
--
1.8.1.4
More information about the CRIU
mailing list