mirror of https://gitee.com/openkylin/qemu.git
qdev: Inline qdev_prop_parse()
Reviewed-by: Igor Mammedov <imammedo@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
7ce7ffe027
commit
98a6528461
|
@ -933,12 +933,6 @@ void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev,
|
|||
}
|
||||
}
|
||||
|
||||
void qdev_prop_parse(DeviceState *dev, const char *name, const char *value,
|
||||
Error **errp)
|
||||
{
|
||||
object_property_parse(OBJECT(dev), value, name, errp);
|
||||
}
|
||||
|
||||
void qdev_prop_set_bit(DeviceState *dev, const char *name, bool value)
|
||||
{
|
||||
object_property_set_bool(OBJECT(dev), value, name, &error_abort);
|
||||
|
@ -1031,7 +1025,7 @@ void qdev_prop_set_globals_for_type(DeviceState *dev, const char *typename,
|
|||
if (strcmp(typename, prop->driver) != 0) {
|
||||
continue;
|
||||
}
|
||||
qdev_prop_parse(dev, prop->property, prop->value, &err);
|
||||
object_property_parse(OBJECT(dev), prop->value, prop->property, &err);
|
||||
if (err != NULL) {
|
||||
error_propagate(errp, err);
|
||||
return;
|
||||
|
|
|
@ -168,8 +168,6 @@ extern PropertyInfo qdev_prop_arraylen;
|
|||
|
||||
/* Set properties between creation and init. */
|
||||
void *qdev_get_prop_ptr(DeviceState *dev, Property *prop);
|
||||
void qdev_prop_parse(DeviceState *dev, const char *name, const char *value,
|
||||
Error **errp);
|
||||
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);
|
||||
|
|
|
@ -145,7 +145,7 @@ static void qdev_print_devinfos(bool show_no_user)
|
|||
|
||||
static int set_property(const char *name, const char *value, void *opaque)
|
||||
{
|
||||
DeviceState *dev = opaque;
|
||||
Object *obj = opaque;
|
||||
Error *err = NULL;
|
||||
|
||||
if (strcmp(name, "driver") == 0)
|
||||
|
@ -153,7 +153,7 @@ static int set_property(const char *name, const char *value, void *opaque)
|
|||
if (strcmp(name, "bus") == 0)
|
||||
return 0;
|
||||
|
||||
qdev_prop_parse(dev, name, value, &err);
|
||||
object_property_parse(obj, value, name, &err);
|
||||
if (err != NULL) {
|
||||
qerror_report_err(err);
|
||||
error_free(err);
|
||||
|
|
Loading…
Reference in New Issue