aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko <[email protected]>2020-03-10 19:43:35 +0200
committerGreg Kroah-Hartman <[email protected]>2020-03-12 17:16:41 +0100
commitb18896ff3a92fe320ad5262009f0b90e04b8a203 (patch)
treedcd5f5627dfd98ccbca128109526c31ddca5a346
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 <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-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);