From patchwork Thu Apr 28 03:35:24 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lai Jiangshan X-Patchwork-Id: 738261 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p3S3WwGs021672 for ; Thu, 28 Apr 2011 03:32:58 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756673Ab1D1Dcx (ORCPT ); Wed, 27 Apr 2011 23:32:53 -0400 Received: from cn.fujitsu.com ([222.73.24.84]:64272 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1754578Ab1D1Dcm (ORCPT ); Wed, 27 Apr 2011 23:32:42 -0400 Received: from tang.cn.fujitsu.com (tang.cn.fujitsu.com [10.167.250.3]) by song.cn.fujitsu.com (Postfix) with ESMTP id ABF7017012B; Thu, 28 Apr 2011 11:32:40 +0800 (CST) Received: from mailserver.fnst.cn.fujitsu.com (tang.cn.fujitsu.com [127.0.0.1]) by tang.cn.fujitsu.com (8.14.3/8.13.1) with ESMTP id p3S3WerH026778; Thu, 28 Apr 2011 11:32:40 +0800 Received: from lai.fc14.fnst ([10.167.225.146]) by mailserver.fnst.cn.fujitsu.com (Lotus Domino Release 8.5.1FP4) with ESMTP id 2011042811330744-168541 ; Thu, 28 Apr 2011 11:33:07 +0800 Message-ID: <4DB8E07C.7000407@cn.fujitsu.com> Date: Thu, 28 Apr 2011 11:35:24 +0800 From: Lai Jiangshan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc14 Thunderbird/3.1.4 MIME-Version: 1.0 To: Luiz Capitulino CC: Anthony Liguori , Lai Jiangshan , kvm@vger.kernel.org, qemu-devel@nongnu.org, Markus Armbruster , Avi Kivity Subject: [PATCH 1/2 V9] qemu,qmp: QError: New QERR_UNSUPPORTED References: <4D74A8C9.2020408@cn.fujitsu.com> <4D74A974.6090509@cn.fujitsu.com> <20110404105949.GA30324@redhat.com> <4D99BF99.1040305@redhat.com> <4D99C22C.4070401@codemonkey.ws> <20110406144723.45333682@doriath> <4D9CAAF9.7000509@codemonkey.ws> <20110406150818.56707b9b@doriath> <4DAE7AF4.3050508@cn.fujitsu.com> <4DAFA34A.3030701@cn.fujitsu.com> <20110426102641.71a60d81@doriath> <4DB6C8CB.7030706@codemonkey.ws> <4DB7775A.1010608@cn.fujitsu.com> <20110427113346.5bd7fcac@doriath> In-Reply-To: <20110427113346.5bd7fcac@doriath> X-MIMETrack: Itemize by SMTP Server on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2011-04-28 11:33:07, Serialize by Router on mailserver/fnst(Release 8.5.1FP4|July 25, 2010) at 2011-04-28 11:33:07, Serialize complete at 2011-04-28 11:33:07 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Thu, 28 Apr 2011 03:32:58 +0000 (UTC) New QERR_UNSUPPORTED for unsupported commands or requests. Signed-off-by: Lai Jiangshan --- qerror.c | 4 ++++ qerror.h | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 4855604..f905887 100644 --- a/qerror.c +++ b/qerror.c @@ -206,6 +206,10 @@ static const QErrorStringTable qerror_table[] = { "supported by this qemu version: %(feature)", }, { + .error_fmt = QERR_UNSUPPORTED, + .desc = "Unsupported: %(detail)", + }, + { .error_fmt = QERR_VNC_SERVER_FAILED, .desc = "Could not start VNC server on %(target)", }, diff --git a/qerror.h b/qerror.h index df61d2c..b3455ce 100644 --- a/qerror.h +++ b/qerror.h @@ -168,6 +168,9 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_UNKNOWN_BLOCK_FORMAT_FEATURE \ "{ 'class': 'UnknownBlockFormatFeature', 'data': { 'device': %s, 'format': %s, 'feature': %s } }" +#define QERR_UNSUPPORTED \ + "{ 'class': 'Unsupported', 'data': { 'detail': %s } }" + #define QERR_VNC_SERVER_FAILED \ "{ 'class': 'VNCServerFailed', 'data': { 'target': %s } }"