public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Arthur Taylor <art@ified.ca>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
	alan@redhat.com, Pavel Machek <pavel@ucw.cz>
Subject: Re: [PATCH] vt: Add virtual console keyboard mode OFF
Date: Mon, 31 Jan 2011 09:46:22 -0800	[thread overview]
Message-ID: <20110131174622.GA25097@suse.de> (raw)
In-Reply-To: <AANLkTikZe1EuvNQHceNUdKFpmmeAbQG8H+34AG9fw43u@mail.gmail.com>

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

  parent reply	other threads:[~2011-01-31 17:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-30  8:36 [PATCH] vt: Add virtual console keyboard mode OFF Arthur Taylor
2011-01-31  7:40 ` Pavel Machek
2011-01-31 17:46 ` Greg KH [this message]
2011-02-02  2:07   ` [PATCH] [resend] " Arthur Taylor
2011-02-03 18:48     ` Greg KH
2011-02-04 21:55       ` Arthur Taylor

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=20110131174622.GA25097@suse.de \
    --to=gregkh@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=alan@redhat.com \
    --cc=art@ified.ca \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox