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

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



From: "Daniel P. Berrange" <berrange 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 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


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