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:
Daniel P. Berrange 2013-04-30 14:57:03 +01:00
parent dfda6e1161
commit 17f9852734

View File

@ -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 *