From patchwork Thu Mar 25 16:22:30 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 48538 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 D971BB7CED for ; Fri, 26 Mar 2010 03:44:09 +1100 (EST) Received: from localhost ([127.0.0.1]:57292 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuqAA-0006gD-VX for incoming@patchwork.ozlabs.org; Thu, 25 Mar 2010 12:44:06 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Nuppl-0005kJ-Dp for qemu-devel@nongnu.org; Thu, 25 Mar 2010 12:23:01 -0400 Received: from [140.186.70.92] (port=35992 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NuppZ-0005Yt-UL for qemu-devel@nongnu.org; Thu, 25 Mar 2010 12:22:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1NuppT-0001EW-VQ for qemu-devel@nongnu.org; Thu, 25 Mar 2010 12:22:49 -0400 Received: from oxygen.pond.sub.org ([213.239.205.148]:52301) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NuppT-0001D9-ML for qemu-devel@nongnu.org; Thu, 25 Mar 2010 12:22:43 -0400 Received: from blackfin.pond.sub.org (pD9E38AC7.dip.t-dialin.net [217.227.138.199]) by oxygen.pond.sub.org (Postfix) with ESMTPA id 6A6F9276DA7 for ; Thu, 25 Mar 2010 17:22:41 +0100 (CET) Received: by blackfin.pond.sub.org (Postfix, from userid 500) id B996BE2; Thu, 25 Mar 2010 17:22:40 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Date: Thu, 25 Mar 2010 17:22:30 +0100 Message-Id: <1269534160-4550-2-git-send-email-armbru@redhat.com> X-Mailer: git-send-email 1.6.6.1 In-Reply-To: <1269534160-4550-1-git-send-email-armbru@redhat.com> References: <1269534160-4550-1-git-send-email-armbru@redhat.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) Cc: lcapitulino@redhat.com Subject: [Qemu-devel] [PATCH v3 01/11] 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 Add suitable comments to help keerp them in order. Signed-off-by: Markus Armbruster --- 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 } }"