Commit fc9fea2f authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Pavel Emelyanov

criu-log.h: fit macros in 80 columns

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: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 8692291d
...@@ -33,38 +33,38 @@ extern void print_on_level(unsigned int loglevel, const char *format, ...) ...@@ -33,38 +33,38 @@ extern void print_on_level(unsigned int loglevel, const char *format, ...)
# define LOG_PREFIX # define LOG_PREFIX
#endif #endif
#define pr_msg(fmt, ...) \ #define pr_msg(fmt, ...) \
print_on_level(LOG_MSG, \ print_on_level(LOG_MSG, \
fmt, ##__VA_ARGS__) fmt, ##__VA_ARGS__)
#define pr_info(fmt, ...) \ #define pr_info(fmt, ...) \
print_on_level(LOG_INFO, \ print_on_level(LOG_INFO, \
LOG_PREFIX fmt, ##__VA_ARGS__) LOG_PREFIX fmt, ##__VA_ARGS__)
#define pr_err(fmt, ...) \ #define pr_err(fmt, ...) \
print_on_level(LOG_ERROR, \ print_on_level(LOG_ERROR, \
"Error (%s:%d): " LOG_PREFIX fmt, \ "Error (%s:%d): " LOG_PREFIX fmt, \
__FILE__, __LINE__, ##__VA_ARGS__) __FILE__, __LINE__, ##__VA_ARGS__)
#define pr_err_once(fmt, ...) \ #define pr_err_once(fmt, ...) \
do { \ do { \
static bool __printed; \ static bool __printed; \
if (!__printed) { \ if (!__printed) { \
pr_err(fmt, ##__VA_ARGS__); \ pr_err(fmt, ##__VA_ARGS__); \
__printed = 1; \ __printed = 1; \
} \ } \
} while (0) } while (0)
#define pr_warn(fmt, ...) \ #define pr_warn(fmt, ...) \
print_on_level(LOG_WARN, \ print_on_level(LOG_WARN, \
"Warn (%s:%d): " LOG_PREFIX fmt, \ "Warn (%s:%d): " LOG_PREFIX fmt, \
__FILE__, __LINE__, ##__VA_ARGS__) __FILE__, __LINE__, ##__VA_ARGS__)
#define pr_debug(fmt, ...) \ #define pr_debug(fmt, ...) \
print_on_level(LOG_DEBUG, \ print_on_level(LOG_DEBUG, \
LOG_PREFIX fmt, ##__VA_ARGS__) LOG_PREFIX fmt, ##__VA_ARGS__)
#define pr_perror(fmt, ...) \ #define pr_perror(fmt, ...) \
pr_err(fmt ": %m\n", ##__VA_ARGS__) pr_err(fmt ": %m\n", ##__VA_ARGS__)
#endif /* __CR_LOG_LEVELS_H__ */ #endif /* __CR_LOG_LEVELS_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment