aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/dev-storage.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-07-23 10:56:55 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-07-23 10:56:55 -0500
commit931f0adf64261bf7eb3efaafb4430c04a6a3e6f6 (patch)
tree4dedbea9096972d9215cfb1358f57e6e3acd8d43 /hw/usb/dev-storage.c
parent3464700f6aecb3e2aa9098839d90672d6b3fa974 (diff)
parent52785d99513e4f5d8c3d94f4362ff54aba88f33c (diff)
downloadqemu-931f0adf64261bf7eb3efaafb4430c04a6a3e6f6.zip
qemu-931f0adf64261bf7eb3efaafb4430c04a6a3e6f6.tar.gz
qemu-931f0adf64261bf7eb3efaafb4430c04a6a3e6f6.tar.bz2
Merge remote-tracking branch 'afaerber/tags/qom-devices-for-anthony' into staging
QOM device refactorings * Avoid TYPE_* in VMStateDescription name * Replace some DO_UPCAST()s and FROM_SYSBUS()s with QOM casts * Limit legacy SCSI command line handling to non-hotplugged devices * Replace some SysBusDeviceClass::init with DeviceClass::realize # gpg: Signature made Mon 22 Jul 2013 06:31:42 PM CDT using RSA key ID 3E7E013F # gpg: Can't check signature: public key not found # By Hu Tao (26) and others # Via Andreas Färber * afaerber/tags/qom-devices-for-anthony: (55 commits) isa-bus: Drop isabus_bridge_init() since it does nothing ioapic: Use QOM realize for ioapic kvmvapic: Use QOM realize kvm/clock: Use QOM realize for kvmclock hpet: Use QOM realize for hpet scsi: Improve error propagation for scsi_bus_legacy_handle_cmdline() megasas: Legacy command line handling fix scsi/esp: Use QOM realize for scsi esp fw_cfg: Use QOM realize for fw_cfg ahci: Use QOM realize for ahci pflash_cfi02: Use QOM realize for pflash_cfi02 pflash_cfi01: Use QOM realize for pflash_cfi01 fdc: Improve error propagation for QOM realize fdc: Use QOM realize for fdc kvm/clock: QOM'ify some more hpet: QOM'ify some more scsi/esp: QOM'ify some more fwcfg: QOM'ify some more ahci: QOM'ify some more pflash-cfi02: QOM'ify some more ...
Diffstat (limited to 'hw/usb/dev-storage.c')
-rw-r--r--hw/usb/dev-storage.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index fe914ab..1954811 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -595,6 +595,7 @@ static int usb_msd_initfn_storage(USBDevice *dev)
MSDState *s = DO_UPCAST(MSDState, dev, dev);
BlockDriverState *bs = s->conf.bs;
SCSIDevice *scsi_dev;
+ Error *err = NULL;
if (!bs) {
error_report("drive property not set");
@@ -619,7 +620,8 @@ static int usb_msd_initfn_storage(USBDevice *dev)
usb_desc_init(dev);
scsi_bus_new(&s->bus, &s->dev.qdev, &usb_msd_scsi_info_storage, NULL);
scsi_dev = scsi_bus_legacy_add_drive(&s->bus, bs, 0, !!s->removable,
- s->conf.bootindex, dev->serial);
+ s->conf.bootindex, dev->serial,
+ &err);
if (!scsi_dev) {
return -1;
}