aboutsummaryrefslogtreecommitdiff
path: root/hw/scsi-generic.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/scsi-generic.c')
-rw-r--r--hw/scsi-generic.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/scsi-generic.c b/hw/scsi-generic.c
index 1859c94b7c..79347f4a67 100644
--- a/hw/scsi-generic.c
+++ b/hw/scsi-generic.c
@@ -453,7 +453,7 @@ static void scsi_destroy(SCSIDevice *d)
r = DO_UPCAST(SCSIGenericReq, req, QTAILQ_FIRST(&s->qdev.requests));
scsi_remove_request(r);
}
- blockdev_mark_auto_del(s->qdev.conf.dinfo->bdrv);
+ blockdev_mark_auto_del(s->qdev.conf.bs);
}
static int scsi_generic_initfn(SCSIDevice *dev)
@@ -462,11 +462,11 @@ static int scsi_generic_initfn(SCSIDevice *dev)
int sg_version;
struct sg_scsi_id scsiid;
- if (!s->qdev.conf.dinfo || !s->qdev.conf.dinfo->bdrv) {
+ if (!s->qdev.conf.bs) {
error_report("scsi-generic: drive property not set");
return -1;
}
- s->bs = s->qdev.conf.dinfo->bdrv;
+ s->bs = s->qdev.conf.bs;
/* check we are really using a /dev/sg* file */
if (!bdrv_is_sg(s->bs)) {