aboutsummaryrefslogtreecommitdiff
path: root/qdev-monitor.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-06-24 15:10:38 +0200
committerGerd Hoffmann <kraxel@redhat.com>2020-07-07 14:54:29 +0200
commit7ab6e7fcce9729d3a85e7e04737bc64a45a08772 (patch)
tree2afcf9df8ed7b8dca696eba4e5b677d516afbf43 /qdev-monitor.c
parent0f8198f1b2f3c33df2381c412ad8d8fd219b90b2 (diff)
downloadqemu-7ab6e7fcce9729d3a85e7e04737bc64a45a08772.zip
qemu-7ab6e7fcce9729d3a85e7e04737bc64a45a08772.tar.gz
qemu-7ab6e7fcce9729d3a85e7e04737bc64a45a08772.tar.bz2
qdev: device module support
Hook module loading into the places where we need it when building devices as modules. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-id: 20200624131045.14512-4-kraxel@redhat.com
Diffstat (limited to 'qdev-monitor.c')
-rw-r--r--qdev-monitor.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c
index 22da107..8e7a7f7 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -147,6 +147,7 @@ static void qdev_print_devinfos(bool show_no_user)
int i;
bool cat_printed;
+ module_load_qom_all();
list = object_class_get_list_sorted(TYPE_DEVICE, false);
for (i = 0; i <= DEVICE_CATEGORY_MAX; i++) {
@@ -215,13 +216,13 @@ static DeviceClass *qdev_get_device_class(const char **driver, Error **errp)
DeviceClass *dc;
const char *original_name = *driver;
- oc = object_class_by_name(*driver);
+ oc = module_object_class_by_name(*driver);
if (!oc) {
const char *typename = find_typename_by_alias(*driver);
if (typename) {
*driver = typename;
- oc = object_class_by_name(*driver);
+ oc = module_object_class_by_name(*driver);
}
}