]> xenbits.xensource.com Git - seabios.git/commitdiff
Don't use __FILE__ in virtio-ring.c.
authorKevin O'Connor <kevin@koconnor.net>
Sat, 9 Mar 2013 00:28:06 +0000 (19:28 -0500)
committerKevin O'Connor <kevin@koconnor.net>
Sat, 9 Mar 2013 00:55:03 +0000 (19:55 -0500)
Avoid referencing __FILE__ - that value changes depending on the
user's build setting of OUT.  The function and line number are
sufficient.

Also, use panic() instead of looping forever.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
src/virtio-ring.c

index 088333072bf340e224fdf2ef99212f6beea81688..bddb09011767bb712ca3d95d5f606397e656b3a4 100644 (file)
 #include "biosvar.h" // GET_GLOBAL
 #include "util.h" // dprintf
 
-#define BUG() do {                                      \
-        dprintf(1, "BUG: failure at %s:%d/%s()!\n",     \
-                __FILE__, __LINE__, __func__);          \
-                while(1);                               \
+#define BUG() do {                                                      \
+            panic("BUG: failure at %d/%s()!\n", __LINE__, __func__);    \
         } while (0)
 #define BUG_ON(condition) do { if (condition) BUG(); } while (0)