[<prev] [next>] [day] [month] [year] [list]
Message-ID: <87r628noge.fsf@burly.wgtn.ondioline.org>
Date: Mon, 09 Feb 2009 18:56:01 +1300
From: Paul Collins <paul@...ly.ondioline.org>
To: Jeremy Fitzhardinge <jeremy@...p.org>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] generic BUG: printk "cut here" headers at appropriate levels
Many machines, mine included, are configured to route syslog
messages at level "emerg" to all terminals. It seems kind of
silly to emit the least meaningful part of a BUG-style report at
the highest possible priority.
Signed-off-by: Paul Collins <paul@...ioline.org>
---
lib/bug.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/bug.c b/lib/bug.c
index 300e41a..c35f4d8 100644
--- a/lib/bug.c
+++ b/lib/bug.c
@@ -136,8 +136,6 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
bug = find_bug(bugaddr);
- printk(KERN_EMERG "------------[ cut here ]------------\n");
-
file = NULL;
line = 0;
warning = 0;
@@ -156,6 +154,7 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
if (warning) {
/* this is a WARN_ON rather than BUG/BUG_ON */
+ printk(KERN_ERR "------------[ cut here ]------------\n");
if (file)
printk(KERN_ERR "Badness at %s:%u\n",
file, line);
@@ -169,6 +168,7 @@ enum bug_trap_type report_bug(unsigned long bugaddr, struct pt_regs *regs)
return BUG_TRAP_TYPE_WARN;
}
+ printk(KERN_CRIT "------------[ cut here ]------------\n");
if (file)
printk(KERN_CRIT "kernel BUG at %s:%u!\n",
file, line);
--
Paul Collins
Wellington, New Zealand
Dag vijandelijk luchtschip de huismeester is dood
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists