From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0x1F-0002H1-1y for qemu-devel@nongnu.org; Wed, 08 Jan 2014 12:34:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W0x18-00020y-W4 for qemu-devel@nongnu.org; Wed, 08 Jan 2014 12:34:17 -0500 Received: from mx1.redhat.com ([209.132.183.28]:48311) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W0x18-0001zv-NV for qemu-devel@nongnu.org; Wed, 08 Jan 2014 12:34:10 -0500 Message-ID: <52CD8C09.2070306@redhat.com> Date: Wed, 08 Jan 2014 18:34:01 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1389121639-17657-1-git-send-email-kroosec@gmail.com> <87a9f7c4d5.fsf@blackfin.pond.sub.org> <20140108171749.GB3717@Inspiron-3521> In-Reply-To: <20140108171749.GB3717@Inspiron-3521> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] qdev: Assign a default device ID when none is provided. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Hani Benhabiles Cc: stefanha@redhat.com, Markus Armbruster , qemu-devel@nongnu.org, aliguori@amazon.com, imammedo@redhat.com, afaerber@suse.de Il 08/01/2014 18:17, Hani Benhabiles ha scritto: > For this reason, the loop in assign_device_name() specifically check that the ID > doesn't exist already and uses the next value if it does. > > How would something like: > (qemu) device_add virtio-net-pci > ==> ID: virtio-net-pci.0 > > Be more problematic than: > (qemu) device_add virtio-net-pci,id=virtio-net-pci.0 (qemu) device_add virtio-net-pci (qemu) device_add virtio-net-pci,id=virtio-net-pci.0 works without your patches, fails with them (IIUC). Paolo