In some cases, the string representing architecture is different
in qemu and libvirt. That is the reason why we have
virQEMUCapsArchFromString() and virQEMUCapsArchToString(). So
far, we did not need them outside of qemu_capabilities code, but
this will change shortly. Expose them then.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
Reviewed-by: Laszlo Ersek <lersek(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 4 ++--
src/qemu/qemu_capabilities.h | 3 +++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index c9700193fd..4c8229fbda 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -616,7 +616,7 @@ static int virQEMUCapsOnceInit(void)
VIR_ONCE_GLOBAL_INIT(virQEMUCaps);
-static virArch virQEMUCapsArchFromString(const char *arch)
+virArch virQEMUCapsArchFromString(const char *arch)
{
if (STREQ(arch, "i386"))
return VIR_ARCH_I686;
@@ -629,7 +629,7 @@ static virArch virQEMUCapsArchFromString(const char *arch)
}
-static const char *virQEMUCapsArchToString(virArch arch)
+const char *virQEMUCapsArchToString(virArch arch)
{
if (arch == VIR_ARCH_I686)
return "i386";
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 1d677f6a06..06c7606e2f 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -643,4 +643,7 @@ bool virQEMUCapsCPUFilterFeatures(const char *name,
virSEVCapabilityPtr
virQEMUCapsGetSEVCapabilities(virQEMUCapsPtr qemuCaps);
+virArch virQEMUCapsArchFromString(const char *arch);
+const char *virQEMUCapsArchToString(virArch arch);
+
#endif /* LIBVIRT_QEMU_CAPABILITIES_H */
--
2.19.2