lkml.org 
[lkml]   [2011]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] vt: Add virtual console keyboard mode OFF
On Sun, Jan 30, 2011 at 12:36:22AM -0800, Arthur Taylor wrote:
> Add a new mode for the virtual console keyboard OFF to compliment RAW
> in which all key events are ignored. New mode prevents vt input
> buffers from overflowing when a program opens but doesn't read from a
> tty, like Xorg using only evdev for input.
>
> The new mode is available by the ioctl KDSKBMODE with argument K_OFF
> from linux/kd.h. Does not effect sysrq behaviour.

Care to document this somewhere (i.e. Documentation/ABI?)

> Cc: Greg Kroah-Hartman <gregkh@suse.de>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Alan Cox <alan@redhat.com>
> Signed-off-by: Arthur Taylor <art@ified.ca>
> ---
> drivers/tty/vt/keyboard.c | 5 +++--
> drivers/tty/vt/vt_ioctl.c | 3 +++
> include/linux/kbd_kern.h | 3 ++-
> include/linux/kd.h | 1 +
> 4 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/tty/vt/keyboard.c b/drivers/tty/vt/keyboard.c
> index e95d787..6dd3c68 100644
> --- a/drivers/tty/vt/keyboard.c
> +++ b/drivers/tty/vt/keyboard.c
> @@ -654,7 +654,8 @@ static void k_spec(struct vc_data *vc, unsigned
> char value, char up_flag)

Your patch is line-wrapped and can not be applied :(

> @@ -50,11 +50,12 @@ struct kbd_struct {
> #define VC_CAPSLOCK 2 /* capslock mode */
> #define VC_KANALOCK 3 /* kanalock mode */
>
> - unsigned char kbdmode:2; /* one 2-bit value */
> + unsigned char kbdmode:3; /* one 3-bit value */

Are you sure you can change the size of this structure and no one is
going to have problems?

Also, what userspace code is going to use this new feature? Has it been
tested to work properly?

thanks,

greg k-h


\
 
 \ /
  Last update: 2011-01-31 18:53    [W:0.104 / U:0.256 seconds]
©2003-2014 Jasper Spaans. Advertise on this site