mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
qom: let object_new use a module if the type is not present
object_initialize() can use modules (it was added there because
virtio-gpu-device is a child device of virtio-gpu-pci; commit
64f7aece8e
, "object_initialize: try module load", 2020-09-15).
object_new() cannot; make things consistent.
qdev_new() is now just a simple wrapper that returns DeviceState.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
144d80f69e
commit
02009a12bc
2 changed files with 1 additions and 17 deletions
|
@ -790,7 +790,7 @@ Object *object_new_with_class(ObjectClass *klass)
|
|||
|
||||
Object *object_new(const char *typename)
|
||||
{
|
||||
TypeImpl *ti = type_get_by_name_noload(typename);
|
||||
TypeImpl *ti = type_get_or_load_by_name(typename, &error_fatal);
|
||||
|
||||
return object_new_with_type(ti);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue