lkml.org 
[lkml]   [2013]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] tty: only print sysrq help for handlers that are enabled
Date
Also print out a notice when sysrq is in selective mode.

Signed-off-by: Shawn Landden <shawn@churchofgit.com>
---
drivers/tty/sysrq.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index ce396ec..4eee0e4 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -548,9 +548,14 @@ void __handle_sysrq(int key, bool check_mask)
;
if (j != i)
continue;
- printk("%s ", sysrq_key_table[i]->help_msg);
+ /* only print if handler is enabled */
+ if (sysrq_enabled & 1 ||
+ sysrq_enabled & sysrq_key_table[i]->enable_mask)
+ printk("%s ", sysrq_key_table[i]->help_msg);
}
}
+ if (!(sysrq_enabled & 1))
+ printk("(some options are disabled)");
printk("\n");
console_loglevel = orig_log_level;
}
--
1.8.4.4


\
 
 \ /
  Last update: 2013-12-03 19:21    [W:0.041 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site