From: "zhangwei(Jovi)" <jovi.zhangwei@huawei.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Jiri Slaby <jslaby@suse.cz>
Subject: [PATCH] sysrq: allow user trigger sysrq by upper-case character key
Date: Wed, 6 Mar 2013 12:07:34 +0800 [thread overview]
Message-ID: <5136C106.40308@huawei.com> (raw)
See the help text output of /proc/sysrq-trigger:
SysRq : HELP : loglevel(0-9) reBoot Crash terminate-all-tasks(E)
memory-full-oom-kill(F) kill-all-tasks(I) ...
Most command is referenced by responding upper-case character,
this would hint user can trigger sysrq by upper-case character key,
but that's wrong, sysrq only accept lower-case character currently.
It's reasonable to let user trigger sysrq by upper-case character key.
Signed-off-by: zhnagwei(Jovi) <jovi.zhangwei@huawei.com>
---
drivers/tty/sysrq.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index 3687f0c..a88908e 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -471,6 +471,8 @@ static int sysrq_key_table_key2index(int key)
retval = key - '0';
else if ((key >= 'a') && (key <= 'z'))
retval = key + 10 - 'a';
+ else if ((key >= 'A') && (key <= 'Z'))
+ retval = key + 10 - 'A';
else
retval = -1;
return retval;
--
1.7.9.7
next reply other threads:[~2013-03-06 4:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-06 4:07 zhangwei(Jovi) [this message]
2013-03-06 19:31 ` [PATCH] sysrq: allow user trigger sysrq by upper-case character key Randy Dunlap
2013-03-06 21:39 ` Andrew Morton
2013-03-07 8:40 ` zhangwei(Jovi)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5136C106.40308@huawei.com \
--to=jovi.zhangwei@huawei.com \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.