Revision f8b6cc00 hw/scsi-generic.c
b/hw/scsi-generic.c | ||
---|---|---|
453 | 453 |
r = DO_UPCAST(SCSIGenericReq, req, QTAILQ_FIRST(&s->qdev.requests)); |
454 | 454 |
scsi_remove_request(r); |
455 | 455 |
} |
456 |
blockdev_mark_auto_del(s->qdev.conf.dinfo->bdrv);
|
|
456 |
blockdev_mark_auto_del(s->qdev.conf.bs);
|
|
457 | 457 |
} |
458 | 458 |
|
459 | 459 |
static int scsi_generic_initfn(SCSIDevice *dev) |
... | ... | |
462 | 462 |
int sg_version; |
463 | 463 |
struct sg_scsi_id scsiid; |
464 | 464 |
|
465 |
if (!s->qdev.conf.dinfo || !s->qdev.conf.dinfo->bdrv) {
|
|
465 |
if (!s->qdev.conf.bs) {
|
|
466 | 466 |
error_report("scsi-generic: drive property not set"); |
467 | 467 |
return -1; |
468 | 468 |
} |
469 |
s->bs = s->qdev.conf.dinfo->bdrv;
|
|
469 |
s->bs = s->qdev.conf.bs;
|
|
470 | 470 |
|
471 | 471 |
/* check we are really using a /dev/sg* file */ |
472 | 472 |
if (!bdrv_is_sg(s->bs)) { |
Also available in: Unified diff