render / rpms / libvirt

Forked from rpms/libvirt 10 months ago
Clone
7a3408
From cd6ca9ba097bb551c02dbfd85d5010d3bceee9b9 Mon Sep 17 00:00:00 2001
7a3408
Message-Id: <cd6ca9ba097bb551c02dbfd85d5010d3bceee9b9@dist-git>
7a3408
From: Andrea Bolognani <abologna@redhat.com>
7a3408
Date: Wed, 5 Aug 2015 18:18:27 +0200
7a3408
Subject: [PATCH] nodeinfo: Rename nodeGetCPUBitmap() to
7a3408
 nodeGetOnlineCPUBitmap()
7a3408
7a3408
The new name makes it clear that the returned bitmap contains the
7a3408
information about which CPUs are online, not eg. which CPUs are
7a3408
present.
7a3408
7a3408
No behavioral change.
7a3408
7a3408
(cherry picked from commit c1df42d734fbd40b7220dad4a9c15f2584828a80)
7a3408
7a3408
Bug: https://bugzilla.redhat.com/show_bug.cgi?id=1213713
7a3408
7a3408
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
7a3408
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
7a3408
---
7a3408
 src/libvirt_private.syms | 2 +-
7a3408
 src/nodeinfo.c           | 6 +++---
7a3408
 src/nodeinfo.h           | 2 +-
7a3408
 3 files changed, 5 insertions(+), 5 deletions(-)
7a3408
7a3408
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
7a3408
index e92d2d0..1363c92 100644
7a3408
--- a/src/libvirt_private.syms
7a3408
+++ b/src/libvirt_private.syms
7a3408
@@ -998,7 +998,6 @@ virLockManagerRelease;
7a3408
 nodeAllocPages;
7a3408
 nodeCapsInitNUMA;
7a3408
 nodeGetCellsFreeMemory;
7a3408
-nodeGetCPUBitmap;
7a3408
 nodeGetCPUCount;
7a3408
 nodeGetCPUMap;
7a3408
 nodeGetCPUStats;
7a3408
@@ -1007,6 +1006,7 @@ nodeGetInfo;
7a3408
 nodeGetMemory;
7a3408
 nodeGetMemoryParameters;
7a3408
 nodeGetMemoryStats;
7a3408
+nodeGetOnlineCPUBitmap;
7a3408
 nodeGetPresentCPUBitmap;
7a3408
 nodeSetMemoryParameters;
7a3408
 
7a3408
diff --git a/src/nodeinfo.c b/src/nodeinfo.c
7a3408
index 69c15fc..3550e24 100644
7a3408
--- a/src/nodeinfo.c
7a3408
+++ b/src/nodeinfo.c
7a3408
@@ -1324,7 +1324,7 @@ nodeGetPresentCPUBitmap(const char *sysfs_prefix ATTRIBUTE_UNUSED)
7a3408
 }
7a3408
 
7a3408
 virBitmapPtr
7a3408
-nodeGetCPUBitmap(const char *sysfs_prefix ATTRIBUTE_UNUSED)
7a3408
+nodeGetOnlineCPUBitmap(const char *sysfs_prefix ATTRIBUTE_UNUSED)
7a3408
 {
7a3408
 #ifdef __linux__
7a3408
     const char *prefix = sysfs_prefix ? sysfs_prefix : SYSFS_SYSTEM_PATH;
7a3408
@@ -1369,7 +1369,7 @@ nodeGetCPUBitmap(const char *sysfs_prefix ATTRIBUTE_UNUSED)
7a3408
     return cpumap;
7a3408
 #else
7a3408
     virReportError(VIR_ERR_NO_SUPPORT, "%s",
7a3408
-                   _("node cpumap not implemented on this platform"));
7a3408
+                   _("node online CPU map not implemented on this platform"));
7a3408
     return NULL;
7a3408
 #endif
7a3408
 }
7a3408
@@ -1691,7 +1691,7 @@ nodeGetCPUMap(const char *sysfs_prefix,
7a3408
     if (!cpumap && !online)
7a3408
         return nodeGetCPUCount(sysfs_prefix);
7a3408
 
7a3408
-    if (!(cpus = nodeGetCPUBitmap(sysfs_prefix)))
7a3408
+    if (!(cpus = nodeGetOnlineCPUBitmap(sysfs_prefix)))
7a3408
         goto cleanup;
7a3408
 
7a3408
     if (cpumap && virBitmapToData(cpus, cpumap, &dummy) < 0)
7a3408
diff --git a/src/nodeinfo.h b/src/nodeinfo.h
7a3408
index 02af9c5..1810c1c 100644
7a3408
--- a/src/nodeinfo.h
7a3408
+++ b/src/nodeinfo.h
7a3408
@@ -45,7 +45,7 @@ int nodeGetMemory(unsigned long long *mem,
7a3408
                   unsigned long long *freeMem);
7a3408
 
7a3408
 virBitmapPtr nodeGetPresentCPUBitmap(const char *sysfs_prefix);
7a3408
-virBitmapPtr nodeGetCPUBitmap(const char *sysfs_prefix);
7a3408
+virBitmapPtr nodeGetOnlineCPUBitmap(const char *sysfs_prefix);
7a3408
 int nodeGetCPUCount(const char *sysfs_prefix);
7a3408
 
7a3408
 int nodeGetMemoryParameters(virTypedParameterPtr params,
7a3408
-- 
7a3408
2.5.0
7a3408