@@ -17,9 +17,6 @@
* add new ones!
*/
-#define QERR_PROPERTY_VALUE_BAD \
- "Property '%s.%s' doesn't take value '%s'"
-
#define QERR_PROPERTY_VALUE_OUT_OF_RANGE \
"Property %s.%s doesn't take value %" PRId64 " (minimum: %" PRId64 ", maximum: %" PRId64 ")"
@@ -682,7 +682,7 @@ void error_set_from_qdev_prop_error(Error **errp, int ret, Object *obj,
break;
default:
case -EINVAL:
- error_setg(errp, QERR_PROPERTY_VALUE_BAD,
+ error_setg(errp, "Property '%s.%s' doesn't take value '%s'",
object_get_typename(obj), name, value);
break;
case -ENOENT:
@@ -5190,7 +5190,7 @@ static void x86_cpuid_set_vendor(Object *obj, const char *value,
int i;
if (strlen(value) != CPUID_VENDOR_SZ) {
- error_setg(errp, QERR_PROPERTY_VALUE_BAD, "", "vendor", value);
+ error_setg(errp, "Property 'vendor' doesn't take value '%s'", value);
return;
}
Address the comment added in commit 4629ed1e98 ("qerror: Finally unused, clean up"), from 2015: /* * These macros will go away, please don't use * in new code, and do not add new ones! */ Manual change. Remove the definition in include/qapi/qmp/qerror.h. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> --- include/qapi/qmp/qerror.h | 3 --- hw/core/qdev-properties.c | 2 +- target/i386/cpu.c | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-)