Patchwork [RFC,28/48] error: New QERR_PROPERTY_VALUE_BAD

login
register
mail settings
Submitter Markus Armbruster
Date Feb. 24, 2010, 5:55 p.m.
Message ID <1267034160-3517-29-git-send-email-armbru@redhat.com>
Download mbox | patch
Permalink /patch/46150/
State New
Headers show

Comments

Markus Armbruster - Feb. 24, 2010, 5:55 p.m.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qerror.c |    4 ++++
 qerror.h |    3 +++
 2 files changed, 7 insertions(+), 0 deletions(-)

Patch

diff --git a/qerror.c b/qerror.c
index e555c33..ea3971e 100644
--- a/qerror.c
+++ b/qerror.c
@@ -109,6 +109,10 @@  static const QErrorStringTable qerror_table[] = {
         .desc      = "Property '%(device).%(property)' not found",
     },
     {
+        .error_fmt = QERR_PROPERTY_VALUE_BAD,
+        .desc      = "Property '%(device).%(property)' doesn't take value '%(value)'",
+    },
+    {
         .error_fmt = QERR_QMP_BAD_INPUT_OBJECT,
         .desc      = "Bad QMP input object",
     },
diff --git a/qerror.h b/qerror.h
index e36336e..d5f0e9d 100644
--- a/qerror.h
+++ b/qerror.h
@@ -93,6 +93,9 @@  QError *qobject_to_qerror(const QObject *obj);
 #define QERR_PROPERTY_NOT_FOUND \
     "{ 'class': 'PropertyNotFound', 'data': { 'device': %s, 'property': %s } }"
 
+#define QERR_PROPERTY_VALUE_BAD \
+    "{ 'class': 'PropertyValueBad', 'data': { 'device': %s, 'property': %s, 'value': %s } }"
+
 #define QERR_QMP_BAD_INPUT_OBJECT \
     "{ 'class': 'QMPBadInputObject', 'data': { 'expected': %s } }"