Re: [PATCH v1 03/15] qemu_capabilities: Expose qemu <-> libvirt arch translators

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/27/19 11:04, Michal Privoznik wrote:
> 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@xxxxxxxxxx>
> ---
>  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 b48bcbebee..32e7a975a2 100644
> --- a/src/qemu/qemu_capabilities.c
> +++ b/src/qemu/qemu_capabilities.c
> @@ -615,7 +615,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;
> @@ -628,7 +628,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 ba84052bca..eb0fa5f3c0 100644
> --- a/src/qemu/qemu_capabilities.h
> +++ b/src/qemu/qemu_capabilities.h
> @@ -642,4 +642,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 */
> 

Reviewed-by: Laszlo Ersek <lersek@xxxxxxxxxx>

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux