Signed-off-by: Shi Lei <shi_lei@xxxxxxxxxxxxxx> --- src/conf/domain_conf.c | 19 +------------------ src/conf/domain_conf.h | 4 ++-- 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 88e324e..f3b59ed 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -14463,23 +14463,6 @@ virDomainGraphicsSpiceDefParseXMLHook(xmlNodePtr node G_GNUC_UNUSED, } -static int -virDomainGraphicsDefParseXMLEGLHeadless(virDomainGraphicsDefPtr def, - xmlNodePtr node, - xmlXPathContextPtr ctxt) -{ - VIR_XPATH_NODE_AUTORESTORE(ctxt) - xmlNodePtr glNode; - - ctxt->node = node; - - if ((glNode = virXPathNode("./gl", ctxt))) - def->data.egl_headless.rendernode = virXMLPropString(glNode, - "rendernode"); - return 0; -} - - virDomainGraphicsDefPtr virDomainGraphicsDefNew(virDomainXMLOptionPtr xmlopt) { @@ -14572,7 +14555,7 @@ virDomainGraphicsDefParseXML(virDomainXMLOptionPtr xmlopt, goto error; break; case VIR_DOMAIN_GRAPHICS_TYPE_EGL_HEADLESS: - if (virDomainGraphicsDefParseXMLEGLHeadless(def, node, ctxt) < 0) + if (virDomainGraphicsEGLHeadlessDefParseXML(node, &def->data.egl_headless, NULL, def, NULL) < 0) goto error; break; case VIR_DOMAIN_GRAPHICS_TYPE_LAST: diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index ad84fe3..baa9166 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -1744,8 +1744,8 @@ struct _virDomainGraphicsSpiceDef { /* genparse:concisehook, genformat:separ char *rendernode; /* xmlattr:gl/rendernode */ }; -struct _virDomainGraphicsEGLHeadlessDef { - char *rendernode; +struct _virDomainGraphicsEGLHeadlessDef { /* genparse */ + char *rendernode; /* xmlattr:gl/rendernode */ }; struct _virDomainGraphicsDef { -- 2.25.1