Introduce qdev_prop_set_link(), equivalent of object_property_set_link() for QDev objects.
Signed-off-by: Philippe Mathieu-Daudé <phi...@linaro.org> --- hw/core/qdev-properties.c | 5 +++++ include/hw/qdev-properties.h | 1 + 2 files changed, 6 insertions(+) diff --git a/hw/core/qdev-properties.c b/hw/core/qdev-properties.c index 9789a2f5de..46236b1542 100644 --- a/hw/core/qdev-properties.c +++ b/hw/core/qdev-properties.c @@ -694,6 +694,11 @@ void error_set_from_qdev_prop_error(Error **errp, int ret, Object *obj, } } +void qdev_prop_set_link(DeviceState *dev, const char *name, Object *value) +{ + object_property_set_link(OBJECT(dev), name, value, &error_abort); +} + void qdev_prop_set_bit(DeviceState *dev, const char *name, bool value) { object_property_set_bool(OBJECT(dev), name, value, &error_abort); diff --git a/include/hw/qdev-properties.h b/include/hw/qdev-properties.h index 21f399e9a3..c16dbefb2f 100644 --- a/include/hw/qdev-properties.h +++ b/include/hw/qdev-properties.h @@ -191,6 +191,7 @@ bool qdev_prop_set_drive_err(DeviceState *dev, const char *name, * Set properties between creation and realization. * @value must be valid. Each property may be set at most once. */ +void qdev_prop_set_link(DeviceState *dev, const char *name, Object *value); void qdev_prop_set_bit(DeviceState *dev, const char *name, bool value); void qdev_prop_set_uint8(DeviceState *dev, const char *name, uint8_t value); void qdev_prop_set_uint16(DeviceState *dev, const char *name, uint16_t value); -- 2.38.1