lkml.org 
[lkml]   [2002]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[Patch] Corrected, sysrq-show-output, kernel 2.4.17
From
Date
Sorry, i forgot a pair of {} in sysrq_handle_showregs.

I should stop programming python ;-)

Harald Holzer

-----Forwarded Message-----

From: Helge Deller <deller@gmx.de>
To: Harald Holzer <harald.holzer@eunet.at>
Subject: Re: [Patch] sysrq-show-output, kernel 2.4.17
Date: 03 Jan 2002 08:45:36 +0100

On Thursday 03 January 2002 00:25, Harald Holzer wrote:
> Sysrq-m didnt show memory information on the serial console.
>
> This patch sets the console_loglevel to 7 before it calls show_mem,
> show_regs and show_state, to get the output.
>
> Harald Holzer

static void sysrq_handle_showregs(int key, struct pt_regs *pt_regs,
struct kbd_struct *kbd, struct tty_struct *tty) {
+ int orig_loglevel;
+
if (pt_regs)
+ orig_loglevel = console_loglevel;
+ console_loglevel = 7;
show_regs(pt_regs);
+ console_loglevel = orig_loglevel;
+
}

Hi Harald,
I think you misssed a pair of { ... } here...

Helge


--- linux-2.4.17/drivers/char/sysrq.c Thu Jan 3 18:28:59 2002
+++ linux/drivers/char/sysrq.c Thu Jan 3 18:29:54 2002
@@ -246,8 +246,14 @@

static void sysrq_handle_showregs(int key, struct pt_regs *pt_regs,
struct kbd_struct *kbd, struct tty_struct *tty) {
- if (pt_regs)
+ int orig_loglevel;
+
+ if (pt_regs) {
+ orig_loglevel = console_loglevel;
+ console_loglevel = 7;
show_regs(pt_regs);
+ console_loglevel = orig_loglevel;
+ }
}
static struct sysrq_key_op sysrq_showregs_op = {
handler: sysrq_handle_showregs,
@@ -258,7 +264,12 @@

static void sysrq_handle_showstate(int key, struct pt_regs *pt_regs,
struct kbd_struct *kbd, struct tty_struct *tty) {
+ int orig_loglevel;
+
+ orig_loglevel = console_loglevel;
+ console_loglevel = 7;
show_state();
+ console_loglevel = orig_loglevel;
}
static struct sysrq_key_op sysrq_showstate_op = {
handler: sysrq_handle_showstate,
@@ -269,7 +280,12 @@

static void sysrq_handle_showmem(int key, struct pt_regs *pt_regs,
struct kbd_struct *kbd, struct tty_struct *tty) {
+ int orig_loglevel;
+
+ orig_loglevel = console_loglevel;
+ console_loglevel = 7;
show_mem();
+ console_loglevel = orig_loglevel;
}
static struct sysrq_key_op sysrq_showmem_op = {
handler: sysrq_handle_showmem,
\
 
 \ /
  Last update: 2005-03-22 13:15    [W:0.089 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site