mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-29 13:28:27 +00:00
make: Add DEBUG=1 option
This allows to use pr_debug and dprintk helpers. Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
This commit is contained in:
parent
4c0fb12e11
commit
00e14f0448
4
Makefile
4
Makefile
@ -49,6 +49,10 @@ ifneq ($(WERROR),0)
|
||||
WARNINGS += -Werror
|
||||
endif
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
DEFINES += -DCR_DEBUG
|
||||
endif
|
||||
|
||||
WARNINGS += -Wall -Wno-unused
|
||||
CFLAGS += $(WARNINGS) $(DEFINES)
|
||||
|
||||
|
@ -60,15 +60,17 @@ extern void printk(const char *format, ...);
|
||||
pr_err_jmp(label); \
|
||||
} while (0)
|
||||
|
||||
#if 0
|
||||
#ifdef CR_DEBUG
|
||||
#define pr_debug(fmt, ...) \
|
||||
do { \
|
||||
printk("%s (%s:%d): " fmt, \
|
||||
__func__, __FILE__, __LINE__, \
|
||||
printk("%s:%d:%s: " fmt, \
|
||||
__FILE__, __LINE__,__func__, \
|
||||
##__VA_ARGS__); \
|
||||
} while (0)
|
||||
#define dprintk(fmt, ...) printk(fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define pr_debug(fmt, ...)
|
||||
#define dprintk(fmt, ...)
|
||||
#endif
|
||||
|
||||
#define die(fmt, ...) \
|
||||
|
Loading…
x
Reference in New Issue
Block a user