提交 1cdc465e 编写于 作者: D Daniel P. Berrange

Simplify the Xen get type driver method

There is no point iterating over sub-drivers since the user
would not have a virConnectPtr instance at all if opening
the drivers failed. Just return 'Xen' immediately.
Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
上级 61b7a872
......@@ -491,16 +491,9 @@ unsigned long xenUnifiedVersion(void)
static const char *
xenUnifiedConnectGetType(virConnectPtr conn)
xenUnifiedConnectGetType(virConnectPtr conn ATTRIBUTE_UNUSED)
{
xenUnifiedPrivatePtr priv = conn->privateData;
int i;
for (i = 0; i < XEN_UNIFIED_NR_DRIVERS; ++i)
if (priv->opened[i])
return "Xen";
return NULL;
}
/* Which features are supported by this driver? */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册