From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43764) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Talv4-0002Ac-DF for qemu-devel@nongnu.org; Tue, 20 Nov 2012 06:23:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Talv0-0002UU-BI for qemu-devel@nongnu.org; Tue, 20 Nov 2012 06:23:10 -0500 Received: from e06smtp11.uk.ibm.com ([195.75.94.107]:42810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Talv0-0002Sy-2Z for qemu-devel@nongnu.org; Tue, 20 Nov 2012 06:23:06 -0500 Received: from /spool/local by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 20 Nov 2012 11:23:03 -0000 Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps4074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qAKBMreh61407326 for ; Tue, 20 Nov 2012 11:22:53 GMT Received: from d06av05.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qAKBMxm1009845 for ; Tue, 20 Nov 2012 04:23:00 -0700 Message-ID: <50AB6813.60608@de.ibm.com> Date: Tue, 20 Nov 2012 12:22:59 +0100 From: Christian Borntraeger MIME-Version: 1.0 References: <1352708530-28863-1-git-send-email-borntraeger@de.ibm.com> <1352708530-28863-2-git-send-email-borntraeger@de.ibm.com> <3BAFCBD6-D1BB-4270-BB16-DCEC6B124350@suse.de> <50AA37A3.4080002@de.ibm.com> <61E29228-6F64-4723-B1DE-B5BEF12B1BCD@suse.de> <87ip91smw1.fsf@blackfin.pond.sub.org> In-Reply-To: <87ip91smw1.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/1] Support default block interfaces per QEMUMachine List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: Kevin Wolf , Peter Maydell , Anthony Liguori , Igor Mitsyanko , Alexander Graf , qemu-devel qemu-devel , Jens Freimann , Stefan Hajnoczi , Cornelia Huck , =?ISO-8859-1?Q?Andreas_F=E4rber?= , Einar Lueck On 19/11/12 15:11, Markus Armbruster wrote: > > Generalizing QEMUMachine member use_scsi to a default BlockInterfaceType > makes plenty of sense to me. Great. > > I'm not sure "no initializer means IDE" is such a hot idea, but since > it's how use_scsi has always worked, I'm okay with making its > replacement work like that, too. This actually makes sure that simple qemu command lines (without libvirt) provide sane defaults for users, so I will try to keep that. > > Like Alex, I dislike inventing yet another enumeration for this > purpose. Let's use BlockInterfaceType. OK, will try to come up with something else. > > In theory, we can change values of internal enumerations freely. In > practice, such changes can run afoul of leaky abstractions, such as C89 > array initializers and sloppy tests against zero. Careful review > advised. > Indeed, I did it that way to avoid problems in code that implicitely assumes IF_NONE if nothing is specified. Fortunately there are only a small number of code places that actually check for IF_NONE (e.g. drive_hot_add). I will try to review each place before re-submitting. Christian