@@ -901,7 +901,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;
}
@@ -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",
},
@@ -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" } }"
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 <lcapitulino@redhat.com> --- hw/qdev-properties.c | 2 +- qerror.c | 2 +- qerror.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)