From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>,
Anthony Liguori <aliguori@us.ibm.com>,
patches@linaro.org
Subject: [Qemu-devel] [PATCH v4 0/2] qdev: Detect duplicate device properties
Date: Thu, 25 Oct 2012 16:22:27 +0100 [thread overview]
Message-ID: <1351178549-5699-1-git-send-email-peter.maydell@linaro.org> (raw)
So, v4 takes a different approach (again). The QOM level patch
should be pretty uncontroversial, it just reports the duplicate
via the Error**. Then in the qdev device_initfn we check for and
report errors via assert_no_error() rather than just throwing
them away. (In an ideal world maybe there'd be a way for the
initfn to report the error up yet another level, but not with
the current qdev API.)
This time for sure!
(I have a theory that passing NULL as an Error** is almost never
a good idea. It's a shame it's the path of least resistance for
using the API, it would be much better if the wrong thing was
the hard thing to do.)
Peter Maydell (2):
qom: Detect attempts to add a property that already exists
hw/qdev: Abort rather than ignoring errors adding device properties
hw/qdev.c | 10 +++++++---
qom/object.c | 13 ++++++++++++-
2 files changed, 19 insertions(+), 4 deletions(-)
--
1.7.9.5
next reply other threads:[~2012-10-25 15:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-25 15:22 Peter Maydell [this message]
2012-10-25 15:22 ` [Qemu-devel] [PATCH v4 1/2] qom: Detect attempts to add a property that already exists Peter Maydell
2012-10-25 17:27 ` Markus Armbruster
2012-10-25 17:35 ` Peter Maydell
2012-10-25 18:39 ` Anthony Liguori
2012-10-25 15:22 ` [Qemu-devel] [PATCH v4 2/2] hw/qdev: Abort rather than ignoring errors adding device properties Peter Maydell
2012-10-25 18:39 ` Anthony Liguori
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=1351178549-5699-1-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=aliguori@us.ibm.com \
--cc=patches@linaro.org \
--cc=pbonzini@redhat.com \
--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).