public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] sysrq : restore console_loglevel back to orig_log_level
       [not found] ` <554AD035.4040400@windriver.com>
@ 2015-05-07  2:48   ` tyeon
  0 siblings, 0 replies; only message in thread
From: tyeon @ 2015-05-07  2:48 UTC (permalink / raw)
  To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Jiri Slaby
  Cc: linux-kernel@vger.kernel.org, tomyeon750415lkml

if check_mask is true and sysrq_on_maks returns false,
then, the code go through the 'else' statement.
	if (!check_mask || sysrq_on_maks(..)) {
		...
	} else {
	        pr_cont("This sysrq operation is disabled.\n");
	}
	...
So, console_loglevel remains CONSOLE_LOGLEVEL_DEFAULT

Signed-off-by: Tom(JeHyeon) Yeon <tom.yeon@windriver.com>
---
  drivers/tty/sysrq.c |    1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index 259a4d5..68d5295 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -537,6 +537,7 @@ void __handle_sysrq(int key, bool check_mask)
  			op_p->handler(key);
  		} else {
  			pr_cont("This sysrq operation is disabled.\n");
+			console_loglevel = orig_log_level;
  		}
  	} else {
  		pr_cont("HELP : ");
-- 
1.7.9.5

sorry to bother you.
> if check_mask is true and sysrq_on_maks returns false,
> then, the code go through the 'else' statement.
>      if (!check_mask || sysrq_on_maks(..)) {
>          ...
>      } else {
>              pr_cont("This sysrq operation is disabled.\n");
>      }
>      ...
> So, console_loglevel remains CONSOLE_LOGLEVEL_DEFAULT
>
> Signed-off-by: Tom(JeHyeon) Yeon <tom.yeon@windriver.com>
> ---
>   drivers/tty/sysrq.c |    1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
> index 259a4d5..68d5295 100644
> --- a/drivers/tty/sysrq.c
> +++ b/drivers/tty/sysrq.c
> @@ -537,6 +537,7 @@ void __handle_sysrq(int key, bool check_mask)
>               op_p->handler(key);
>           } else {
>               pr_cont("This sysrq operation is disabled.\n");
> +            console_loglevel = orig_log_level;
>           }
>       } else {
>           pr_cont("HELP : ");


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-05-07  2:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <5541D4D1.7020803@windriver.com>
     [not found] ` <554AD035.4040400@windriver.com>
2015-05-07  2:48   ` [PATCH] sysrq : restore console_loglevel back to orig_log_level tyeon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox