Commit c3fee609 authored by Petr Mladek's avatar Petr Mladek Committed by Greg Kroah-Hartman

sysrq: Remove duplicated sysrq message

The commit 97f5f0cd ("Input: implement SysRq as a separate input
handler") added pr_fmt() definition. It caused a duplicated message
prefix in the sysrq header messages, for example:

[  177.053931] sysrq: SysRq : Show backtrace of all active CPUs
[  742.864776] sysrq: SysRq : HELP : loglevel(0-9) reboot(b) crash(c)

Fixes: 97f5f0cd ("Input: implement SysRq as a separate input handler")
Signed-off-by: default avatarPetr Mladek <pmladek@suse.com>
Reviewed-by: default avatarSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 075e1a0c
...@@ -539,7 +539,6 @@ void __handle_sysrq(int key, bool check_mask) ...@@ -539,7 +539,6 @@ void __handle_sysrq(int key, bool check_mask)
*/ */
orig_log_level = console_loglevel; orig_log_level = console_loglevel;
console_loglevel = CONSOLE_LOGLEVEL_DEFAULT; console_loglevel = CONSOLE_LOGLEVEL_DEFAULT;
pr_info("SysRq : ");
op_p = __sysrq_get_key_op(key); op_p = __sysrq_get_key_op(key);
if (op_p) { if (op_p) {
...@@ -548,15 +547,15 @@ void __handle_sysrq(int key, bool check_mask) ...@@ -548,15 +547,15 @@ void __handle_sysrq(int key, bool check_mask)
* should not) and is the invoked operation enabled? * should not) and is the invoked operation enabled?
*/ */
if (!check_mask || sysrq_on_mask(op_p->enable_mask)) { if (!check_mask || sysrq_on_mask(op_p->enable_mask)) {
pr_cont("%s\n", op_p->action_msg); pr_info("%s\n", op_p->action_msg);
console_loglevel = orig_log_level; console_loglevel = orig_log_level;
op_p->handler(key); op_p->handler(key);
} else { } else {
pr_cont("This sysrq operation is disabled.\n"); pr_info("This sysrq operation is disabled.\n");
console_loglevel = orig_log_level; console_loglevel = orig_log_level;
} }
} else { } else {
pr_cont("HELP : "); pr_info("HELP : ");
/* Only print the help msg once per handler */ /* Only print the help msg once per handler */
for (i = 0; i < ARRAY_SIZE(sysrq_key_table); i++) { for (i = 0; i < ARRAY_SIZE(sysrq_key_table); i++) {
if (sysrq_key_table[i]) { if (sysrq_key_table[i]) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment