Commit 31fb0552 authored by Andrey Vagin's avatar Andrey Vagin

restorer: make BUG_ON more informative

Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Acked-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 2cd82bc7
......@@ -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) \
......
......@@ -12,11 +12,11 @@
#include "compiler.h"
#include "types.h"
#include "syscall.h"
#include "restorer-log.h"
#include "util.h"
#include "image.h"
#include "crtools.h"
#include "restorer-log.h"
#include "lock.h"
#include "restorer.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