This should be a no-op
---
 src/conf/domain_conf.c | 38 ++++++++++++++++++++++++--------------
 1 file changed, 24 insertions(+), 14 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 9d47846..ab22322 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -3664,24 +3664,11 @@ virDomainDefPostParseMemory(virDomainDefPtr def,
     return 0;
 }
 
-
 static int
-virDomainDefPostParseInternal(virDomainDefPtr def,
-                              virCapsPtr caps ATTRIBUTE_UNUSED,
-                              unsigned int parseFlags)
+virDomainDefAddConsoleCompat(virDomainDefPtr def)
 {
     size_t i;
 
-    /* verify init path for container based domains */
-    if (def->os.type == VIR_DOMAIN_OSTYPE_EXE && !def->os.init) {
-        virReportError(VIR_ERR_XML_ERROR, "%s",
-                       _("init binary must be specified"));
-        return -1;
-    }
-
-    if (virDomainDefPostParseMemory(def, parseFlags) < 0)
-        return -1;
-
     /*
      * Some really crazy backcompat stuff for consoles
      *
@@ -3774,6 +3761,29 @@ virDomainDefPostParseInternal(virDomainDefPtr def,
         def->consoles[0]->targetType = 
VIR_DOMAIN_CHR_CONSOLE_TARGET_TYPE_SERIAL;
     }
 
+    return 0;
+}
+
+static int
+virDomainDefPostParseInternal(virDomainDefPtr def,
+                              virCapsPtr caps ATTRIBUTE_UNUSED,
+                              unsigned int parseFlags)
+{
+    size_t i;
+
+    /* verify init path for container based domains */
+    if (def->os.type == VIR_DOMAIN_OSTYPE_EXE && !def->os.init) {
+        virReportError(VIR_ERR_XML_ERROR, "%s",
+                       _("init binary must be specified"));
+        return -1;
+    }
+
+    if (virDomainDefPostParseMemory(def, parseFlags) < 0)
+        return -1;
+
+    if (virDomainDefAddConsoleCompat(def) < 0)
+        return -1;
+
     if (virDomainDefRejectDuplicateControllers(def) < 0)
         return -1;
 
-- 
2.5.0

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

Reply via email to