@@ -36,8 +36,6 @@ const GlobalProperty *qdev_find_global_prop(Object *obj,
const char *name);
int qdev_prop_check_globals(void);
void qdev_prop_set_globals(DeviceState *dev);
-void error_set_from_qdev_prop_error(Error **errp, int ret, Object *obj,
- Property *prop, const char *value);
/**
* qdev_property_add_static:
@@ -85,28 +85,6 @@ static Property *qdev_prop_find(DeviceState *dev, const char *name)
return NULL;
}
-void error_set_from_qdev_prop_error(Error **errp, int ret, Object *obj,
- Property *prop, const char *value)
-{
- switch (ret) {
- case -EEXIST:
- error_setg(errp, "Property '%s.%s' can't take value '%s', it's in use",
- object_get_typename(obj), prop->name, value);
- break;
- default:
- case -EINVAL:
- error_setg(errp, QERR_PROPERTY_VALUE_BAD,
- object_get_typename(obj), prop->name, value);
- break;
- case -ENOENT:
- error_setg(errp, "Property '%s.%s' can't find value '%s'",
- object_get_typename(obj), prop->name, value);
- break;
- case 0:
- break;
- }
-}
-
void qdev_prop_set_bit(DeviceState *dev, const char *name, bool value)
{
object_property_set_bool(OBJECT(dev), name, value, &error_abort);
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: "Daniel P. Berrangé" <berrange@redhat.com> Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: qemu-devel@nongnu.org --- include/hw/qdev-properties.h | 2 -- hw/core/qdev-properties.c | 22 ---------------------- 2 files changed, 24 deletions(-)