On Thu, Jun 28, 2018 at 05:18:46PM -0400, John Ferlan wrote:
On 06/27/2018 09:34 AM, Erik Skultety wrote:
> VNC doesn't support OpenGL natively, but can run with non-native
> egl-headless support, so enable that.
>
> Signed-off-by: Erik Skultety <eskultet(a)redhat.com>
> ---
> docs/formatdomain.html.in | 6 ++++
> docs/schemas/domaincommon.rng | 7 ++++
> src/conf/domain_conf.c | 8 +++++
> src/qemu/qemu_command.c | 7 ++++
> tests/qemuxml2argvdata/graphics-vnc-gl-invalid.xml | 37 ++++++++++++++++++++++
> tests/qemuxml2argvdata/graphics-vnc-gl.args | 28 ++++++++++++++++
> tests/qemuxml2argvdata/graphics-vnc-gl.xml | 37 ++++++++++++++++++++++
> tests/qemuxml2argvtest.c | 1 +
> 8 files changed, 131 insertions(+)
> create mode 100644 tests/qemuxml2argvdata/graphics-vnc-gl-invalid.xml
> create mode 100644 tests/qemuxml2argvdata/graphics-vnc-gl.args
> create mode 100644 tests/qemuxml2argvdata/graphics-vnc-gl.xml
>
...
> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
> index 6bfa3ca130..2ccd9e124f 100644
> --- a/src/conf/domain_conf.c
> +++ b/src/conf/domain_conf.c
> @@ -13619,8 +13619,11 @@ virDomainGraphicsDefParseXMLVNC(virDomainGraphicsDefPtr
def,
> char *websocket = virXMLPropString(node, "websocket");
> char *sharePolicy = virXMLPropString(node, "sharePolicy");
> char *autoport = virXMLPropString(node, "autoport");
> + xmlNodePtr save = ctxt->node;
> int ret = -1;
>
> + ctxt->node = node;
> +
Not used here - but virDomainGraphicsListensParseXML does the same
thing... I think you can remove it here or just pass node to
virDomainGraphicsListensParseXML - your call.
I actually need to set it so that virXPathNode(./gl) below would behave as
expected, it looks this way only because in the SPICE code, we're traversing
node children, so I already get a "gl" node, here I have to query it first.
But you're right, that's terrible, I'm going to move the spice bit out of the
children loop, thus virDomainGraphicsGLDefParse will behave similarly to
virDomainGraphicsListenParseXML which replaces the context node with the
current one, restoring it back later.
Consider the above hunk moved into virDomainGraphicsGLDefParse.
Erik