[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[qemu-s390x] [PATCH v1 8/8] s390x: local error handling in hotplug handl
From: |
David Hildenbrand |
Subject: |
[qemu-s390x] [PATCH v1 8/8] s390x: local error handling in hotplug handler functions |
Date: |
Thu, 7 Jun 2018 18:52:18 +0200 |
Let's introduce and use local error variables in the hotplug handler
functions.
Signed-off-by: David Hildenbrand <address@hidden>
---
hw/s390x/s390-virtio-ccw.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
index 7ae5fb38dd..29ea50a177 100644
--- a/hw/s390x/s390-virtio-ccw.c
+++ b/hw/s390x/s390-virtio-ccw.c
@@ -434,18 +434,23 @@ static void s390_machine_reset(void)
static void s390_machine_device_plug(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
+ Error *local_err = NULL;
+
if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) {
- s390_cpu_plug(hotplug_dev, dev, errp);
+ s390_cpu_plug(hotplug_dev, dev, &local_err);
}
+ error_propagate(errp, local_err);
}
static void s390_machine_device_unplug_request(HotplugHandler *hotplug_dev,
DeviceState *dev, Error **errp)
{
+ Error *local_err = NULL;
+
if (object_dynamic_cast(OBJECT(dev), TYPE_CPU)) {
- error_setg(errp, "CPU hot unplug not supported on this machine");
- return;
+ error_setg(&local_err, "CPU hot unplug not supported on this machine");
}
+ error_propagate(errp, local_err);
}
static CpuInstanceProperties s390_cpu_index_to_props(MachineState *ms,
--
2.17.0
- Re: [qemu-s390x] [PATCH v1 6/8] spapr: handle pc-dimm unplug via hotplug handler chain, (continued)
Re: [qemu-s390x] [PATCH v1 6/8] spapr: handle pc-dimm unplug via hotplug handler chain, Greg Kurz, 2018/06/08
[qemu-s390x] [PATCH v1 7/8] spapr: handle cpu core unplug via hotplug handler chain, David Hildenbrand, 2018/06/07
[qemu-s390x] [PATCH v1 8/8] s390x: local error handling in hotplug handler functions,
David Hildenbrand <=
- Re: [qemu-s390x] [PATCH v1 8/8] s390x: local error handling in hotplug handler functions, Cornelia Huck, 2018/06/08
- Re: [qemu-s390x] [PATCH v1 8/8] s390x: local error handling in hotplug handler functions, Christian Borntraeger, 2018/06/08
- Re: [qemu-s390x] [PATCH v1 8/8] s390x: local error handling in hotplug handler functions, David Hildenbrand, 2018/06/08
- Re: [qemu-s390x] [PATCH v1 8/8] s390x: local error handling in hotplug handler functions, Christian Borntraeger, 2018/06/08
- Re: [qemu-s390x] [Qemu-devel] [PATCH v1 8/8] s390x: local error handling in hotplug handler functions, Igor Mammedov, 2018/06/08
- Re: [qemu-s390x] [Qemu-devel] [PATCH v1 8/8] s390x: local error handling in hotplug handler functions, David Hildenbrand, 2018/06/08
Re: [qemu-s390x] [PATCH v1 0/8] pc/spapr/s390x: machine hotplug handler cleanups, David Hildenbrand, 2018/06/08