[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC PATCH v1 19/25] qdev: Update error API usages
From: |
Peter Crosthwaite |
Subject: |
[Qemu-devel] [RFC PATCH v1 19/25] qdev: Update error API usages |
Date: |
Thu, 10 Sep 2015 22:33:29 -0700 |
Use error_prefix() and error_report_err() as appropriate.
Signed-off-by: Peter Crosthwaite <address@hidden>
---
hw/core/qdev-properties.c | 7 +++----
hw/core/qdev.c | 6 +++---
2 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c
index 04fd80a..6494185 100644
--- a/hw/core/qdev-properties.c
+++ b/hw/core/qdev-properties.c
@@ -1065,10 +1065,9 @@ static void qdev_prop_set_globals_for_type(DeviceState
*dev,
object_property_parse(OBJECT(dev), prop->value, prop->property, &err);
if (err != NULL) {
assert(prop->user_provided);
- error_report("Warning: global %s.%s=%s ignored (%s)",
- prop->driver, prop->property, prop->value,
- error_get_pretty(err));
- error_free(err);
+ error_prefix(err, "Warning: global %s.%s=%s ignored (%s)",
+ prop->driver, prop->property, prop->value);
+ error_report_err(err);
return;
}
}
diff --git a/hw/core/qdev.c b/hw/core/qdev.c
index 52140ba..708f5fd 100644
--- a/hw/core/qdev.c
+++ b/hw/core/qdev.c
@@ -365,9 +365,9 @@ void qdev_init_nofail(DeviceState *dev)
object_property_set_bool(OBJECT(dev), true, "realized", &err);
if (err) {
- error_report("Initialization of device %s failed: %s",
- object_get_typename(OBJECT(dev)),
- error_get_pretty(err));
+ error_prefix(err, "Initialization of device %s failed: ",
+ object_get_typename(OBJECT(dev)));
+ error_report_err(err);
exit(1);
}
}
--
1.9.1
- [Qemu-devel] [RFC PATCH v1 09/25] qdev: gpio: Ignore unconnectable GPIOs, (continued)
- [Qemu-devel] [RFC PATCH v1 09/25] qdev: gpio: Ignore unconnectable GPIOs, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 10/25] arm: xlnx-zynqmp: Update error API usages, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 12/25] arm: netduino: Update error API usages, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 11/25] arm: fsl-imx*: Update error API usages, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 13/25] arm: allwinner: Update error API usages, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 14/25] arm: digic: Update error API usages, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 15/25] cpu: arm: Remove un-needed error checking, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 16/25] ppc: Update error API usages, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 17/25] i386: pc: Update error API usages, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 18/25] monitor: update error API usages, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 19/25] qdev: Update error API usages,
Peter Crosthwaite <=
- [Qemu-devel] [RFC PATCH v1 20/25] block: Update error API usages, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 21/25] tests: Update error API usages, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 22/25] usb: bus: Update error API usages, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 23/25] scsi: Update error API usages, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 24/25] migration: savevm: Update error API usages, Peter Crosthwaite, 2015/09/11
- [Qemu-devel] [RFC PATCH v1 25/25] core: Update error API usages, Peter Crosthwaite, 2015/09/11
- Re: [Qemu-devel] [RFC PATCH v1 00/25] error: Automatic error concatenation and prefixing, Markus Armbruster, 2015/09/11
- Re: [Qemu-devel] [RFC PATCH v1 00/25] error: Automatic error concatenation and prefixing, Eric Blake, 2015/09/11