From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lai Jiangshan Subject: [PATCH 1/2 V9] qemu,qmp: QError: New QERR_UNSUPPORTED Date: Thu, 28 Apr 2011 11:35:24 +0800 Message-ID: <4DB8E07C.7000407@cn.fujitsu.com> 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> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Anthony Liguori , Lai Jiangshan , kvm@vger.kernel.org, qemu-devel@nongnu.org, Markus Armbruster , Avi Kivity To: Luiz Capitulino Return-path: 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 In-Reply-To: <20110427113346.5bd7fcac@doriath> Sender: kvm-owner@vger.kernel.org List-ID: 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 } }" -- 1.7.4