diff options
author | Igor Mammedov <imammedo@redhat.com> | 2014-09-26 09:28:35 +0000 |
---|---|---|
committer | Andreas Färber <afaerber@suse.de> | 2014-10-15 05:03:14 +0200 |
commit | e9fd12aa0dd734f1e3725d93a0afa8721fab3bd2 (patch) | |
tree | add116502a9a1e3cf7e12786546ece06d59e01e0 /hw/usb | |
parent | 10bdcd565992e17f0b4f04e0b28793b169e51a26 (diff) |
usb-bot: Mark device as non hotpluggable
usb-bot creates SCSI bus and immediately makes it
non hotpluggable which was making not possible to
hotplug usb-bot since QEMU would abort at
bus_add_child(scsi-hd) time when usb-bot is
realized.
Mark usb-bot as not hotpluggable so that attempt
to hotplug it would error out even before it gets
to device initialization point.
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/usb')
-rw-r--r-- | hw/usb/dev-storage.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index bd7cc53e07..a2075074a5 100644 --- a/hw/usb/dev-storage.c +++ b/hw/usb/dev-storage.c @@ -770,9 +770,11 @@ static void usb_msd_class_initfn_storage(ObjectClass *klass, void *data) static void usb_msd_class_initfn_bot(ObjectClass *klass, void *data) { USBDeviceClass *uc = USB_DEVICE_CLASS(klass); + DeviceClass *dc = DEVICE_CLASS(klass); uc->realize = usb_msd_realize_bot; usb_msd_class_initfn_common(klass); + dc->hotpluggable = false; } static const TypeInfo msd_info = { |