qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 4/9] qerror: rename QERR_PROPERTY_VALUE_NOT_POWER_OF


From: Luiz Capitulino
Subject: [Qemu-devel] [PATCH 4/9] qerror: rename QERR_PROPERTY_VALUE_NOT_POWER_OF_2
Date: Wed, 18 Jul 2012 14:49:15 -0300

The error class name is PropertyValueNotPowerOf2, not PropertyValueNotPowerOf_2.

Rename the QERR_PROPERTY_VALUE_NOT_POWER_OF_2 macro to
QERR_PROPERTY_VALUE_NOT_POWER_OF2 to reflect that, so that future error macro
generation generates the expected macro name.

Signed-off-by: Luiz Capitulino <address@hidden>
---
 hw/qdev-properties.c | 2 +-
 qerror.c             | 2 +-
 qerror.h             | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/hw/qdev-properties.c b/hw/qdev-properties.c
index 3571cf3..38f78b3 100644
--- a/hw/qdev-properties.c
+++ b/hw/qdev-properties.c
@@ -885,7 +885,7 @@ static void set_blocksize(Object *obj, Visitor *v, void 
*opaque,
 
     /* We rely on power-of-2 blocksizes for bitmasks */
     if ((value & (value - 1)) != 0) {
-        error_set(errp, QERR_PROPERTY_VALUE_NOT_POWER_OF_2,
+        error_set(errp, QERR_PROPERTY_VALUE_NOT_POWER_OF2,
                   dev->id?:"", name, (int64_t)value);
         return;
     }
diff --git a/qerror.c b/qerror.c
index 132ab2d..e09c410 100644
--- a/qerror.c
+++ b/qerror.c
@@ -245,7 +245,7 @@ static const QErrorStringTable qerror_table[] = {
         .desc      = "Property '%(device).%(property)' can't find value 
'%(value)'",
     },
     {
-        .error_fmt = QERR_PROPERTY_VALUE_NOT_POWER_OF_2,
+        .error_fmt = QERR_PROPERTY_VALUE_NOT_POWER_OF2,
         .desc      = "Property '%(device).%(property)' doesn't take "
                      "value '%(value)', it's not a power of 2",
     },
diff --git a/qerror.h b/qerror.h
index 27ce395..58d0295 100644
--- a/qerror.h
+++ b/qerror.h
@@ -205,7 +205,7 @@ QError *qobject_to_qerror(const QObject *obj);
 #define QERR_PROPERTY_VALUE_NOT_FOUND \
     "{ 'class': 'PropertyValueNotFound', 'data': { 'device': %s, 'property': 
%s, 'value': %s } }"
 
-#define QERR_PROPERTY_VALUE_NOT_POWER_OF_2 \
+#define QERR_PROPERTY_VALUE_NOT_POWER_OF2 \
     "{ 'class': 'PropertyValueNotPowerOf2', 'data': { " \
     "'device': %s, 'property': %s, 'value': %"PRId64" } }"
 
-- 
1.7.11.2.249.g31c7954.dirty




reply via email to

[Prev in Thread] Current Thread [Next in Thread]