aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2023-10-25 17:05:08 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2023-11-07 14:04:25 +0400
commit6261164bd600422f1c557b5a1dea124a83181881 (patch)
treeb713271e1e6813d725fe3690aa35efc8c0df9639 /system
parent6d9ed4eb9470db8fb7294baa83a73b854419bcc4 (diff)
qemu-options: define -vnc only #ifdef CONFIG_VNC
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'system')
-rw-r--r--system/vl.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/system/vl.c b/system/vl.c
index fb0389e4d0..19aef762e4 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -1095,13 +1095,14 @@ DisplayOptions *qmp_query_display_options(Error **errp)
static void parse_display(const char *p)
{
- const char *opts;
-
if (is_help_option(p)) {
qemu_display_help();
exit(0);
}
+#ifdef CONFIG_VNC
+ const char *opts;
+
if (strstart(p, "vnc", &opts)) {
/*
* vnc isn't a (local) DisplayType but a protocol for remote
@@ -1113,9 +1114,11 @@ static void parse_display(const char *p)
error_report("VNC requires a display argument vnc=<display>");
exit(1);
}
- } else {
- parse_display_qapi(p);
+ return;
}
+#endif
+
+ parse_display_qapi(p);
}
static inline bool nonempty_str(const char *str)
@@ -3344,9 +3347,11 @@ void qemu_init(int argc, char **argv)
machine_parse_property_opt(qemu_find_opts("smp-opts"),
"smp", optarg);
break;
+#ifdef CONFIG_VNC
case QEMU_OPTION_vnc:
vnc_parse(optarg);
break;
+#endif
case QEMU_OPTION_no_acpi:
warn_report("-no-acpi is deprecated, use '-machine acpi=off' instead");
qdict_put_str(machine_opts_dict, "acpi", "off");