From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:49432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmzEN-0003kZ-Ey for qemu-devel@nongnu.org; Fri, 29 Jul 2011 22:24:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QmzEM-0001aS-8K for qemu-devel@nongnu.org; Fri, 29 Jul 2011 22:24:47 -0400 Received: from mail-pz0-f43.google.com ([209.85.210.43]:33006) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmzEM-0001aB-3i for qemu-devel@nongnu.org; Fri, 29 Jul 2011 22:24:46 -0400 Received: by pzk1 with SMTP id 1so7716152pzk.30 for ; Fri, 29 Jul 2011 19:24:44 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <1311179069-27882-45-git-send-email-armbru@redhat.com> References: <1311179069-27882-1-git-send-email-armbru@redhat.com> <1311179069-27882-45-git-send-email-armbru@redhat.com> Date: Sat, 30 Jul 2011 04:24:44 +0200 Message-ID: From: andrzej zaborowski Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 44/55] spitz tosa: Simplify "drive is suitable for microdrive" test List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: kwolf@redhat.com, stefano.stabellini@eu.citrix.com, dbaryshkov@gmail.com, quintela@redhat.com, qemu-devel@nongnu.org, lcapitulino@redhat.com, amit.shah@redhat.com On 20 July 2011 18:24, Markus Armbruster wrote: > We try the drive defined with -drive if=3Dide,index=3D0 (or equivalent > sugar). =C2=A0We use it only if (dinfo && bdrv_is_inserted(dinfo->bdrv) &= & > !bdrv_is_removable(dinfo->bdrv)). =C2=A0This is a convoluted way to test > for "drive media can't be removed". > > The only way to create such a drive with -drive if=3Dide is media=3Dcdrom= . > And that sets dinfo->media_cd, so just test that. This is a less generic test and more prone to be broken inadvertently, so it seems like a step back. What's the argument against the convoluted and explicit test? Cheers