2021-01-26 18:57:05 +01:00
|
|
|
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
|
2021-01-29 16:02:11 +01:00
|
|
|
and error out in a normal way before we reach the abort.
|
2021-01-26 18:57:05 +01:00
|
|
|
|
|
|
|
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
|
2022-05-26 19:31:38 +02:00
|
|
|
index d34608558e9e5e53f4b363774f06..ce9f80117e518640b89fb1afa7d3 100644
|
2021-01-26 18:57:05 +01:00
|
|
|
--- a/qom/object.c
|
|
|
|
+++ b/qom/object.c
|
2022-05-26 19:31:38 +02:00
|
|
|
@@ -238,6 +238,12 @@ static bool type_is_ancestor(TypeImpl *type, TypeImpl *target_type)
|
2021-01-26 18:57:05 +01:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|