From 63e1ad66650f6d5cec6d62103229fb723e8d98dd Mon Sep 17 00:00:00 2001
Message-Id: <63e1ad66650f6d5cec6d62103229fb723e8d98dd.1350493760.git.minovotn@redhat.com>
In-Reply-To: <c93188b6c6973932d2adaa52e6a4920db13b4e62.1350493760.git.minovotn@redhat.com>
References: <c93188b6c6973932d2adaa52e6a4920db13b4e62.1350493760.git.minovotn@redhat.com>
From: Jeffrey Cody <jcody@redhat.com>
Date: Wed, 17 Oct 2012 05:59:42 +0200
Subject: [PATCH 29/35] qerror: add QERR_INVALID_PARAMETER_COMBINATION

RH-Author: Jeffrey Cody <jcody@redhat.com>
Message-id: <f1bd760f15c46ed31b37d7f809987b219bfa2ba4.1350447475.git.jcody@redhat.com>
Patchwork-id: 43287
O-Subject: [RHEL6.4 qemu-kvm PATCH v4 29/35] qerror: add QERR_INVALID_PARAMETER_COMBINATION
Bugzilla: 767233
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
RH-Acked-by: Eric Blake <eblake@redhat.com>
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>

This error was introduced in upstream commit 727f005.  Rather than
backport that entire commit, this patch simply adds that error type.

Signed-off-by: Jeff Cody <jcody@redhat.com>
---
 qerror.c | 4 ++++
 qerror.h | 3 +++
 2 files changed, 7 insertions(+)

Signed-off-by: Michal Novotny <minovotn@redhat.com>
---
 qerror.c | 4 ++++
 qerror.h | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/qerror.c b/qerror.c
index 4d39339..ae13998 100644
--- a/qerror.c
+++ b/qerror.c
@@ -149,6 +149,10 @@ static const QErrorStringTable qerror_table[] = {
         .desc      = "Invalid parameter type, expected: %(expected)",
     },
     {
+        .error_fmt = QERR_INVALID_PARAMETER_COMBINATION,
+        .desc      = "Invalid parameter combination",
+    },
+    {
         .error_fmt = QERR_INVALID_PARAMETER_VALUE,
         .desc      = "Parameter '%(name)' expects %(expected)",
     },
diff --git a/qerror.h b/qerror.h
index e4bf670..a12da27 100644
--- a/qerror.h
+++ b/qerror.h
@@ -127,6 +127,9 @@ QError *qobject_to_qerror(const QObject *obj);
 #define QERR_INVALID_PARAMETER \
     "{ 'class': 'InvalidParameter', 'data': { 'name': %s } }"
 
+#define QERR_INVALID_PARAMETER_COMBINATION \
+    "{ 'class': 'InvalidParameterCombination', 'data': {} }"
+
 #define QERR_INVALID_PARAMETER_TYPE \
     "{ 'class': 'InvalidParameterType', 'data': { 'name': %s,'expected': %s } }"
 
-- 
1.7.11.7

