Re: [PATCH v1 2/4] serial: core: Print escaped SysRq Magic sequence if enabled

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/10/20 1:20 PM, Andy Shevchenko wrote:
> It is useful to see on the serial console the magic sequence itself
> to enable SysRq without rummaging source code.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>

Reviewed-by: Dmitry Safonov <0x7f454c46@xxxxxxxxx>

> ---
>  drivers/tty/serial/serial_core.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
> index ec3b833e9f22..e3f2afc15ad4 100644
> --- a/drivers/tty/serial/serial_core.c
> +++ b/drivers/tty/serial/serial_core.c
> @@ -3191,8 +3191,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);
>  
> 

Thanks,
          Dmitry



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux