Received: from eggs.gnu.org ([140.186.70.92]:51109) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRwGK-0003ZC-KA for qemu-devel@nongnu.org; Wed, 01 Jun 2011 20:59:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRwGH-0002gI-6H for qemu-devel@nongnu.org; Wed, 01 Jun 2011 20:59:48 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRnkY-00070A-MA for qemu-devel@nongnu.org; Wed, 01 Jun 2011 11:54:26 -0400 From: Luiz Capitulino Date: Wed, 1 Jun 2011 12:54:01 -0300 Message-Id: <1306943645-20313-2-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1306943645-20313-1-git-send-email-lcapitulino@redhat.com> References: <1306943645-20313-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 1/5] QMP: QError: New QERR_UNSUPPORTED List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: aliguori@us.ibm.com Cc: Lai Jiangshan , qemu-devel@nongnu.org, armbru@redhat.com From: Lai Jiangshan New QERR_UNSUPPORTED for unsupported commands or requests. 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 4855604..4f3b7ca 100644 --- a/qerror.c +++ b/qerror.c @@ -201,6 +201,10 @@ static const QErrorStringTable qerror_table[] = { .desc = "An undefined error has ocurred", }, { + .error_fmt = QERR_UNSUPPORTED, + .desc = "this feature or command is not currently supported", + }, + { .error_fmt = QERR_UNKNOWN_BLOCK_FORMAT_FEATURE, .desc = "'%(device)' uses a %(format) feature which is not " "supported by this qemu version: %(feature)", diff --git a/qerror.h b/qerror.h index df61d2c..582b5ef 100644 --- a/qerror.h +++ b/qerror.h @@ -165,6 +165,9 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_UNDEFINED_ERROR \ "{ 'class': 'UndefinedError', 'data': {} }" +#define QERR_UNSUPPORTED \ + "{ 'class': 'Unsupported', 'data': {} }" + #define QERR_UNKNOWN_BLOCK_FORMAT_FEATURE \ "{ 'class': 'UnknownBlockFormatFeature', 'data': { 'device': %s, 'format': %s, 'feature': %s } }" -- 1.7.4.4