diff mbox

[08/12] domain: conf: Export virDomainDefPostParseDevices

Message ID d1272515eea43d96bb10d64f101db7c00ee5aade.1452224621.git.crobinso@redhat.com
State Superseded
Headers show

Commit Message

Cole Robinson Jan. 8, 2016, 3:50 a.m. UTC
We will use this in upcoming patches
---
 src/conf/domain_conf.c   | 31 +++++++++++++++++++++----------
 src/conf/domain_conf.h   |  4 ++++
 src/libvirt_private.syms |  1 +
 3 files changed, 26 insertions(+), 10 deletions(-)

-- 
2.5.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
diff mbox

Patch

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 61dc650..52dd293 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -4187,12 +4187,10 @@  virDomainDefPostParseDeviceIterator(virDomainDefPtr def ATTRIBUTE_UNUSED,
     return virDomainDeviceDefPostParse(dev, data->def, data->caps, data->xmlopt);
 }
 
-
 int
-virDomainDefPostParse(virDomainDefPtr def,
-                      virCapsPtr caps,
-                      unsigned int parseFlags,
-                      virDomainXMLOptionPtr xmlopt)
+virDomainDefPostParseDevices(virDomainDefPtr def,
+                             virCapsPtr caps,
+                             virDomainXMLOptionPtr xmlopt)
 {
     int ret;
     struct virDomainDefPostParseDeviceIteratorData data = {
@@ -4201,6 +4199,23 @@  virDomainDefPostParse(virDomainDefPtr def,
         .xmlopt = xmlopt,
     };
 
+    if ((ret = virDomainDeviceInfoIterateInternal(def,
+                                                  virDomainDefPostParseDeviceIterator,
+                                                  true,
+                                                  &data)) < 0)
+        return ret;
+
+    return 0;
+}
+
+int
+virDomainDefPostParse(virDomainDefPtr def,
+                      virCapsPtr caps,
+                      unsigned int parseFlags,
+                      virDomainXMLOptionPtr xmlopt)
+{
+    int ret;
+
     /* call the domain config callback */
     if (xmlopt->config.domainPostParseCallback) {
         ret = xmlopt->config.domainPostParseCallback(def, caps,
@@ -4210,13 +4225,9 @@  virDomainDefPostParse(virDomainDefPtr def,
     }
 
     /* iterate the devices */
-    if ((ret = virDomainDeviceInfoIterateInternal(def,
-                                                  virDomainDefPostParseDeviceIterator,
-                                                  true,
-                                                  &data)) < 0)
+    if ((ret = virDomainDefPostParseDevices(def, caps, xmlopt)) < 0)
         return ret;
 
-
     if ((ret = virDomainDefPostParseInternal(def, caps, parseFlags)) < 0)
         return ret;
 
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 4a91f24..2bba554 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2497,6 +2497,10 @@  virDomainDefPostParse(virDomainDefPtr def,
                       virCapsPtr caps,
                       unsigned int parseFlags,
                       virDomainXMLOptionPtr xmlopt);
+int
+virDomainDefPostParseDevices(virDomainDefPtr def,
+                             virCapsPtr caps,
+                             virDomainXMLOptionPtr xmlopt);
 
 static inline bool
 virDomainObjIsActive(virDomainObjPtr dom)
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 0f2f66c..58f2d22 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -230,6 +230,7 @@  virDomainDefParseFile;
 virDomainDefParseNode;
 virDomainDefParseString;
 virDomainDefPostParse;
+virDomainDefPostParseDevices;
 virDomainDefSetMemoryInitial;
 virDomainDefSetMemoryTotal;
 virDomainDefSetVcpus;