From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NAvTh-0003So-9j for qemu-devel@nongnu.org; Wed, 18 Nov 2009 20:06:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NAvTc-0003Pf-Sm for qemu-devel@nongnu.org; Wed, 18 Nov 2009 20:06:27 -0500 Received: from [199.232.76.173] (port=35044 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAvTc-0003PM-Io for qemu-devel@nongnu.org; Wed, 18 Nov 2009 20:06:24 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35548) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NAvTb-0008Ef-Pd for qemu-devel@nongnu.org; Wed, 18 Nov 2009 20:06:24 -0500 From: Luiz Capitulino Date: Wed, 18 Nov 2009 23:05:35 -0200 Message-Id: <1258592736-10252-13-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1258592736-10252-1-git-send-email-lcapitulino@redhat.com> References: <1258592736-10252-1-git-send-email-lcapitulino@redhat.com> Subject: [Qemu-devel] [PATCH 12/13] QError: Add QERR_KVM_MISSING_CAP List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: aliguori@us.ibm.com, kraxel@redhat.com, armbru@redhat.com New class for KVM unavailable features errors. 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 0c0a510..d8b125e 100644 --- a/qerror.c +++ b/qerror.c @@ -48,6 +48,10 @@ const QErrorStringTable qerror_table[] = { .error_fmt = QERR_DEVICE_NOT_ACTIVE, .desc = "The %(device) device has not been activated by the guest", }, + { + .error_fmt = QERR_KVM_MISSING_CAP, + .desc = "Using KVM without %(capability), %(feature) unavailable", + }, {} }; diff --git a/qerror.h b/qerror.h index c1be8b9..6c100af 100644 --- a/qerror.h +++ b/qerror.h @@ -44,4 +44,7 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_DEVICE_NOT_ACTIVE \ "{ 'class': 'DeviceNotActive', 'data': { 'device': %s } }" +#define QERR_KVM_MISSING_CAP \ + "{ 'class': 'KVMMissingCap', 'data': { 'capability': %s, 'feature': %s } }" + #endif /* QERROR_H */ -- 1.6.5.3.148.g785c5