mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
Simplify the Xen get max vcpus / node get info driver methods
Unconditionally call into xenHypervisorGetMaxVcpus and xenDaemonNodeGetInfo respectively, since those drivers are both mandatory Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
dfda6e1161
commit
17f9852734
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
xenUnifiedNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info)
|
||||
{
|
||||
xenUnifiedPrivatePtr priv = conn->privateData;
|
||||
|
||||
if (priv->opened[XEN_UNIFIED_XEND_OFFSET])
|
||||
return xenDaemonNodeGetInfo(conn, info);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static char *
|
||||
|
Loading…
Reference in New Issue
Block a user