Commit b18896ff authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

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: default avatarDmitry Safonov <0x7f454c46@gmail.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200310174337.74109-2-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2ce5eace
...@@ -3092,8 +3092,11 @@ static const char sysrq_toggle_seq[] = CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE; ...@@ -3092,8 +3092,11 @@ static const char sysrq_toggle_seq[] = CONFIG_MAGIC_SYSRQ_SERIAL_SEQUENCE;
static void uart_sysrq_on(struct work_struct *w) static void uart_sysrq_on(struct work_struct *w)
{ {
int sysrq_toggle_seq_len = strlen(sysrq_toggle_seq);
sysrq_toggle_support(1); 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); static DECLARE_WORK(sysrq_enable_work, uart_sysrq_on);
......
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