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. > > Signed-off-by: Kevin Wolf <kw...@redhat.com> > --- > hw/scsi/scsi-disk.c | 5 +++++ > 1 file changed, 5 insertions(+) > > 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, Error > **errp) > static void scsi_cd_realize(SCSIDevice *dev, Error **errp) > { > SCSIDiskState *s = DO_UPCAST(SCSIDiskState, qdev, dev); > + > + if (!dev->conf.blk) { > + dev->conf.blk = blk_new(); > + } > + Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature