--- zzzz-none-000/linux-2.6.19.2/include/asm-generic/bug.h 2007-01-10 19:10:37.000000000 +0000 +++ davinci-8020-5505/linux-2.6.19.2/include/asm-generic/bug.h 2008-02-25 13:43:15.000000000 +0000 @@ -3,10 +3,18 @@ #include +#ifdef CONFIG_PRINTK +#define BUG_ERR "<3>" /* error conditions */ +extern int (*__printk)(const char * fmt, ...) __attribute__ ((format (printf, 1, 2))); +#else +#define __printk(...) +#endif +extern void panic(const char * fmt, ...); + #ifdef CONFIG_BUG #ifndef HAVE_ARCH_BUG #define BUG() do { \ - printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \ + __printk(BUG_ERR "BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \ panic("BUG!"); \ } while (0) #endif @@ -19,7 +27,7 @@ #define WARN_ON(condition) ({ \ typeof(condition) __ret_warn_on = (condition); \ if (unlikely(__ret_warn_on)) { \ - printk("BUG: warning at %s:%d/%s()\n", __FILE__, \ + __printk(BUG_ERR "BUG: warning at %s:%d/%s()\n", __FILE__, \ __LINE__, __FUNCTION__); \ dump_stack(); \ } \