leave loglevel at 7 through sysrq output so you can actually read it
PATCH 1/1 leave loglevel at 7 through sysrq output so you can actually read it
We carefully set loglevel to 7, and print the sysrq messsage as to what event we're doing, but we can't actually see the output as it sets it back before calling the handler, rather than after.
Move the assignment down one line.
drivers/char/sysrq.c +1 -1
@@ -421,8 +421,8 @@ void __handle_sysrq(int key, struct tty_*/ if (!check_mask ||sysrq_on_mask (op_p->enable_mask)) {printk ("%s\n" , op_p->action_msg); - console_loglevel = orig_log_level; op_p->handler (key, tty); + console_loglevel = orig_log_level; }else {printk ("This sysrq operation is disabled.\n" ); }
Quoted 6 lines · Martin Bligh
We carefully set loglevel to 7, and print the sysrq messsage as to what event we're doing, but we can't actually see the output as it sets it back before calling the handler, rather than after.
Move the assignment down one line.
I think you have to tell sysrq_handle_loglevel() about this too...
bye, Roman
Quoted 11 lines · Roman Zippel
Quoted 6 lines · Martin Bligh
We carefully set loglevel to 7, and print the sysrq messsage as to what event we're doing, but we can't actually see the output as it sets it back before calling the handler, rather than after.
Move the assignment down one line.
I think you have to tell
sysrq_handle_loglevel()about this too...
Not sure why? That just changes the current loglevel, and seems unaffected.
I did test the patch, and it works fine.
M.
Hi,
Quoted 4 lines · Martin Bligh
Quoted 1 line
I think you have to tell
sysrq_handle_loglevel()about this too...Not sure why? That just changes the current loglevel, and seems unaffected.
Who's the last to set console_loglevel?
Quoted 1 line
I did test the patch, and it works fine.
Did you check /proc/sys/kernel/printk?
bye, Roman
Hi,
Quoted 3 lines · Roman Zippel
Quoted 1 line
I did test the patch, and it works fine.
Did you check
/proc/sys/kernel/printk?
BTW for even more fun check this with "echo 4 > /proc/sys/kernel/sysrq".
bye, Roman