lkml.org 
[lkml]   [2002]   [Jul]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH -ac] Panicking in morse code v3
On Sun, 21 Jul 2002, Russell King wrote:

> Otherwise it becomes a "toy" feature that doesn't have much value.
> What would be more useful would be to disable the console blank
> timer on a panic() so it doesn't blank half-way through someone
> reading the oops, leaving them with no way to read the rest of it!

I actually thought of that last night when it happened whilst examining an
oops.

--- linux-2.5.25/kernel/panic.c.orig Sun Jul 21 12:45:56 2002
+++ linux-2.5.25/kernel/panic.c Sun Jul 21 12:09:42 2002
@@ -49,6 +49,9 @@
unsigned long caller = (unsigned long) __builtin_return_address(0);
#endif

+#ifdef CONFIG_VT
+ disable_console_blank();
+#endif
bust_spinlocks(1);
va_start(args, fmt);
vsprintf(buf, fmt, args);
--- linux-2.5.25/drivers/char/console.c.orig Sun Jul 21 12:46:18 2002
+++ linux-2.5.25/drivers/char/console.c Sun Jul 21 12:24:31 2002
@@ -2758,6 +2758,12 @@
timer_do_blank_screen(0, 1);
}

+void disable_console_blank(void)
+{
+ del_timer_sync(&console_timer);
+ blankinterval = 0;
+}
+
void poke_blanked_console(void)
{
del_timer(&console_timer);
--- linux-2.5.25/include/linux/console.h.orig Sun Jul 21 12:47:01 2002
+++ linux-2.5.25/include/linux/console.h Sun Jul 21 12:25:42 2002
@@ -112,6 +112,7 @@
extern void release_console_sem(void);
extern void console_conditional_schedule(void);
extern void console_unblank(void);
+extern void disable_console_blank(void);

/* VESA Blanking Levels */
#define VESA_NO_BLANKING 0
--
function.linuxpower.ca


-
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/

\
 
 \ /
  Last update: 2005-03-22 13:27    [W:0.057 / U:0.624 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site