qemu-e2k/hw/core
Jun Li 09d5601771 qdev: Avoid type assertion in qdev_build_hotpluggable_device_list()
Currently when *obj is not a TYPE_DEVICE, QEMU will abort. This patch
fixes it. When *obj is not a TYPE_DEVICE, just do not add it to hotpluggable
device list.

This patch also fixes the following issue:
1. boot QEMU using cli:
$ /opt/qemu-git-arm/bin/qemu-system-x86_64 -monitor stdio -enable-kvm \
-device virtio-scsi-pci,id=scsi0

2. device_del scsi0 via hmp using tab key(first input device_del, then press
"Tab" key).
(qemu) device_del

After step 2, QEMU will abort.
(qemu) device_del hw/core/qdev.c:930:qdev_build_hotpluggable_device_list:
Object 0x5555563a2460 is not an instance of type device

Signed-off-by: Jun Li <junmuzi@gmail.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Andreas Färber <afaerber@suse.de>
2015-02-16 15:05:42 +01:00
..
empty_slot.c empty_slot: QOM cast cleanup 2013-07-29 21:06:37 +02:00
fw-path-provider.c fw_cfg: fix typos in comments: patch -> path 2015-02-10 09:27:19 +03:00
hotplug.c qdev: HotplugHandler: Provide unplug callback 2014-10-15 05:03:13 +02:00
irq.c irq: Remove qemu_irq_intercept_out 2014-10-23 16:41:25 +02:00
loader.c pc: resizeable ROM blocks 2015-01-10 21:02:23 +00:00
machine.c hw/machine: added machine_usb wrapper 2015-01-08 17:32:27 +00:00
Makefile.objs sysbus: Add new platform bus helper device 2014-11-04 23:26:14 +01:00
nmi.c cpus: Define callback for QEMU "nmi" command 2014-08-25 13:25:16 +02:00
null-machine.c machine: Conversion of QEMUMachineInitArgs to MachineState 2014-05-28 17:35:01 +02:00
platform-bus.c sysbus: Add new platform bus helper device 2014-11-04 23:26:14 +01:00
ptimer.c vmstate: accept QEMUTimer in VMSTATE_TIMER*, add VMSTATE_TIMER_PTR* 2015-01-26 12:22:44 +01:00
qdev-properties-system.c net: don't use set/get_pointer() in set/get_netdev() 2014-12-19 13:17:02 +00:00
qdev-properties.c hw: Convert from BlockDriverState to BlockBackend, mostly 2014-10-20 14:02:25 +02:00
qdev.c qdev: Avoid type assertion in qdev_build_hotpluggable_device_list() 2015-02-16 15:05:42 +01:00
stream.c stream: Remove app argument hack 2013-04-16 10:04:23 +02:00
sysbus.c sysbus: Expose MMIO enumeration helper 2014-11-04 23:26:14 +01:00
uboot_image.h hw: move private headers to hw/ subdirectories. 2013-04-08 18:13:16 +02:00