aboutsummaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-10-19 09:52:14 +0200
committerGerd Hoffmann <kraxel@redhat.com>2020-10-21 15:46:14 +0200
commitb192cd1e4f9321b74e1d8b13b94a239a4750abfb (patch)
tree44814e1dd885c6ac5246100b003336e0cd480618 /ui
parent63be30e6d53e78bbe5e21cbf930014ef4844fb31 (diff)
spice: move display_init() to QemuSpiceOps.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20201019075224.14803-5-kraxel@redhat.com
Diffstat (limited to 'ui')
-rw-r--r--ui/spice-core.c1
-rw-r--r--ui/spice-module.c9
2 files changed, 10 insertions, 0 deletions
diff --git a/ui/spice-core.c b/ui/spice-core.c
index 6ef66eb387..82d5dbda3e 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -995,6 +995,7 @@ int qemu_spice_display_is_running(SimpleSpiceDisplay *ssd)
static struct QemuSpiceOps real_spice_ops = {
.init = qemu_spice_init,
+ .display_init = qemu_spice_display_init,
.migrate_info = qemu_spice_migrate_info,
};
diff --git a/ui/spice-module.c b/ui/spice-module.c
index a30fa452ea..56868aaffe 100644
--- a/ui/spice-module.c
+++ b/ui/spice-module.c
@@ -18,6 +18,7 @@
*/
#include "qemu/osdep.h"
+#include "qemu/error-report.h"
#include "ui/qemu-spice-module.h"
int using_spice;
@@ -26,6 +27,13 @@ static void qemu_spice_init_stub(void)
{
}
+static void qemu_spice_display_init_stub(void)
+{
+ /* This must never be called if CONFIG_SPICE is disabled */
+ error_report("spice support is disabled");
+ abort();
+}
+
static int qemu_spice_migrate_info_stub(const char *h, int p, int t,
const char *s)
{
@@ -34,5 +42,6 @@ static int qemu_spice_migrate_info_stub(const char *h, int p, int t,
struct QemuSpiceOps qemu_spice = {
.init = qemu_spice_init_stub,
+ .display_init = qemu_spice_display_init_stub,
.migrate_info = qemu_spice_migrate_info_stub,
};