[libvirt PATCH 09/28] conf: Move virDomainLoaderDefParseXML()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pure code movement, needed to prepare for upcoming changes.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 57 +++++++++++++++++++++---------------------
 1 file changed, 29 insertions(+), 28 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 709ca53790..6f5f370696 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -17991,34 +17991,6 @@ virDomainDefMaybeAddHostdevSCSIcontroller(virDomainDef *def)
     return 0;
 }
 
-static int
-virDomainLoaderDefParseXML(xmlNodePtr node,
-                           virDomainLoaderDef *loader,
-                           bool fwAutoSelect)
-{
-    if (!fwAutoSelect) {
-        if (virXMLPropTristateBool(node, "readonly", VIR_XML_PROP_NONE,
-                                   &loader->readonly) < 0)
-            return -1;
-
-        if (virXMLPropEnum(node, "type", virDomainLoaderTypeFromString,
-                           VIR_XML_PROP_NONZERO, &loader->type) < 0)
-            return -1;
-
-        if (!(loader->path = virXMLNodeContentString(node)))
-            return -1;
-
-        if (STREQ(loader->path, ""))
-            VIR_FREE(loader->path);
-    }
-
-    if (virXMLPropTristateBool(node, "secure", VIR_XML_PROP_NONE,
-                               &loader->secure) < 0)
-        return -1;
-
-    return 0;
-}
-
 
 static int
 virDomainNvramDefParseXML(virDomainLoaderDef *loader,
@@ -18065,6 +18037,35 @@ virDomainNvramDefParseXML(virDomainLoaderDef *loader,
 }
 
 
+static int
+virDomainLoaderDefParseXML(xmlNodePtr node,
+                           virDomainLoaderDef *loader,
+                           bool fwAutoSelect)
+{
+    if (!fwAutoSelect) {
+        if (virXMLPropTristateBool(node, "readonly", VIR_XML_PROP_NONE,
+                                   &loader->readonly) < 0)
+            return -1;
+
+        if (virXMLPropEnum(node, "type", virDomainLoaderTypeFromString,
+                           VIR_XML_PROP_NONZERO, &loader->type) < 0)
+            return -1;
+
+        if (!(loader->path = virXMLNodeContentString(node)))
+            return -1;
+
+        if (STREQ(loader->path, ""))
+            VIR_FREE(loader->path);
+    }
+
+    if (virXMLPropTristateBool(node, "secure", VIR_XML_PROP_NONE,
+                               &loader->secure) < 0)
+        return -1;
+
+    return 0;
+}
+
+
 static int
 virDomainSchedulerParseCommonAttrs(xmlNodePtr node,
                                    virProcessSchedPolicy *policy,
-- 
2.35.3




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux