[PATCH 14/16] conf: Don't add default controllers in the XML parser

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

 



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

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


[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]