From 5324e3e958e87083c87e2965b6c87db24c6afa90 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 9 Sep 2021 12:44:11 +0400 Subject: [PATCH] qemu-options: define -spice only #ifdef CONFIG_SPICE MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1982600 Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé --- qemu-options.hx | 2 ++ softmmu/vl.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index 58f2f76775..34e9b32a5c 100644 --- a/qemu-options.hx +++ b/qemu-options.hx @@ -2097,6 +2097,7 @@ SRST Enable SDL. ERST +#ifdef CONFIG_SPICE DEF("spice", HAS_ARG, QEMU_OPTION_spice, "-spice [port=port][,tls-port=secured-port][,x509-dir=]\n" " [,x509-key-file=][,x509-key-password=]\n" @@ -2118,6 +2119,7 @@ DEF("spice", HAS_ARG, QEMU_OPTION_spice, " enable spice\n" " at least one of {port, tls-port} is mandatory\n", QEMU_ARCH_ALL) +#endif SRST ``-spice option[,option[,...]]`` Enable the spice remote desktop protocol. Valid options are diff --git a/softmmu/vl.c b/softmmu/vl.c index 0b81f61535..f7d7c9550d 100644 --- a/softmmu/vl.c +++ b/softmmu/vl.c @@ -3537,6 +3537,7 @@ void qemu_init(int argc, char **argv, char **envp) case QEMU_OPTION_readconfig: qemu_read_config_file(optarg, qemu_parse_config_group, &error_fatal); break; +#ifdef CONFIG_SPICE case QEMU_OPTION_spice: olist = qemu_find_opts_err("spice", NULL); if (!olist) { @@ -3549,6 +3550,7 @@ void qemu_init(int argc, char **argv, char **envp) } display_remote++; break; +#endif case QEMU_OPTION_writeconfig: { FILE *fp; -- 2.11.0