mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
qemu_capabilities: Expose qemu <-> libvirt arch translators
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@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
23018c0823
commit
849a0cfef1
@ -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";
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user