mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
6d9ed4eb94
commit
6261164bd6
|
@ -2428,8 +2428,10 @@ SRST
|
||||||
OBP.
|
OBP.
|
||||||
ERST
|
ERST
|
||||||
|
|
||||||
|
#ifdef CONFIG_VNC
|
||||||
DEF("vnc", HAS_ARG, QEMU_OPTION_vnc ,
|
DEF("vnc", HAS_ARG, QEMU_OPTION_vnc ,
|
||||||
"-vnc <display> shorthand for -display vnc=<display>\n", QEMU_ARCH_ALL)
|
"-vnc <display> shorthand for -display vnc=<display>\n", QEMU_ARCH_ALL)
|
||||||
|
#endif
|
||||||
SRST
|
SRST
|
||||||
``-vnc display[,option[,option[,...]]]``
|
``-vnc display[,option[,option[,...]]]``
|
||||||
Normally, if QEMU is compiled with graphical window support, it
|
Normally, if QEMU is compiled with graphical window support, it
|
||||||
|
|
13
system/vl.c
13
system/vl.c
|
@ -1095,13 +1095,14 @@ DisplayOptions *qmp_query_display_options(Error **errp)
|
||||||
|
|
||||||
static void parse_display(const char *p)
|
static void parse_display(const char *p)
|
||||||
{
|
{
|
||||||
const char *opts;
|
|
||||||
|
|
||||||
if (is_help_option(p)) {
|
if (is_help_option(p)) {
|
||||||
qemu_display_help();
|
qemu_display_help();
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_VNC
|
||||||
|
const char *opts;
|
||||||
|
|
||||||
if (strstart(p, "vnc", &opts)) {
|
if (strstart(p, "vnc", &opts)) {
|
||||||
/*
|
/*
|
||||||
* vnc isn't a (local) DisplayType but a protocol for remote
|
* 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>");
|
error_report("VNC requires a display argument vnc=<display>");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
} else {
|
return;
|
||||||
parse_display_qapi(p);
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
parse_display_qapi(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline bool nonempty_str(const char *str)
|
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"),
|
machine_parse_property_opt(qemu_find_opts("smp-opts"),
|
||||||
"smp", optarg);
|
"smp", optarg);
|
||||||
break;
|
break;
|
||||||
|
#ifdef CONFIG_VNC
|
||||||
case QEMU_OPTION_vnc:
|
case QEMU_OPTION_vnc:
|
||||||
vnc_parse(optarg);
|
vnc_parse(optarg);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
case QEMU_OPTION_no_acpi:
|
case QEMU_OPTION_no_acpi:
|
||||||
warn_report("-no-acpi is deprecated, use '-machine acpi=off' instead");
|
warn_report("-no-acpi is deprecated, use '-machine acpi=off' instead");
|
||||||
qdict_put_str(machine_opts_dict, "acpi", "off");
|
qdict_put_str(machine_opts_dict, "acpi", "off");
|
||||||
|
|
|
@ -10,15 +10,3 @@ int vnc_display_pw_expire(const char *id, time_t expires)
|
||||||
{
|
{
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
};
|
};
|
||||||
void vnc_parse(const char *str)
|
|
||||||
{
|
|
||||||
if (strcmp(str, "none") == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
error_setg(&error_fatal, "VNC support is disabled");
|
|
||||||
}
|
|
||||||
int vnc_init_func(void *opaque, QemuOpts *opts, Error **errp)
|
|
||||||
{
|
|
||||||
error_setg(errp, "VNC support is disabled");
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue