summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-10-29 10:46:38 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2024-10-31 18:28:32 +0100
commitf41823e059d3460e116d1c29d8577649d48fcf33 (patch)
treefe1e6d878de4d5e7777253539a4300877b66315e
parent02009a12bcd7927a968df7641eaa609b659b3470 (diff)
downloadfocaccia-qemu-f41823e059d3460e116d1c29d8577649d48fcf33.tar.gz
focaccia-qemu-f41823e059d3460e116d1c29d8577649d48fcf33.zip
qom: allow user-creatable classes to be in modules
There is no real reason to make user-creatable classes different
from other backends in this respect.  This also allows modularized
character devices to be treated by qom-list-properties just like
builtin ones.

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--qom/object_interfaces.c2
-rw-r--r--qom/qom-qmp-cmds.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c
index 1f2aa13306..1a6f29c053 100644
--- a/qom/object_interfaces.c
+++ b/qom/object_interfaces.c
@@ -90,7 +90,7 @@ Object *user_creatable_add_type(const char *type, const char *id,
         return NULL;
     }
 
-    klass = object_class_by_name(type);
+    klass = module_object_class_by_name(type);
     if (!klass) {
         error_setg(errp, "invalid object type: %s", type);
         return NULL;
diff --git a/qom/qom-qmp-cmds.c b/qom/qom-qmp-cmds.c
index 69a8e17aa8..46e4562300 100644
--- a/qom/qom-qmp-cmds.c
+++ b/qom/qom-qmp-cmds.c
@@ -186,7 +186,7 @@ ObjectPropertyInfoList *qmp_qom_list_properties(const char *typename,
     ObjectPropertyIterator iter;
     ObjectPropertyInfoList *prop_list = NULL;
 
-    klass = object_class_by_name(typename);
+    klass = module_object_class_by_name(typename);
     if (klass == NULL) {
         error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,
                   "Class '%s' not found", typename);