mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 23:07:44 +00:00
conf: domain: Move 'virDomainChrSourceReconnectDefParseXML'
Move the function in place of its forward declaration. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
6a86e47a6e
commit
a2c05f1a03
@ -1481,7 +1481,27 @@ virDomainChrSourceDefFormat(virBuffer *buf,
|
||||
static int
|
||||
virDomainChrSourceReconnectDefParseXML(virDomainChrSourceReconnectDef *def,
|
||||
xmlNodePtr node,
|
||||
xmlXPathContextPtr ctxt);
|
||||
xmlXPathContextPtr ctxt)
|
||||
{
|
||||
VIR_XPATH_NODE_AUTORESTORE(ctxt)
|
||||
xmlNodePtr cur;
|
||||
|
||||
ctxt->node = node;
|
||||
|
||||
if ((cur = virXPathNode("./reconnect", ctxt))) {
|
||||
if (virXMLPropTristateBool(cur, "enabled", VIR_XML_PROP_NONE,
|
||||
&def->enabled) < 0)
|
||||
return -1;
|
||||
|
||||
if (def->enabled == VIR_TRISTATE_BOOL_YES) {
|
||||
if (virXMLPropUInt(cur, "timeout", 10, VIR_XML_PROP_REQUIRED,
|
||||
&def->timeout) < 0)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int virDomainObjOnceInit(void)
|
||||
@ -8777,32 +8797,6 @@ virDomainNetAppendIPAddress(virDomainNetDef *def,
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
virDomainChrSourceReconnectDefParseXML(virDomainChrSourceReconnectDef *def,
|
||||
xmlNodePtr node,
|
||||
xmlXPathContextPtr ctxt)
|
||||
{
|
||||
VIR_XPATH_NODE_AUTORESTORE(ctxt)
|
||||
xmlNodePtr cur;
|
||||
|
||||
ctxt->node = node;
|
||||
|
||||
if ((cur = virXPathNode("./reconnect", ctxt))) {
|
||||
if (virXMLPropTristateBool(cur, "enabled", VIR_XML_PROP_NONE,
|
||||
&def->enabled) < 0)
|
||||
return -1;
|
||||
|
||||
if (def->enabled == VIR_TRISTATE_BOOL_YES) {
|
||||
if (virXMLPropUInt(cur, "timeout", 10, VIR_XML_PROP_REQUIRED,
|
||||
&def->timeout) < 0)
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
virDomainNetTeamingInfoParseXML(xmlXPathContextPtr ctxt,
|
||||
virDomainNetTeamingInfo **teaming)
|
||||
|
Loading…
Reference in New Issue
Block a user