Re: [PATCH 07/40] Simplify the Xen get max vcpus / node get info driver methods

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

 



Daniel P. Berrange wrote:
> From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>
>
> Unconditionally call into xenHypervisorGetMaxVcpus and
> xenDaemonNodeGetInfo respectively, since those drivers
> are both mandatory
>
> Signed-off-by: Daniel P. Berrange <berrange@xxxxxxxxxx>
> ---
>  src/xen/xen_driver.c | 15 ++-------------
>  1 file changed, 2 insertions(+), 13 deletions(-)
>   

ACK.

Regards,
Jim

> diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
> index 951f6e7..b6cf6ca 100644
> --- a/src/xen/xen_driver.c
> +++ b/src/xen/xen_driver.c
> @@ -552,29 +552,18 @@ xenUnifiedConnectIsAlive(virConnectPtr conn ATTRIBUTE_UNUSED)
>  int
>  xenUnifiedConnectGetMaxVcpus(virConnectPtr conn, const char *type)
>  {
> -    xenUnifiedPrivatePtr priv = conn->privateData;
> -
>      if (type && STRCASENEQ(type, "Xen")) {
>          virReportError(VIR_ERR_INVALID_ARG, __FUNCTION__);
>          return -1;
>      }
>  
> -    if (priv->opened[XEN_UNIFIED_HYPERVISOR_OFFSET])
> -        return xenHypervisorGetMaxVcpus(conn, type);
> -    else {
> -        virReportError(VIR_ERR_NO_SUPPORT, __FUNCTION__);
> -        return -1;
> -    }
> +    return xenHypervisorGetMaxVcpus(conn, type);
>  }
>  
>  static int
>  xenUnifiedNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info)
>  {
> -    xenUnifiedPrivatePtr priv = conn->privateData;
> -
> -    if (priv->opened[XEN_UNIFIED_XEND_OFFSET])
> -        return xenDaemonNodeGetInfo(conn, info);
> -    return -1;
> +    return xenDaemonNodeGetInfo(conn, info);
>  }
>  
>  static char *
>   

--
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]