@@ -4191,12 +4191,11 @@ virDomainDefPostParseDeviceIterator(virDomainDefPtr def ATTRIBUTE_UNUSED,
data->parseFlags, data->xmlopt);
}
-
int
-virDomainDefPostParse(virDomainDefPtr def,
- virCapsPtr caps,
- unsigned int parseFlags,
- virDomainXMLOptionPtr xmlopt)
+virDomainDefPostParseDevices(virDomainDefPtr def,
+ virCapsPtr caps,
+ unsigned int parseFlags,
+ virDomainXMLOptionPtr xmlopt)
{
int ret;
struct virDomainDefPostParseDeviceIteratorData data = {
@@ -4206,6 +4205,23 @@ virDomainDefPostParse(virDomainDefPtr def,
.parseFlags = parseFlags,
};
+ 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, parseFlags,
@@ -4215,13 +4231,10 @@ virDomainDefPostParse(virDomainDefPtr def,
}
/* iterate the devices */
- if ((ret = virDomainDeviceInfoIterateInternal(def,
- virDomainDefPostParseDeviceIterator,
- true,
- &data)) < 0)
+ if ((ret = virDomainDefPostParseDevices(def, caps,
+ parseFlags, xmlopt)) < 0)
return ret;
-
if ((ret = virDomainDefPostParseInternal(def, caps, parseFlags)) < 0)
return ret;
@@ -2476,6 +2476,11 @@ virDomainDefPostParse(virDomainDefPtr def,
virCapsPtr caps,
unsigned int parseFlags,
virDomainXMLOptionPtr xmlopt);
+int
+virDomainDefPostParseDevices(virDomainDefPtr def,
+ virCapsPtr caps,
+ unsigned int parseFlags,
+ virDomainXMLOptionPtr xmlopt);
static inline bool
virDomainObjIsActive(virDomainObjPtr dom)
@@ -235,6 +235,7 @@ virDomainDefParseFile;
virDomainDefParseNode;
virDomainDefParseString;
virDomainDefPostParse;
+virDomainDefPostParseDevices;
virDomainDefSetMemoryInitial;
virDomainDefSetMemoryTotal;
virDomainDefSetVcpus;