All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] qom: detect attempts to add a property that already exists
@ 2012-10-19 17:19 Peter Maydell
  2012-10-19 17:19 ` [Qemu-devel] [PATCH 1/2] error: Distinguish critical and non-critical errors Peter Maydell
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Peter Maydell @ 2012-10-19 17:19 UTC (permalink / raw)
  To: qemu-devel; +Cc: Paolo Bonzini, Anthony Liguori, patches

The aim of this patch series is to make QEMU exit with a helpful
error message for bugs where multiple properties of the same name
are accidentally added to a QOM object. In order to achieve this
for static properties whilst still allowing the hotplug case
to gracefully fail without killing QEMU, we add the concept
of a 'critical' error. A critical error is one which must be
handled somehow -- if we encounter a NULL Error** either when
the error is raised or later when it is propagated, we will
abort() rather than throwing the error away.

(This is a bit different from the idea we initially discussed on
IRC, which was to have an error_propagate_or_abort() function,
but that approach would mean that the error would get thrown
away by intermediate functions such as qdev_property_add_static()
unless all those functions were changed too. I think this way
is more reliable.)

Peter Maydell (2):
  error: Distinguish critical and non-critical errors
  qom: Detect attempts to add a property that already exists

 error.c      |   38 ++++++++++++++++++++++++++++++++++----
 error.h      |   12 ++++++++++++
 qom/object.c |   13 ++++++++++++-
 3 files changed, 58 insertions(+), 5 deletions(-)

-- 
1.7.9.5

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-10-22 16:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-19 17:19 [Qemu-devel] [PATCH 0/2] qom: detect attempts to add a property that already exists Peter Maydell
2012-10-19 17:19 ` [Qemu-devel] [PATCH 1/2] error: Distinguish critical and non-critical errors Peter Maydell
2012-10-19 17:19 ` [Qemu-devel] [PATCH 2/2] qom: Detect attempts to add a property that already exists Peter Maydell
2012-10-22 15:35 ` [Qemu-devel] [PATCH 0/2] qom: detect " Luiz Capitulino
2012-10-22 16:26   ` Peter Maydell
2012-10-22 16:51     ` Luiz Capitulino

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.