[patch] add __LINE__ to out_of_line_bug()

From: Andrew Morton (akpm@zip.com.au)
Date: Tue Apr 16 2002 - 04:08:52 EST


--- 2.4.19-pre6/include/linux/kernel.h~oolb Thu Apr 11 21:43:09 2002
+++ 2.4.19-pre6-akpm/include/linux/kernel.h Thu Apr 11 21:44:26 2002
@@ -162,7 +162,8 @@ extern const char *print_tainted(void);
 #define max_t(type,x,y) \
         ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; })
 
-extern void out_of_line_bug(void) ATTRIB_NORET;
+extern void __out_of_line_bug(int line) ATTRIB_NORET;
+#define out_of_line_bug() __out_of_line_bug(__LINE__)
 
 #endif /* __KERNEL__ */
 
--- 2.4.19-pre6/kernel/panic.c~oolb Thu Apr 11 21:44:37 2002
+++ 2.4.19-pre6-akpm/kernel/panic.c Thu Apr 11 21:45:59 2002
@@ -134,8 +134,10 @@ int tainted = 0;
  * tells us what we want to know.
  */
 
-void out_of_line_bug(void)
+void __out_of_line_bug(int line)
 {
+ printk("kernel BUG in header file at line %d\n", line);
+
         BUG();
 
         /* Satisfy __attribute__((noreturn)) */
--- 2.4.19-pre6/kernel/ksyms.c~oolb Thu Apr 11 21:46:03 2002
+++ 2.4.19-pre6-akpm/kernel/ksyms.c Thu Apr 11 21:46:10 2002
@@ -454,7 +454,7 @@ EXPORT_SYMBOL(nr_running);
 
 /* misc */
 EXPORT_SYMBOL(panic);
-EXPORT_SYMBOL(out_of_line_bug);
+EXPORT_SYMBOL(__out_of_line_bug);
 EXPORT_SYMBOL(sprintf);
 EXPORT_SYMBOL(snprintf);
 EXPORT_SYMBOL(sscanf);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Apr 23 2002 - 22:00:14 EST