This is just a small helper that will be used later.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
src/conf/capabilities.c | 9 +++++++++
src/conf/capabilities.h | 2 ++
src/libvirt_private.syms | 1 +
3 files changed, 12 insertions(+)
diff --git a/src/conf/capabilities.c b/src/conf/capabilities.c
index 72d4146ac3..a3e68741a9 100644
--- a/src/conf/capabilities.c
+++ b/src/conf/capabilities.c
@@ -1433,6 +1433,15 @@ virCapabilitiesHostNUMAGetCpus(virCapsHostNUMA *caps,
}
+int
+virCapabilitiesHostNUMAGetMaxNode(virCapsHostNUMA *caps)
+{
+ virCapsHostNUMACell *cell = g_ptr_array_index(caps->cells, caps->cells->len
- 1);
+
+ return cell->num;
+}
+
+
int
virCapabilitiesGetNodeInfo(virNodeInfoPtr nodeinfo)
{
diff --git a/src/conf/capabilities.h b/src/conf/capabilities.h
index 1b99202c9b..701878332c 100644
--- a/src/conf/capabilities.h
+++ b/src/conf/capabilities.h
@@ -328,6 +328,8 @@ virCapabilitiesFormatXML(virCaps *caps);
virBitmap *virCapabilitiesHostNUMAGetCpus(virCapsHostNUMA *caps,
virBitmap *nodemask);
+int virCapabilitiesHostNUMAGetMaxNode(virCapsHostNUMA *caps);
+
int virCapabilitiesGetNodeInfo(virNodeInfoPtr nodeinfo);
int virCapabilitiesInitPages(virCaps *caps);
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index fcb02c21b1..9870c5a37c 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -69,6 +69,7 @@ virCapabilitiesGetNodeInfo;
virCapabilitiesHostInitIOMMU;
virCapabilitiesHostNUMAAddCell;
virCapabilitiesHostNUMAGetCpus;
+virCapabilitiesHostNUMAGetMaxNode;
virCapabilitiesHostNUMANew;
virCapabilitiesHostNUMANewHost;
virCapabilitiesHostNUMARef;
--
2.31.1