qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 0/2] qom: detect attempts to add a property that alr


From: Peter Maydell
Subject: [Qemu-devel] [PATCH 0/2] qom: detect attempts to add a property that already exists
Date: Fri, 19 Oct 2012 18:19:04 +0100

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]