From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=35044 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PR0gt-0000ir-PK for qemu-devel@nongnu.org; Fri, 10 Dec 2010 05:59:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PR0gs-0005rn-3U for qemu-devel@nongnu.org; Fri, 10 Dec 2010 05:59:07 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10065) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PR0gr-0005rh-Rj for qemu-devel@nongnu.org; Fri, 10 Dec 2010 05:59:06 -0500 Date: Fri, 10 Dec 2010 08:58:58 -0200 From: Luiz Capitulino Message-ID: <20101210085858.38768d17@doriath> In-Reply-To: <4D01CA51.4060603@cn.fujitsu.com> References: <4D01CA51.4060603@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH v2 1/2] QError: new QERR_INVALID_CPU_INDEX List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lai Jiangshan Cc: "qemu-devel@nongnu.org" , "kvm@vger.kernel.org" On Fri, 10 Dec 2010 14:36:01 +0800 Lai Jiangshan wrote: > > Signed-off-by: Lai Jiangshan As Markus said, we report this as an invalid parameter in do_cpu(), we can do the same for inject-nmi. > --- > diff --git a/qerror.c b/qerror.c > index ac2cdaf..f59fb58 100644 > --- a/qerror.c > +++ b/qerror.c > @@ -117,6 +117,10 @@ static const QErrorStringTable qerror_table[] = { > .desc = "Invalid block format '%(name)'", > }, > { > + .error_fmt = QERR_INVALID_CPU_INDEX, > + .desc = "Invalid CPU index '%(cpu_index)'", > + }, > + { > .error_fmt = QERR_INVALID_PARAMETER, > .desc = "Invalid parameter '%(name)'", > }, > diff --git a/qerror.h b/qerror.h > index 943a24b..9117dda 100644 > --- a/qerror.h > +++ b/qerror.h > @@ -102,6 +102,9 @@ QError *qobject_to_qerror(const QObject *obj); > #define QERR_INVALID_BLOCK_FORMAT \ > "{ 'class': 'InvalidBlockFormat', 'data': { 'name': %s } }" > > +#define QERR_INVALID_CPU_INDEX \ > + "{ 'class': 'InvalidCPUIndex', 'data': { 'cpu_index': %d } }" > + > #define QERR_INVALID_PARAMETER \ > "{ 'class': 'InvalidParameter', 'data': { 'name': %s } }" > >