From: Peter Crosthwaite <crosthwaitepeter@gmail.com>
To: qemu-devel@nongnu.org
Cc: peter.maydell@linaro.org, armbru@redhat.com
Subject: [Qemu-devel] [RFC PATCH v1 19/25] qdev: Update error API usages
Date: Thu, 10 Sep 2015 22:33:29 -0700 [thread overview]
Message-ID: <3818ffba8f89d85f21ca8ce8b83a3281d578db06.1441667360.git.crosthwaite.peter@gmail.com> (raw)
In-Reply-To: <cover.1441667360.git.crosthwaite.peter@gmail.com>
Use error_prefix() and error_report_err() as appropriate.
Signed-off-by: Peter Crosthwaite <crosthwaite.peter@gmail.com>
---
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
next prev parent reply other threads:[~2015-09-11 5:34 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 5:33 [Qemu-devel] [RFC PATCH v1 00/25] error: Automatic error concatenation and prefixing Peter Crosthwaite
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 01/25] exec: convert error_report to error_report_err Peter Crosthwaite
2015-09-11 15:28 ` Eric Blake
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 02/25] s390x: virtio-ccw: Remove un-needed if guard Peter Crosthwaite
2015-09-11 15:28 ` Eric Blake
2015-09-14 7:09 ` Cornelia Huck
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 03/25] error: Factor out common error setter logic Peter Crosthwaite
2015-09-11 15:30 ` Eric Blake
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 04/25] error: Add support for multiple errors Peter Crosthwaite
2015-09-11 15:49 ` Eric Blake
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 05/25] error: Add error prefix API Peter Crosthwaite
2015-09-11 16:04 ` Eric Blake
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 06/25] error: Add error_printf_fn() Peter Crosthwaite
2015-09-11 16:10 ` Eric Blake
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 07/25] sysbus: mmio_map+mmio_get_region: ignore range OOB errors Peter Crosthwaite
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 08/25] memory: nop APIs when they have NULL arguments Peter Crosthwaite
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 09/25] qdev: gpio: Ignore unconnectable GPIOs Peter Crosthwaite
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 10/25] arm: xlnx-zynqmp: Update error API usages Peter Crosthwaite
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 11/25] arm: fsl-imx*: " Peter Crosthwaite
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 12/25] arm: netduino: " Peter Crosthwaite
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 13/25] arm: allwinner: " Peter Crosthwaite
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 14/25] arm: digic: " Peter Crosthwaite
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 15/25] cpu: arm: Remove un-needed error checking Peter Crosthwaite
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 16/25] ppc: Update error API usages Peter Crosthwaite
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 17/25] i386: pc: " Peter Crosthwaite
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 18/25] monitor: update " Peter Crosthwaite
2015-09-11 5:33 ` Peter Crosthwaite [this message]
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 20/25] block: Update " Peter Crosthwaite
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 21/25] tests: " Peter Crosthwaite
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 22/25] usb: bus: " Peter Crosthwaite
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 23/25] scsi: " Peter Crosthwaite
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 24/25] migration: savevm: " Peter Crosthwaite
2015-09-11 5:33 ` [Qemu-devel] [RFC PATCH v1 25/25] core: " Peter Crosthwaite
2015-09-11 6:42 ` [Qemu-devel] [RFC PATCH v1 00/25] error: Automatic error concatenation and prefixing Markus Armbruster
2015-09-11 15:53 ` Eric Blake
2015-09-11 15:27 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3818ffba8f89d85f21ca8ce8b83a3281d578db06.1441667360.git.crosthwaite.peter@gmail.com \
--to=crosthwaitepeter@gmail.com \
--cc=armbru@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).