mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-27 12:04:24 +00:00
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: Kir Kolyshkin <kir@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
8692291d42
commit
fc9fea2fdc
1 changed files with 20 additions and 20 deletions
|
|
@ -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__ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue