diff options
author | Arthur Taylor <art@ified.ca> | 2011-02-04 13:55:50 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-17 11:12:40 -0800 |
commit | 9fc3de9c83565fcaa23df74c2fc414bb6e7efb0a (patch) | |
tree | 8d5fb1f8b90fb9a4f194aee8971859a45283d88c /drivers/tty/vt/vt_ioctl.c | |
parent | 8e6d3fe1af38bea3f6c003f8737d2e3a02d00fa0 (diff) | |
download | blackbird-op-linux-9fc3de9c83565fcaa23df74c2fc414bb6e7efb0a.tar.gz blackbird-op-linux-9fc3de9c83565fcaa23df74c2fc414bb6e7efb0a.zip |
vt: Add virtual console keyboard mode OFF
virtual console: add keyboard mode OFF
Add a new mode for the virtual console keyboard OFF in which all input
other than shift keys is ignored. Prevents vt input buffers from
overflowing when a program opens but doesn't read from a tty, like X11
using evdev for input.
Signed-off-by: Arthur Taylor <art@ified.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty/vt/vt_ioctl.c')
-rw-r--r-- | drivers/tty/vt/vt_ioctl.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c index 1235ebda6e1c..6bcf05bf4978 100644 --- a/drivers/tty/vt/vt_ioctl.c +++ b/drivers/tty/vt/vt_ioctl.c @@ -688,6 +688,9 @@ int vt_ioctl(struct tty_struct *tty, struct file * file, kbd->kbdmode = VC_UNICODE; compute_shiftstate(); break; + case K_OFF: + kbd->kbdmode = VC_OFF; + break; default: ret = -EINVAL; goto out; |