render / rpms / libvirt

Forked from rpms/libvirt 4 months ago
Clone
6d3351
From 46761b7fdb0707036482c98eb3a80279753df484 Mon Sep 17 00:00:00 2001
6d3351
Message-Id: <46761b7fdb0707036482c98eb3a80279753df484@dist-git>
6d3351
From: Jiri Denemark <jdenemar@redhat.com>
6d3351
Date: Mon, 24 Apr 2017 15:38:41 +0200
6d3351
Subject: [PATCH] conf: Rename mode parameter in virCPUDefParseXML
6d3351
6d3351
The type of this parameter is virCPUType so calling it 'mode' is pretty
6d3351
strange, 'type' is a much better name.
6d3351
6d3351
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
6d3351
(cherry picked from commit e841a41169dd726af13f29cb57fbafe658b7011a)
6d3351
6d3351
https://bugzilla.redhat.com/show_bug.cgi?id=1428952
6d3351
6d3351
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
6d3351
---
6d3351
 src/conf/cpu_conf.c | 6 +++---
6d3351
 1 file changed, 3 insertions(+), 3 deletions(-)
6d3351
6d3351
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
6d3351
index b78531e60..623b1699f 100644
6d3351
--- a/src/conf/cpu_conf.c
6d3351
+++ b/src/conf/cpu_conf.c
6d3351
@@ -230,7 +230,7 @@ virCPUDefCopy(const virCPUDef *cpu)
6d3351
 virCPUDefPtr
6d3351
 virCPUDefParseXML(xmlNodePtr node,
6d3351
                   xmlXPathContextPtr ctxt,
6d3351
-                  virCPUType mode)
6d3351
+                  virCPUType type)
6d3351
 {
6d3351
     virCPUDefPtr def;
6d3351
     xmlNodePtr *nodes = NULL;
6d3351
@@ -250,7 +250,7 @@ virCPUDefParseXML(xmlNodePtr node,
6d3351
     if (VIR_ALLOC(def) < 0)
6d3351
         return NULL;
6d3351
 
6d3351
-    if (mode == VIR_CPU_TYPE_AUTO) {
6d3351
+    if (type == VIR_CPU_TYPE_AUTO) {
6d3351
         if (virXPathBoolean("boolean(./arch)", ctxt)) {
6d3351
             if (virXPathBoolean("boolean(./@match)", ctxt)) {
6d3351
                 virReportError(VIR_ERR_XML_ERROR, "%s",
6d3351
@@ -263,7 +263,7 @@ virCPUDefParseXML(xmlNodePtr node,
6d3351
             def->type = VIR_CPU_TYPE_GUEST;
6d3351
         }
6d3351
     } else {
6d3351
-        def->type = mode;
6d3351
+        def->type = type;
6d3351
     }
6d3351
 
6d3351
     if ((cpuMode = virXMLPropString(node, "mode"))) {
6d3351
-- 
6d3351
2.12.2
6d3351