render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
7548c0
From c049804bc3b296a183ce0bd819d5f9b1d1a45ea7 Mon Sep 17 00:00:00 2001
7548c0
Message-Id: <c049804bc3b296a183ce0bd819d5f9b1d1a45ea7@dist-git>
7548c0
From: Michal Privoznik <mprivozn@redhat.com>
7548c0
Date: Wed, 7 Oct 2020 18:45:34 +0200
7548c0
Subject: [PATCH] numa_conf: Drop CPU from name of two functions
7548c0
MIME-Version: 1.0
7548c0
Content-Type: text/plain; charset=UTF-8
7548c0
Content-Transfer-Encoding: 8bit
7548c0
7548c0
There are two functions virDomainNumaDefCPUFormatXML() and
7548c0
virDomainNumaDefCPUParseXML() which format and parse domain's
7548c0
<numa/>. There is nothing CPU specific about them. Drop the
7548c0
infix.
7548c0
7548c0
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7548c0
Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
7548c0
(cherry picked from commit 68c5b0183cb157c4672a6af3a14375df4434cee5)
7548c0
7548c0
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1749518
7548c0
7548c0
Conflicts:
7548c0
- src/conf/domain_conf.c: Context.
7548c0
7548c0
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
7548c0
Message-Id: <a06547d5b53c7a8fa2a2801a9cbd7a47834ebaa3.1602087923.git.mprivozn@redhat.com>
7548c0
Reviewed-by: Ján Tomko <jtomko@redhat.com>
7548c0
---
7548c0
 src/conf/cpu_conf.c    | 2 +-
7548c0
 src/conf/domain_conf.c | 2 +-
7548c0
 src/conf/numa_conf.c   | 8 ++++----
7548c0
 src/conf/numa_conf.h   | 4 ++--
7548c0
 4 files changed, 8 insertions(+), 8 deletions(-)
7548c0
7548c0
diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
7548c0
index 1a2948ce11..dfd0c1f798 100644
7548c0
--- a/src/conf/cpu_conf.c
7548c0
+++ b/src/conf/cpu_conf.c
7548c0
@@ -746,7 +746,7 @@ virCPUDefFormatBufFull(virBufferPtr buf,
7548c0
     if (virCPUDefFormatBuf(&childrenBuf, def) < 0)
7548c0
         goto cleanup;
7548c0
 
7548c0
-    if (virDomainNumaDefCPUFormatXML(&childrenBuf, numa) < 0)
7548c0
+    if (virDomainNumaDefFormatXML(&childrenBuf, numa) < 0)
7548c0
         goto cleanup;
7548c0
 
7548c0
     /* Put it all together */
7548c0
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
7548c0
index 484f3b4352..3229d5ec95 100644
7548c0
--- a/src/conf/domain_conf.c
7548c0
+++ b/src/conf/domain_conf.c
7548c0
@@ -20487,7 +20487,7 @@ virDomainDefParseXML(xmlDocPtr xml,
7548c0
     if (virCPUDefParseXML(ctxt, "./cpu[1]", VIR_CPU_TYPE_GUEST, &def->cpu) < 0)
7548c0
         goto error;
7548c0
 
7548c0
-    if (virDomainNumaDefCPUParseXML(def->numa, ctxt) < 0)
7548c0
+    if (virDomainNumaDefParseXML(def->numa, ctxt) < 0)
7548c0
         goto error;
7548c0
 
7548c0
     if (virDomainNumaGetCPUCountTotal(def->numa) > virDomainDefGetVcpusMax(def)) {
7548c0
diff --git a/src/conf/numa_conf.c b/src/conf/numa_conf.c
7548c0
index 6f1257fd8e..38fcf9d9aa 100644
7548c0
--- a/src/conf/numa_conf.c
7548c0
+++ b/src/conf/numa_conf.c
7548c0
@@ -842,8 +842,8 @@ virDomainNumaDefNodeDistanceParseXML(virDomainNumaPtr def,
7548c0
 }
7548c0
 
7548c0
 int
7548c0
-virDomainNumaDefCPUParseXML(virDomainNumaPtr def,
7548c0
-                            xmlXPathContextPtr ctxt)
7548c0
+virDomainNumaDefParseXML(virDomainNumaPtr def,
7548c0
+                         xmlXPathContextPtr ctxt)
7548c0
 {
7548c0
     xmlNodePtr *nodes = NULL;
7548c0
     xmlNodePtr oldNode = ctxt->node;
7548c0
@@ -971,8 +971,8 @@ virDomainNumaDefCPUParseXML(virDomainNumaPtr def,
7548c0
 
7548c0
 
7548c0
 int
7548c0
-virDomainNumaDefCPUFormatXML(virBufferPtr buf,
7548c0
-                             virDomainNumaPtr def)
7548c0
+virDomainNumaDefFormatXML(virBufferPtr buf,
7548c0
+                          virDomainNumaPtr def)
7548c0
 {
7548c0
     virDomainMemoryAccess memAccess;
7548c0
     virTristateBool discard;
7548c0
diff --git a/src/conf/numa_conf.h b/src/conf/numa_conf.h
7548c0
index b1b8e3274d..ce865cbfbb 100644
7548c0
--- a/src/conf/numa_conf.h
7548c0
+++ b/src/conf/numa_conf.h
7548c0
@@ -182,7 +182,7 @@ bool virDomainNumatuneNodesetIsAvailable(virDomainNumaPtr numatune,
7548c0
 bool virDomainNumatuneNodeSpecified(virDomainNumaPtr numatune,
7548c0
                                     int cellid);
7548c0
 
7548c0
-int virDomainNumaDefCPUParseXML(virDomainNumaPtr def, xmlXPathContextPtr ctxt);
7548c0
-int virDomainNumaDefCPUFormatXML(virBufferPtr buf, virDomainNumaPtr def);
7548c0
+int virDomainNumaDefParseXML(virDomainNumaPtr def, xmlXPathContextPtr ctxt);
7548c0
+int virDomainNumaDefFormatXML(virBufferPtr buf, virDomainNumaPtr def);
7548c0
 
7548c0
 unsigned int virDomainNumaGetCPUCountTotal(virDomainNumaPtr numa);
7548c0
-- 
7548c0
2.29.2
7548c0