mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
qdev: Push "type" property up to Object
Now that Object is a type, add an instance_init function and push the "type" property from qdev to there. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
This commit is contained in:
parent
edc92115a9
commit
2f262e06f0
2 changed files with 11 additions and 6 deletions
|
@ -515,11 +515,6 @@ char* qdev_get_fw_dev_path(DeviceState *dev)
|
|||
return strdup(path);
|
||||
}
|
||||
|
||||
static char *qdev_get_type(Object *obj, Error **errp)
|
||||
{
|
||||
return g_strdup(object_get_typename(obj));
|
||||
}
|
||||
|
||||
/**
|
||||
* Legacy property handling
|
||||
*/
|
||||
|
@ -638,7 +633,6 @@ static void device_initfn(Object *obj)
|
|||
qdev_property_add_static(dev, prop, NULL);
|
||||
}
|
||||
|
||||
object_property_add_str(OBJECT(dev), "type", qdev_get_type, NULL, NULL);
|
||||
qdev_prop_set_defaults(dev, qdev_get_props(dev));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue