From patchwork Mon Dec 7 20:36:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 40538 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 3E389B6F1C for ; Tue, 8 Dec 2009 08:17:55 +1100 (EST) Received: from localhost ([127.0.0.1]:59282 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NHkxs-00068D-Bx for incoming@patchwork.ozlabs.org; Mon, 07 Dec 2009 16:17:52 -0500 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) Received: by crossbow.pond.sub.org (Postfix, from userid 500) id A10A220BE1; Mon, 7 Dec 2009 21:37:16 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Mon, 7 Dec 2009 21:36:59 +0100 Message-Id: <1260218236-22143-2-git-send-email-armbru@redhat.com> X-Mailer: git-send-email 1.6.2.5 In-Reply-To: <1260218236-22143-1-git-send-email-armbru@redhat.com> References: <1260218236-22143-1-git-send-email-armbru@redhat.com> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: lcapitulino@redhat.com Subject: [Qemu-devel] [FOR 0.12 PATCH 01/18] QError: new class for device encrypted errors X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 } }"