summaryrefslogtreecommitdiffstats
path: root/ui/spice-core.c
diff options
context:
space:
mode:
authorGerd Hoffmann2020-10-19 09:52:12 +0200
committerGerd Hoffmann2020-10-21 15:46:14 +0200
commit7477477ca7bbf42588575039edcac852fbdb1d75 (patch)
tree699c375b48d31bea6640965a733e1b42c6300e68 /ui/spice-core.c
parentspice: add module helpers (diff)
downloadqemu-7477477ca7bbf42588575039edcac852fbdb1d75.tar.gz
qemu-7477477ca7bbf42588575039edcac852fbdb1d75.tar.xz
qemu-7477477ca7bbf42588575039edcac852fbdb1d75.zip
spice: add QemuSpiceOps, move migrate_info
Add QemuSpiceOps struct. This struct holds function pointers to the spice functions. It will be initialized with pointers to the stub functions. When spice gets initialized the function pointers will be re-written to the real functions. The spice stubs will move from qemu-spice.h to spice-module.c for that, because they will be needed for both "CONFIG_SPICE=n" and "CONFIG_SPICE=y but spice module not loaded" cases. This patch adds the infrastructure and starts with moving qemu_spice_migrate_info() to QemuSpiceOps. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20201019075224.14803-3-kraxel@redhat.com
Diffstat (limited to 'ui/spice-core.c')
-rw-r--r--ui/spice-core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/spice-core.c b/ui/spice-core.c
index a7fa574358..b03d743cf9 100644
--- a/ui/spice-core.c
+++ b/ui/spice-core.c
@@ -993,8 +993,13 @@ int qemu_spice_display_is_running(SimpleSpiceDisplay *ssd)
return spice_display_is_running;
}
+static struct QemuSpiceOps real_spice_ops = {
+ .migrate_info = qemu_spice_migrate_info,
+};
+
static void spice_register_config(void)
{
+ qemu_spice = real_spice_ops;
qemu_add_opts(&qemu_spice_opts);
}
opts_init(spice_register_config);