Received: from [140.186.70.92] (port=55806 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJiT4-0002Fg-H0 for qemu-devel@nongnu.org; Wed, 02 Jun 2010 03:34:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJiT3-00062q-DQ for qemu-devel@nongnu.org; Wed, 02 Jun 2010 03:34:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:16481) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJiT3-00062Y-3c for qemu-devel@nongnu.org; Wed, 02 Jun 2010 03:34:25 -0400 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH 7/9] QError: Introduce QERR_QMP_BAD_INPUT_OBJECT_MEMBER References: <1275424897-32253-1-git-send-email-lcapitulino@redhat.com> <1275424897-32253-8-git-send-email-lcapitulino@redhat.com> Date: Wed, 02 Jun 2010 09:34:23 +0200 In-Reply-To: <1275424897-32253-8-git-send-email-lcapitulino@redhat.com> (Luiz Capitulino's message of "Tue, 1 Jun 2010 17:41:35 -0300") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Luiz Capitulino Cc: jan.kiszka@siemens.com, qemu-devel@nongnu.org Luiz Capitulino writes: > Signed-off-by: Luiz Capitulino > --- > qerror.c | 4 ++++ > qerror.h | 3 +++ > 2 files changed, 7 insertions(+), 0 deletions(-) > > diff --git a/qerror.c b/qerror.c > index 44d0bf8..b26224e 100644 > --- a/qerror.c > +++ b/qerror.c > @@ -177,6 +177,10 @@ static const QErrorStringTable qerror_table[] = { > .desc = "QMP input object member '%(member)' expects '%(expected)'", > }, > { > + .error_fmt = QERR_QMP_INVALID_INPUT_OBJECT_MEMBER, > + .desc = "QMP input object member '%(member)' is invalid", > + }, > + { "is invalid" can mean pretty much anything. Let's call it "is unexpected". Update item 2. in qmp_check_client_args()'s function comment, too. > .error_fmt = QERR_SET_PASSWD_FAILED, > .desc = "Could not set password", > }, > diff --git a/qerror.h b/qerror.h > index 77ae574..eec9949 100644 > --- a/qerror.h > +++ b/qerror.h > @@ -148,6 +148,9 @@ QError *qobject_to_qerror(const QObject *obj); > #define QERR_QMP_BAD_INPUT_OBJECT_MEMBER \ > "{ 'class': 'QMPBadInputObjectMember', 'data': { 'member': %s, 'expected': %s } }" > > +#define QERR_QMP_INVALID_INPUT_OBJECT_MEMBER \ > + "{ 'class': 'QMPInvalidInputObjectMember', 'data': { 'member': %s } }" > + > #define QERR_SET_PASSWD_FAILED \ > "{ 'class': 'SetPasswdFailed', 'data': {} }"