From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NsIf6-0008S4-Ay for qemu-devel@nongnu.org; Thu, 18 Mar 2010 12:33:32 -0400 Received: from [199.232.76.173] (port=40353 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NsIf4-0008Pn-8W for qemu-devel@nongnu.org; Thu, 18 Mar 2010 12:33:30 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NsIew-0005Lx-Mu for qemu-devel@nongnu.org; Thu, 18 Mar 2010 12:33:29 -0400 Received: from oxygen.pond.sub.org ([213.239.205.148]:56557) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NsIew-0005Lk-4g for qemu-devel@nongnu.org; Thu, 18 Mar 2010 12:33:22 -0400 Received: from blackfin.pond.sub.org (pD9E3ACC8.dip.t-dialin.net [217.227.172.200]) by oxygen.pond.sub.org (Postfix) with ESMTPA id 3BC34276DB4 for ; Thu, 18 Mar 2010 17:33:19 +0100 (CET) From: Markus Armbruster Date: Thu, 18 Mar 2010 17:33:08 +0100 Message-Id: <1268929996-28763-2-git-send-email-armbru@redhat.com> In-Reply-To: <1268929996-28763-1-git-send-email-armbru@redhat.com> References: <1268929996-28763-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 01/11] error: Put error definitions back in alphabetical order 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 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 } }" -- 1.6.6.1