@@ -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;
@@ -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)
@@ -230,6 +230,7 @@ virDomainDefParseFile;
virDomainDefParseNode;
virDomainDefParseString;
virDomainDefPostParse;
+virDomainDefPostParseDevices;
virDomainDefSetMemoryInitial;
virDomainDefSetMemoryTotal;
virDomainDefSetVcpus;