From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47688) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmGhs-0000V0-Bc for qemu-devel@nongnu.org; Thu, 06 Nov 2014 01:38:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmGhm-00050v-73 for qemu-devel@nongnu.org; Thu, 06 Nov 2014 01:38:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:40623) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmGhl-00050q-Vu for qemu-devel@nongnu.org; Thu, 06 Nov 2014 01:38:02 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sA66bxki015800 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 6 Nov 2014 01:38:00 -0500 Date: Thu, 6 Nov 2014 14:37:54 +0800 From: Amos Kong Message-ID: <20141106063754.GF8764@air.redhat.com> References: <1415119766-9745-1-git-send-email-akong@redhat.com> <1415177267.11011.1.camel@nilsson.home.kraxel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iBwuxWUsK/REspAd" Content-Disposition: inline In-Reply-To: <1415177267.11011.1.camel@nilsson.home.kraxel.org> 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: mtosatti@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com --iBwuxWUsK/REspAd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 05, 2014 at 09:47:47AM +0100, Gerd Hoffmann wrote: > 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. If console is assigned, it will try to find right handler by first loop in qemu_input_find_handler(). The second loop is used to find mask matched handler if console isn't assigned. If we assigned console and didn't find handler in first loop, it skip second loop body by 'continue', and return NULL. It seems my concern is wrong, we don't need this repeated parameter. NACK this patch. Thanks. =20 > > 'input-send-event' has a parameter to assign special console, > > so we should enable strict checking in finding handler. >=20 > 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. >=20 > Options I see are: >=20 > (a) Turn console into an optional parameter, do strict checking in > case it is present. > (b) Add a optional 'strict' parameter. --=20 Amos. --iBwuxWUsK/REspAd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUWxdCAAoJELxSv6I5vP9jRd4P/3Bupxg89ow8Njy82/9fc+VE 2PHNE9FznsjkiP+MYQ3vZEtA4NRx2BJE5/UHiuAuQG9/KKJVIn2kHfG5LA4NkeWk WFVVvJkwI6GVD9H78WqlgBkez4upURtn4prXwE4mGbxcNh709PDHSDWXAsdCHUzf 5BAEKt0khNC23UnCY8AsmXByUGm/QEBsSwy0x7aFAIUx4zYmZxhi/T23AiunsHgp v0geMxGEgjszIrdxsMo3KqeLFaIcDyuOOd2mAKQa474zLUXxNPRneARdin1K0fpv KVjKpBki9K+J3MBV9GEVD+8MT1SLDD8q2fgUXac+09D2xFD0aCHUzzUqbVZ96478 FpTbAzA19kkpkL2mgNBxzoJBzyfFGmDaHDqzmIKOYmMCcvoQ6wpb7cHUpHiOkClF 5cFRXhvZgzIx24xRhEyJJV76Iopd/dqnJKLMb8UUWDtCiiaUWt1m88HWeH6LW6HM 8AMqs0URtgddwZw4/iFRvQId4/C4dVsBuxqTZMKQVipl2BPIpo0By3UsELQHNhAI EVSAOlowMQ486yeEuspg8SjpyP0Ip+1lAJoBtQEq7d0VFGeF4Jmr83peoQ+0a0pQ bWyvrWp4sWbEDPDVtWoS0f16bh7ClDNLqZ4y+9+kWNO6c8Kuq4SLq0wtI2oNAPz3 ury/qj6FGNfjf0uJ0esY =f2Db -----END PGP SIGNATURE----- --iBwuxWUsK/REspAd--