]> Git Repo - qemu.git/commitdiff
usb-bot: Mark device as non hotpluggable
authorIgor Mammedov <[email protected]>
Fri, 26 Sep 2014 09:28:35 +0000 (09:28 +0000)
committerAndreas Färber <[email protected]>
Wed, 15 Oct 2014 03:03:14 +0000 (05:03 +0200)
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 <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
hw/usb/dev-storage.c

index bd7cc53e0777b28f114c40153f7f3bfc0408ea91..a2075074a54745f4a4736b459e71cc48524cbd03 100644 (file)
@@ -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 = {
This page took 0.027267 seconds and 4 git commands to generate.