From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NHkKy-00034Z-Aa for qemu-devel@nongnu.org; Mon, 07 Dec 2009 15:37:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NHkKn-0002yI-0W for qemu-devel@nongnu.org; Mon, 07 Dec 2009 15:37:33 -0500 Received: from [199.232.76.173] (port=46528 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHkKm-0002yC-Pi for qemu-devel@nongnu.org; Mon, 07 Dec 2009 15:37:28 -0500 Received: from oxygen.pond.sub.org ([213.239.205.148]:47586) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NHkKl-0001Su-Sv for qemu-devel@nongnu.org; Mon, 07 Dec 2009 15:37:28 -0500 Received: from crossbow.pond.sub.org (pD9E38C82.dip.t-dialin.net [217.227.140.130]) by oxygen.pond.sub.org (Postfix) with ESMTPA id 1D9E4276D60 for ; Mon, 7 Dec 2009 21:37:22 +0100 (CET) From: Markus Armbruster Date: Mon, 7 Dec 2009 21:36:59 +0100 Message-Id: <1260218236-22143-2-git-send-email-armbru@redhat.com> In-Reply-To: <1260218236-22143-1-git-send-email-armbru@redhat.com> References: <1260218236-22143-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [FOR 0.12 PATCH 01/18] QError: new class for device encrypted errors List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: lcapitulino@redhat.com From: Luiz Capitulino Signed-off-by: Luiz Capitulino Signed-off-by: Markus Armbruster --- qerror.c | 4 ++++ qerror.h | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index eb4ce33..d90529c 100644 --- a/qerror.c +++ b/qerror.c @@ -45,6 +45,10 @@ static const QErrorStringTable qerror_table[] = { .desc = "The command %(name) has not been found", }, { + .error_fmt = QERR_DEVICE_ENCRYPTED, + .desc = "The %(device) is encrypted", + }, + { .error_fmt = QERR_DEVICE_NOT_FOUND, .desc = "The %(device) device has not been found", }, diff --git a/qerror.h b/qerror.h index 5198adf..c9fcf97 100644 --- a/qerror.h +++ b/qerror.h @@ -41,6 +41,9 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_COMMAND_NOT_FOUND \ "{ 'class': 'CommandNotFound', 'data': { 'name': %s } }" +#define QERR_DEVICE_ENCRYPTED \ + "{ 'class': 'DeviceEncrypted', 'data': { 'device': %s } }" + #define QERR_DEVICE_NOT_FOUND \ "{ 'class': 'DeviceNotFound', 'data': { 'device': %s } }" -- 1.6.2.5