From patchwork Mon Apr 5 20:33:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 49456 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 CDFB2B7CFA for ; Tue, 6 Apr 2010 08:09:17 +1000 (EST) Received: from localhost ([127.0.0.1]:53095 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nyt5a-0002Ok-CS for incoming@patchwork.ozlabs.org; Mon, 05 Apr 2010 16:40:06 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nyt0h-0001Yt-Co for qemu-devel@nongnu.org; Mon, 05 Apr 2010 16:35:03 -0400 Received: from [140.186.70.92] (port=49433 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Nyt0a-0001WK-FB for qemu-devel@nongnu.org; Mon, 05 Apr 2010 16:35:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Nyt02-0001at-KY for qemu-devel@nongnu.org; Mon, 05 Apr 2010 16:34:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:2761) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Nyt02-0001aj-Cx for qemu-devel@nongnu.org; Mon, 05 Apr 2010 16:34:22 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o35KYL62031534 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 5 Apr 2010 16:34:21 -0400 Received: from localhost (vpn-8-191.rdu.redhat.com [10.11.8.191]) by int-mx04.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o35KYKU6025627; Mon, 5 Apr 2010 16:34:21 -0400 From: Luiz Capitulino To: aliguori@us.ibm.com Date: Mon, 5 Apr 2010 17:33:45 -0300 Message-Id: <1270499642-31543-5-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1270499642-31543-1-git-send-email-lcapitulino@redhat.com> References: <1270499642-31543-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.17 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: Luiz Capitulino , qemu-devel@nongnu.org, Markus Armbruster Subject: [Qemu-devel] [PATCH 04/21] error: Put error definitions back in alphabetical order 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: Markus Armbruster Add suitable comments to help keerp them in order. Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- qerror.c | 12 ++++++++---- qerror.h | 8 +++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/qerror.c b/qerror.c index eaa1deb..4520b0d 100644 --- a/qerror.c +++ b/qerror.c @@ -38,6 +38,10 @@ static const QType qerror_type = { * for example: * * "running out of foo: %(foo)%%" + * + * Please keep the entries in alphabetical order. + * Use "sed -n '/^static.*qerror_table\[\]/,/^};/s/QERR_/&/gp' qerror.c | sort -c" + * to check. */ static const QErrorStringTable qerror_table[] = { { @@ -65,10 +69,6 @@ static const QErrorStringTable qerror_table[] = { .desc = "Device '%(device)' could not be initialized", }, { - .error_fmt = QERR_DEVICE_NOT_ENCRYPTED, - .desc = "Device '%(device)' is not encrypted", - }, - { .error_fmt = QERR_DEVICE_LOCKED, .desc = "Device '%(device)' is locked", }, @@ -81,6 +81,10 @@ static const QErrorStringTable qerror_table[] = { .desc = "Device '%(device)' has not been activated by the guest", }, { + .error_fmt = QERR_DEVICE_NOT_ENCRYPTED, + .desc = "Device '%(device)' is not encrypted", + }, + { .error_fmt = QERR_DEVICE_NOT_FOUND, .desc = "Device '%(device)' not found", }, diff --git a/qerror.h b/qerror.h index dd298d4..a2664ab 100644 --- a/qerror.h +++ b/qerror.h @@ -46,6 +46,8 @@ QError *qobject_to_qerror(const QObject *obj); /* * QError class list + * Please keep the definitions in alphabetical order. + * Use "grep '^#define QERR_' qerror.h | sort -c" to check. */ #define QERR_BAD_BUS_FOR_DEVICE \ "{ 'class': 'BadBusForDevice', 'data': { 'device': %s, 'bad_bus_type': %s } }" @@ -62,9 +64,6 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_DEVICE_ENCRYPTED \ "{ 'class': 'DeviceEncrypted', 'data': { 'device': %s } }" -#define QERR_DEVICE_NOT_ENCRYPTED \ - "{ 'class': 'DeviceNotEncrypted', 'data': { 'device': %s } }" - #define QERR_DEVICE_INIT_FAILED \ "{ 'class': 'DeviceInitFailed', 'data': { 'device': %s } }" @@ -77,6 +76,9 @@ QError *qobject_to_qerror(const QObject *obj); #define QERR_DEVICE_NOT_ACTIVE \ "{ 'class': 'DeviceNotActive', 'data': { 'device': %s } }" +#define QERR_DEVICE_NOT_ENCRYPTED \ + "{ 'class': 'DeviceNotEncrypted', 'data': { 'device': %s } }" + #define QERR_DEVICE_NOT_FOUND \ "{ 'class': 'DeviceNotFound', 'data': { 'device': %s } }"