2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-01 06:45:35 +00:00

restorer: make BUG_ON more informative

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Acked-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Andrey Vagin
2012-01-17 11:27:29 +03:00
parent 2cd82bc7ff
commit 31fb055220
2 changed files with 6 additions and 2 deletions

View File

@@ -90,8 +90,12 @@ extern void printk(const char *format, ...);
#ifdef CR_NOGLIBC
#define BUG_ON_HANDLER(condition) \
do { \
if ((condition)) \
if ((condition)) { \
write_string("BUG at " __FILE__ ": "); \
write_num(__LINE__); \
write_string("\n"); \
*(unsigned long *)NULL = 0xdead0000 + __LINE__; \
} \
} while (0)
#else
# define BUG_ON_HANDLER(condition) \