]> xenbits.xensource.com Git - libvirt.git/commitdiff
conf: domain: Move 'virDomainChrSourceReconnectDefParseXML'
authorPeter Krempa <pkrempa@redhat.com>
Fri, 16 Sep 2022 14:51:36 +0000 (16:51 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 3 Oct 2022 12:43:18 +0000 (14:43 +0200)
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>
src/conf/domain_conf.c

index 05a12a48a898a61e7662bdd945317e6e9c8e84fb..26576da5bd4e080563a2df5bf8b2fd3bc5cade48 100644 (file)
@@ -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)