[libvirt] [PATCH 5/7] Default console target type with no <target> element

Daniel P. Berrange berrange at redhat.com
Thu Oct 20 14:47:25 UTC 2011


From: "Daniel P. Berrange" <berrange at redhat.com>

When no <target> element was set at all, the default console
target type was not being honoured

* src/conf/domain_conf.c: Set default target type for consoles
  with no <target>
---
 src/conf/domain_conf.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index f90bece..a4d91ed 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -3913,6 +3913,9 @@ virDomainChrDefParseXML(virCapsPtr caps,
                              nodeName);
     }
 
+    /* Initialize this now, in case there is no actual 'target' element at all */
+    def->targetType = virDomainChrDefaultTargetType(caps, def->deviceType);
+
     cur = node->children;
     remaining = virDomainChrSourceDefParseXML(&def->source, cur, flags);
     if (remaining < 0)
-- 
1.7.6.4




More information about the libvir-list mailing list