libxl: only query VNC when enabled
authorJason Andryuk <jandryuk@gmail.com>
Thu, 1 Oct 2020 23:53:37 +0000 (19:53 -0400)
committerWei Liu <wl@xen.org>
Sun, 11 Oct 2020 20:59:16 +0000 (20:59 +0000)
commit1b810a9d5a39230e76073b1a753cd2c34ded65fc
treeb3b7fa0efddbf46aa2eb5ffdcb9b96b65a1f02dc
parent8a62dee9ceff3056c7e0bd9632bac39bee2a51b3
libxl: only query VNC when enabled

QEMU without VNC support (configure --disable-vnc) will return an error
when VNC is queried over QMP since it does not recognize the QMP
command.  This will cause libxl to fail starting the domain even if VNC
is not enabled.  Therefore only query QEMU for VNC support when using
VNC, so a VNC-less QEMU will function in this configuration.

'goto out' jumps to the call to device_model_postconfig_done(), the
final callback after the chain of vnc queries.  This bypasses all the
QMP VNC queries.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
Acked-by: Wei Liu <wl@xen.org>
tools/libs/light/libxl_dm.c