Move this to the after-parse updater.
---
src/conf/domain_conf.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index d881983..3c3172d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -2362,10 +2362,13 @@ virDomainDeviceDefUpdateDefaultsInternal(virDomainDeviceDefPtr dev
ATTRIBUTE_UNU
static int
-virDomainDefUpdateDefaultsInternal(virDomainDefPtr def ATTRIBUTE_UNUSED,
+virDomainDefUpdateDefaultsInternal(virDomainDefPtr def,
virCapsPtr caps ATTRIBUTE_UNUSED)
{
- /* not in use yet */
+ /* Auto-add any implied controllers which aren't present */
+ if (virDomainDefAddImplicitControllers(def) < 0)
+ return -1;
+
return 0;
}
@@ -10778,10 +10781,6 @@ virDomainDefParseXML(virCapsPtr caps,
(def->ns.parse)(xml, root, ctxt, &def->namespaceData) < 0)
goto error;
- /* Auto-add any implied controllers which aren't present */
- if (virDomainDefAddImplicitControllers(def) < 0)
- goto error;
-
/* callback to fill driver specific domain aspects */
if (virDomainDefUpdateDefaults(def, caps) < 0)
goto error;
--
1.8.1.1