[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/21] error: Put error definitions back in alphabet
From: |
Luiz Capitulino |
Subject: |
[Qemu-devel] [PATCH 04/21] error: Put error definitions back in alphabetical order |
Date: |
Mon, 5 Apr 2010 17:33:45 -0300 |
From: Markus Armbruster <address@hidden>
Add suitable comments to help keerp them in order.
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Luiz Capitulino <address@hidden>
---
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.7.0.4.297.g6555b1
- [Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue, Luiz Capitulino, 2010/04/05
- [Qemu-devel] [PATCH 07/21] error: New QERR_INVALID_PARAMETER_VALUE, Luiz Capitulino, 2010/04/05
- [Qemu-devel] [PATCH 01/21] qdev: Convert qdev_unplug() to QError, Luiz Capitulino, 2010/04/05
- [Qemu-devel] [PATCH 06/21] error: Convert qemu_opts_create() to QError, Luiz Capitulino, 2010/04/05
- [Qemu-devel] [PATCH 04/21] error: Put error definitions back in alphabetical order,
Luiz Capitulino <=
- [Qemu-devel] [PATCH 12/21] error: Convert net_client_init() to QError, Luiz Capitulino, 2010/04/05
- [Qemu-devel] [PATCH 20/21] QMP: Improve RTC_CHANGE event description, Luiz Capitulino, 2010/04/05
- [Qemu-devel] [PATCH 17/21] monitor: Use argument type 'b' for set_link, Luiz Capitulino, 2010/04/05
- [Qemu-devel] [PATCH 02/21] monitor: convert do_device_del() to QObject, QError, Luiz Capitulino, 2010/04/05
- [Qemu-devel] [PATCH 15/21] monitor: Rename argument type 'b' to 'f', Luiz Capitulino, 2010/04/05
- [Qemu-devel] [PATCH 09/21] error: Drop extra messages after qemu_opts_set() and qemu_opts_parse(), Luiz Capitulino, 2010/04/05
- [Qemu-devel] [PATCH 05/21] error: New QERR_DUPLICATE_ID, Luiz Capitulino, 2010/04/05
- [Qemu-devel] [PATCH 08/21] error: Convert qemu_opts_set() to QError, Luiz Capitulino, 2010/04/05
- [Qemu-devel] [PATCH 16/21] monitor: New argument type 'b', Luiz Capitulino, 2010/04/05
- [Qemu-devel] [PATCH 14/21] monitor: New commands netdev_add, netdev_del, Luiz Capitulino, 2010/04/05