diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2020-06-24 15:10:38 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2020-07-07 14:54:29 +0200 |
commit | 7ab6e7fcce9729d3a85e7e04737bc64a45a08772 (patch) | |
tree | 2afcf9df8ed7b8dca696eba4e5b677d516afbf43 /qdev-monitor.c | |
parent | 0f8198f1b2f3c33df2381c412ad8d8fd219b90b2 (diff) |
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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qdev-monitor.c b/qdev-monitor.c index 22da107484..8e7a7f7bbd 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); } } |