diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-01-17 14:40:23 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-01-17 14:40:23 +0000 |
commit | d96277204904407231c1912ac0f30964f8e3dc90 (patch) | |
tree | 1728e590070aacb4d4f10ba7920b44d52082203c /extras | |
parent | 41888d5a7ee1e1782c92dc186e5c5d1c0073deee (diff) | |
download | xen-d96277204904407231c1912ac0f30964f8e3dc90.tar.gz xen-d96277204904407231c1912ac0f30964f8e3dc90.tar.bz2 xen-d96277204904407231c1912ac0f30964f8e3dc90.zip |
minios: use ASSERT for BUG_ON
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
Diffstat (limited to 'extras')
-rw-r--r-- | extras/mini-os/console/xencons_ring.c | 3 | ||||
-rw-r--r-- | extras/mini-os/include/lib.h | 2 | ||||
-rw-r--r-- | extras/mini-os/xenbus/xenbus.c | 4 |
3 files changed, 2 insertions, 7 deletions
diff --git a/extras/mini-os/console/xencons_ring.c b/extras/mini-os/console/xencons_ring.c index 1f9f497866..f0cf9203ae 100644 --- a/extras/mini-os/console/xencons_ring.c +++ b/extras/mini-os/console/xencons_ring.c @@ -9,9 +9,6 @@ #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) { return mfn_to_virt(start_info.console.domU.mfn); diff --git a/extras/mini-os/include/lib.h b/extras/mini-os/include/lib.h index 1673d88424..97a2305daa 100644 --- a/extras/mini-os/include/lib.h +++ b/extras/mini-os/include/lib.h @@ -111,6 +111,8 @@ do { \ } \ } while(0) +#define BUG_ON(x) ASSERT(!(x)) + /* Consistency check as much as possible. */ void sanity_check(void); diff --git a/extras/mini-os/xenbus/xenbus.c b/extras/mini-os/xenbus/xenbus.c index d0dddad64e..a4aa0ac77d 100644 --- a/extras/mini-os/xenbus/xenbus.c +++ b/extras/mini-os/xenbus/xenbus.c @@ -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); \ |