All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: Amos Kong <akong@redhat.com>, qemu-devel@nongnu.org, mtosatti@redhat.com
Subject: Re: [Qemu-devel] [PATCH] ui/input: strictly check console in finding input handler
Date: Thu, 06 Nov 2014 10:00:49 +0100	[thread overview]
Message-ID: <878ujo66v2.fsf@blackfin.pond.sub.org> (raw)
In-Reply-To: <1415177267.11011.1.camel@nilsson.home.kraxel.org> (Gerd Hoffmann's message of "Wed, 05 Nov 2014 09:47:47 +0100")

Gerd Hoffmann <kraxel@redhat.com> writes:

> On Mi, 2014-11-05 at 00:49 +0800, Amos Kong wrote:
>> qemu_input_find_handler() prefers a handler associated with con.
>> But if none exists, it takes any. This patch added a parameter
>> to strictly check console, in case we want to input event to
>> special console.
>> 
>> 'input-send-event' has a parameter to assign special console,
>> so we should enable strict checking in finding handler.
>
> I don't think we want do that by default.  It only matters in case of a
> multiseat setup where you actually have multiple input devices of the
> same kind.  Which isn't a very typical use case.
>
> Options I see are:
>
>   (a) Turn console into an optional parameter, do strict checking in
>       case it is present.
>   (b) Add a optional 'strict' parameter.

Current behavior (please correct misunderstandings):

    The guest must be running.
    input-send-event parameter 'console' is mandatory.
    The console identified by its value must exist.
    If this console can accept the event, send it there.
    Else, a console that can accept the event must exist.  Send it to
    one of them.  Which one exactly isn't specified.

Behavior with (a):

    The guest must be running.
    input-send-event parameter 'console' is optional.
    If it's present, the console identified by its value must exist, and
    must be able to accept the event.  Send it there.
    Else, a console that can accept the event must exist.  Send it to
    one of them.  Which one exactly isn't specified.

"Must" means "or else command fails".

I think that's a clear improvement.  It's actually what I expected from
the command documentation, until I read the code.

      parent reply	other threads:[~2014-11-06  9:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04 16:49 [Qemu-devel] [PATCH] ui/input: strictly check console in finding input handler Amos Kong
2014-11-05  8:47 ` Gerd Hoffmann
2014-11-06  6:37   ` Amos Kong
2014-11-06 15:01     ` Amos Kong
2014-11-07  4:16       ` Amos Kong
2014-11-06  9:00   ` Markus Armbruster [this message]

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=878ujo66v2.fsf@blackfin.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=akong@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.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.