Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

sysrq: Remove duplicated sysrq message

The commit 97f5f0cd8cd0a0544 ("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: 97f5f0cd8cd0a05 ("Input: implement SysRq as a separate input handler")
Signed-off-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Petr Mladek and committed by
Greg Kroah-Hartman
c3fee609 075e1a0c

+3 -4
+3 -4
drivers/tty/sysrq.c
··· 539 539 */ 540 540 orig_log_level = console_loglevel; 541 541 console_loglevel = CONSOLE_LOGLEVEL_DEFAULT; 542 - pr_info("SysRq : "); 543 542 544 543 op_p = __sysrq_get_key_op(key); 545 544 if (op_p) { ··· 547 548 * should not) and is the invoked operation enabled? 548 549 */ 549 550 if (!check_mask || sysrq_on_mask(op_p->enable_mask)) { 550 - pr_cont("%s\n", op_p->action_msg); 551 + pr_info("%s\n", op_p->action_msg); 551 552 console_loglevel = orig_log_level; 552 553 op_p->handler(key); 553 554 } else { 554 - pr_cont("This sysrq operation is disabled.\n"); 555 + pr_info("This sysrq operation is disabled.\n"); 555 556 console_loglevel = orig_log_level; 556 557 } 557 558 } else { 558 - pr_cont("HELP : "); 559 + pr_info("HELP : "); 559 560 /* Only print the help msg once per handler */ 560 561 for (i = 0; i < ARRAY_SIZE(sysrq_key_table); i++) { 561 562 if (sysrq_key_table[i]) {