Received: from eggs.gnu.org ([2001:4830:134:3::10]:39969) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmIw8-0000R7-Ct for qemu-devel@nongnu.org; Thu, 06 Nov 2014 04:01:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmIw2-0008LF-7l for qemu-devel@nongnu.org; Thu, 06 Nov 2014 04:01:00 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmIw1-0008L7-W3 for qemu-devel@nongnu.org; Thu, 06 Nov 2014 04:00:54 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sA690qsD032440 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 6 Nov 2014 04:00:53 -0500 From: Markus Armbruster References: <1415119766-9745-1-git-send-email-akong@redhat.com> <1415177267.11011.1.camel@nilsson.home.kraxel.org> Date: Thu, 06 Nov 2014 10:00:49 +0100 In-Reply-To: <1415177267.11011.1.camel@nilsson.home.kraxel.org> (Gerd Hoffmann's message of "Wed, 05 Nov 2014 09:47:47 +0100") Message-ID: <878ujo66v2.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] ui/input: strictly check console in finding input handler List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gerd Hoffmann Cc: Amos Kong , qemu-devel@nongnu.org, mtosatti@redhat.com Gerd Hoffmann 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.