[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 09/12] qdev: Don't abort() in case globals can't be s
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL 09/12] qdev: Don't abort() in case globals can't be set |
Date: |
Mon, 7 Jul 2014 15:40:35 +0300 |
From: Eduardo Habkost <address@hidden>
It would be much better if we didn't terminate QEMU inside
device_post_init(), but at least exiting cleanly is better than aborting
and dumping core.
Before this patch:
$ qemu-system-x86_64 -global cpu.xxx=y
qemu-system-x86_64: Property '.xxx' not found
Aborted (core dumped)
After this patch:
$ qemu-system-x86_64 -global cpu.xxx=y
qemu-system-x86_64: Property '.xxx' not found
Reviewed-by: Michael S. Tsirkin <address@hidden>
Reviewed-By: Igor Mammedov <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
hw/core/qdev.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 3bdda8e..da1ba48 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -957,7 +957,13 @@ static void device_initfn(Object *obj)
static void device_post_init(Object *obj)
{
- qdev_prop_set_globals(DEVICE(obj), &error_abort);
+ Error *err = NULL;
+ qdev_prop_set_globals(DEVICE(obj), &err);
+ if (err) {
+ qerror_report_err(err);
+ error_free(err);
+ exit(EXIT_FAILURE);
+ }
}
/* Unlink device from bus and free the structure. */
--
MST
- [Qemu-devel] [PULL 01/12] qtest: enable vhost-user-test, (continued)
- [Qemu-devel] [PULL 01/12] qtest: enable vhost-user-test, Michael S. Tsirkin, 2014/07/07
- [Qemu-devel] [PULL 02/12] numa: check for busy memory backend, Michael S. Tsirkin, 2014/07/07
- [Qemu-devel] [PULL 03/12] pc-dimm: error out if memory hotplug is not enabled, Michael S. Tsirkin, 2014/07/07
- [Qemu-devel] [PULL 12/12] qemu-char: add chr_add_watch support in mux chardev, Michael S. Tsirkin, 2014/07/07
- [Qemu-devel] [PULL 10/12] qdev: Fix crash when using non-device class name on -global, Michael S. Tsirkin, 2014/07/07
- [Qemu-devel] [PULL 06/12] pci: assign devfn to pci_dev before calling pci_device_iommu_address_space(), Michael S. Tsirkin, 2014/07/07
- [Qemu-devel] [PULL 08/12] hw/virtio: enable common virtio feature for mmio device, Michael S. Tsirkin, 2014/07/07
- [Qemu-devel] [PULL 07/12] acpi: fix typo in memory hotplug MMIO region name, Michael S. Tsirkin, 2014/07/07
- [Qemu-devel] [PULL 05/12] Handle G_IO_HUP in tcp_chr_read for tcp chardev, Michael S. Tsirkin, 2014/07/07
- [Qemu-devel] [PULL 11/12] virtio-pci: fix MSI memory region use after free, Michael S. Tsirkin, 2014/07/07
- [Qemu-devel] [PULL 09/12] qdev: Don't abort() in case globals can't be set,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL 04/12] virtio: move common virtio properties to bus class device, Michael S. Tsirkin, 2014/07/07
- Re: [Qemu-devel] [PULL 00/12] pc,vhost,virtio fixes, test, Peter Maydell, 2014/07/07