[libvirt] [PATCH] Fix parsing of arch from domain XML

Daniel P. Berrange berrange at redhat.com
Wed Dec 19 11:01:57 UTC 2012


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

When parsing the arch from domain XML, the result was only
saved to a local variable, not the virDomainDefPtr

Pushed as a test breaker fix from virArch fallout

Signed-off-by: Daniel P. Berrange <berrange at redhat.com>
---
 src/conf/domain_conf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index ba70e02..ccb3b63 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -9576,8 +9576,8 @@ static virDomainDefPtr virDomainDefParseXML(virCapsPtr caps,
 
     tmp = virXPathString("string(./os/type[1]/@arch)", ctxt);
     if (tmp) {
-        virArch arch = virArchFromString(tmp);
-        if (!arch) {
+        def->os.arch = virArchFromString(tmp);
+        if (!def->os.arch) {
             virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                            _("Unknown architecture %s"),
                            tmp);
-- 
1.7.11.7




More information about the libvir-list mailing list