* [patch] add __LINE__ to out_of_line_bug()
@ 2002-04-16 9:08 Andrew Morton
0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2002-04-16 9:08 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: lkml
--- 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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-04-16 9:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-16 9:08 [patch] add __LINE__ to out_of_line_bug() Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox