f33f068cda
Update version to v6.0.0 OBS-URL: https://build.opensuse.org/request/show/889648 OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=641
33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From: Bruce Rogers <brogers@suse.com>
|
|
Date: Mon, 25 Jan 2021 22:09:27 -0700
|
|
Subject: qom: handle case of chardev-spice module unavailability
|
|
|
|
When qemu is built with modules, but a given module doesn't load
|
|
qemu should handle that gracefully. When chardev-spice.so isn't
|
|
able to be loaded and qemu is invoked with -display spice-app,
|
|
qemu will reach an abort call. Explicitly detect these conditions
|
|
and error out in a normal way before we reach the abort.
|
|
|
|
Signed-off-by: Bruce Rogers <brogers@suse.com>
|
|
---
|
|
qom/object.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/qom/object.c b/qom/object.c
|
|
index 1b132653c3fc8d5150723b2d4cf7..cb8cd9e6a5f48f94a0829ecc9e97 100644
|
|
--- a/qom/object.c
|
|
+++ b/qom/object.c
|
|
@@ -236,6 +236,12 @@ static bool type_is_ancestor(TypeImpl *type, TypeImpl *target_type)
|
|
return true;
|
|
}
|
|
|
|
+
|
|
+ if (type->parent && !strcmp(type->parent, "chardev-spiceport")) {
|
|
+ if (!type->parent_type && !type_get_by_name(type->parent)) {
|
|
+ return false;
|
|
+ }
|
|
+ }
|
|
type = type_get_parent(type);
|
|
}
|
|
|