[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] minios: use ASSERT for BUG_ON
# HG changeset patch # User Keir Fraser <keir.fraser@xxxxxxxxxx> # Date 1200580823 0 # Node ID 10101bc8181f5f97c641fffade3d1655cdd891fa # Parent b18f70656fdb0f26871de1311b22cd57066e0a39 minios: use ASSERT for BUG_ON Signed-off-by: Samuel Thibault <samuel.thibault@xxxxxxxxxxxxx> --- extras/mini-os/console/xencons_ring.c | 3 --- extras/mini-os/include/lib.h | 2 ++ extras/mini-os/xenbus/xenbus.c | 4 ---- 3 files changed, 2 insertions(+), 7 deletions(-) diff -r b18f70656fdb -r 10101bc8181f extras/mini-os/console/xencons_ring.c --- a/extras/mini-os/console/xencons_ring.c Thu Jan 17 14:40:06 2008 +0000 +++ b/extras/mini-os/console/xencons_ring.c Thu Jan 17 14:40:23 2008 +0000 @@ -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) { diff -r b18f70656fdb -r 10101bc8181f extras/mini-os/include/lib.h --- a/extras/mini-os/include/lib.h Thu Jan 17 14:40:06 2008 +0000 +++ b/extras/mini-os/include/lib.h Thu Jan 17 14:40:23 2008 +0000 @@ -111,6 +111,8 @@ do { } \ } while(0) +#define BUG_ON(x) ASSERT(!(x)) + /* Consistency check as much as possible. */ void sanity_check(void); diff -r b18f70656fdb -r 10101bc8181f extras/mini-os/xenbus/xenbus.c --- a/extras/mini-os/xenbus/xenbus.c Thu Jan 17 14:40:06 2008 +0000 +++ b/extras/mini-os/xenbus/xenbus.c Thu Jan 17 14:40:23 2008 +0000 @@ -28,10 +28,6 @@ #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); \ typeof(y) tmpy = (y); \ _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |