Skip to contentSkip to conversation

sysrq : restore console_loglevel back to orig_log_level

PATCH tyeon 1 participant 1 message May 7, 2015 2 messages not in the archive TTY layer and serial drivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): [email protected]

tyeon

author
#2 lore raw

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

---
 drivers/tty/sysrq.c |    1 +
 1 file changed, 1 insertion(+)
drivers/tty/sysrq.c +1 -0
index 259a4d5..68d5295 100644
@@ -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 : ");
Signature · 3 lines
1.7.9.5

sorry to bother you.
Quoted 27 lines

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

---
  drivers/tty/sysrq.c |    1 +
  1 file changed, 1 insertion(+)
drivers/tty/sysrq.c +1 -0
index 259a4d5..68d5295 100644
@@ -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 : ");