summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-03-10 19:43:35 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-03-12 17:16:41 +0100
commitb18896ff3a92fe320ad5262009f0b90e04b8a203 (patch)
treedcd5f5627dfd98ccbca128109526c31ddca5a346 /drivers/tty
parent2ce5eace42b859cabef898877b38a0429f931370 (diff)
serial: core: Print escaped SysRq Magic sequence if enabled
It is useful to see on the serial console the magic sequence itself to enable SysRq without rummaging source code. Reviewed-by: Dmitry Safonov <0x7f454c46@gmail.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20200310174337.74109-2-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/serial_core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index f5c8cf847532..c93d4e600f91 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -3092,8 +3092,11 @@ static const char sysrq_toggle_seq[] = CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE;
static void uart_sysrq_on(struct work_struct *w)
{
+ int sysrq_toggle_seq_len = strlen(sysrq_toggle_seq);
+
sysrq_toggle_support(1);
- pr_info("SysRq is enabled by magic sequence on serial\n");
+ pr_info("SysRq is enabled by magic sequence '%*pE' on serial\n",
+ sysrq_toggle_seq_len, sysrq_toggle_seq);
}
static DECLARE_WORK(sysrq_enable_work, uart_sysrq_on);