From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nwzdn-0000bs-Hh for qemu-devel@nongnu.org; Wed, 31 Mar 2010 11:15:35 -0400 Received: from [140.186.70.92] (port=33547 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nwzdl-0000ZT-Ek for qemu-devel@nongnu.org; Wed, 31 Mar 2010 11:15:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nwzdf-0001vR-7h for qemu-devel@nongnu.org; Wed, 31 Mar 2010 11:15:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:42691) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nwzde-0001vH-VJ for qemu-devel@nongnu.org; Wed, 31 Mar 2010 11:15:27 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2VFFPAV015216 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 31 Mar 2010 11:15:26 -0400 Date: Wed, 31 Mar 2010 18:14:18 +0300 From: Shahar Havivi Subject: Re: [Qemu-devel] [PATCH 2/2] Added monitor commands: 'keyboard_set' and 'info keybaord' Message-ID: <20100331151417.GB13328@redhat.com> References: <24a0619c9d6c07c5b10f5aff19478ff3040c4af8.1269373411.git.shaharh@redhat.com> <20100326184030.GA25061@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org On Wed, Mar 31, 2010 at 05:10:22PM +0200, Markus Armbruster wrote: > Date: Wed, 31 Mar 2010 17:10:22 +0200 > From: Markus Armbruster > To: Shahar Havivi > Cc: qemu-devel@nongnu.org > Subject: Re: [Qemu-devel] [PATCH 2/2] Added monitor commands: > 'keyboard_set' and 'info keybaord' > > Shahar Havivi writes: > > > On Fri, Mar 26, 2010 at 10:57:58AM +0100, Markus Armbruster wrote: > [...] > >> Since the index is not a stable identifier of keyboards, and we support > >> multiple monitors, you're prone to remove the wrong keyboard. > >> > >> Monitor#1 Monitor#2 > >> "info keyboard" to find the index > >> unplug a keyboard, invalidating > >> index > >> keyboard_set > >> > >> I think it's best to use a stable ID, like we do in other places. We > >> commonly let the user specify it, e.g. as id=ID in -netdev, -device and > >> elswhere. > > What do we do when user not specify id for device? > > Two obvious options: make one up (problem: clashes), or stipulate "if > you want to keyboard_set this keyboard, you must specify an id for it". > > [...] How about static auto incremented id like the mouse does?