From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41535) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bNmdf-0003Bb-4b for qemu-devel@nongnu.org; Thu, 14 Jul 2016 15:49:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bNmdd-0003dW-5G for qemu-devel@nongnu.org; Thu, 14 Jul 2016 15:49:38 -0400 References: <1468504183-20180-1-git-send-email-kwolf@redhat.com> <1468504183-20180-3-git-send-email-kwolf@redhat.com> From: Eric Blake Message-ID: <5787ECC8.3070902@redhat.com> Date: Thu, 14 Jul 2016 13:49:28 -0600 MIME-Version: 1.0 In-Reply-To: <1468504183-20180-3-git-send-email-kwolf@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Whjl7LxkwLresNKKKaILkfKOxwTbJSs2T" Subject: Re: [Qemu-devel] [PATCH 2/2] scsi: scsi-cd without drive property for empty drive List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf , qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, mreitz@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Whjl7LxkwLresNKKKaILkfKOxwTbJSs2T From: Eric Blake To: Kevin Wolf , qemu-block@nongnu.org Cc: qemu-devel@nongnu.org, mreitz@redhat.com Message-ID: <5787ECC8.3070902@redhat.com> Subject: Re: [Qemu-devel] [PATCH 2/2] scsi: scsi-cd without drive property for empty drive References: <1468504183-20180-1-git-send-email-kwolf@redhat.com> <1468504183-20180-3-git-send-email-kwolf@redhat.com> In-Reply-To: <1468504183-20180-3-git-send-email-kwolf@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/14/2016 07:49 AM, Kevin Wolf wrote: > This allows to create an empty scsi-cd device without manually creating= Grammar might sound better as: This allows the creation of an empty or This allows a user to create an empty > a BlockBackend. >=20 > Signed-off-by: Kevin Wolf > --- > hw/scsi/scsi-disk.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c > index 8dbfc10..b4e71ff 100644 > --- a/hw/scsi/scsi-disk.c > +++ b/hw/scsi/scsi-disk.c > @@ -2359,6 +2359,11 @@ static void scsi_hd_realize(SCSIDevice *dev, Err= or **errp) > static void scsi_cd_realize(SCSIDevice *dev, Error **errp) > { > SCSIDiskState *s =3D DO_UPCAST(SCSIDiskState, qdev, dev); > + > + if (!dev->conf.blk) { > + dev->conf.blk =3D blk_new(); > + } > + Reviewed-by: Eric Blake --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --Whjl7LxkwLresNKKKaILkfKOxwTbJSs2T Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJXh+zIAAoJEKeha0olJ0Nqj0MH/AyPTfrY+yHCBW5wmszz/zvI tAp6ZWrVh7uEjlj+DbAWdt8uZhpAO3FcvwrvRsMDvxFE6+H4Swgk07TdCx+TE8cs wRWcd0pGChjoA0ia1rvcuDESH32Kv0e6odI3rFirTaJOa/1Pz60DgX7wqAqdfozB 9v6x+NkhSIVfglgW06uHlYsJMsJFmmRdWi64zyFIawO9GiiDQRvIIWdeQA/bXczX OiBppoBlj94uD3AA1c0yJUxwyUbrY8mazyW2msDMEaKhBQVVofeDA1qr7gDffS2h 2Omr8Zzf+dBJiREVOiWYrtrjssCOb15QvkwBTyYhvzoZWM3ZsZRm0ryPRFRr32Y= =k8+G -----END PGP SIGNATURE----- --Whjl7LxkwLresNKKKaILkfKOxwTbJSs2T--