use ASSERT for BUG_ON
PATCH 1/1 use ASSERT for BUG_ON
use ASSERT for BUG_ON
Signed-off-by Samuel Thibault <[email protected]>
# HG changeset patch
# User Samuel Thibault <[email protected]> # Date 1200577496 0
# Node ID 4d261c3c7c20430433da2d59f3037f34f3598046 # Parent a7922b798098383d87bd62a4cc27595cfaad8dbe use ASSERT for BUG_ON
extras/mini-os/console/xencons_ring.c +0 -3
@@ -8,9 +8,6 @@#include <xenbus.h> #include <xen/io/console.h> - -/* TODO - need to define BUG_ON for whole mini-os, need crash-dump as well */ -#define BUG_ON (_cond) do{if(_cond) do_exit();} while(0);static inline struct xencons_interface *xencons_interface (void ) {
extras/mini-os/include/lib.h +2 -0
@@ -111,6 +111,8 @@ do { } \ } while(0) +#define BUG_ON (x) ASSERT(!(x)) +/* Consistency check as much as possible. */ void sanity_check (void );
extras/mini-os/xenbus/xenbus.c +0 -4
@@ -27,10 +27,6 @@#include <xen/io/xs_wire.h> #include <spinlock.h> #include <xmalloc.h> - -#define BUG_ON (x) do { \ - if (x) {printk("BUG at %s:%d\n", __FILE__, __LINE__); BUG(); } \ -} while (0)#define min (x,y) ({ \ typeof(x) tmpx = (x); \