From 7477477ca7bbf42588575039edcac852fbdb1d75 Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Mon, 19 Oct 2020 09:52:12 +0200 Subject: spice: add QemuSpiceOps, move migrate_info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Marc-André Lureau Message-id: 20201019075224.14803-3-kraxel@redhat.com --- monitor/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'monitor/misc.c') diff --git a/monitor/misc.c b/monitor/misc.c index 4a859fb24a..32e6a8c13d 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -437,7 +437,7 @@ void qmp_client_migrate_info(const char *protocol, const char *hostname, return; } - if (qemu_spice_migrate_info(hostname, + if (qemu_spice.migrate_info(hostname, has_port ? port : -1, has_tls_port ? tls_port : -1, cert_subject)) { -- cgit v1.2.3