提交 1dac1b37 编写于 作者: C Chris Lalancette

OpenVZ: accept NULL as type for GetMaxVCPUs.

All of the other drivers that support the getMaxVcpus callback
also accept a NULL value for type.  Make openvz also accept a
NULL value.
Signed-off-by: NChris Lalancette <clalance@redhat.com>
上级 776f5279
...@@ -1000,9 +1000,10 @@ cleanup: ...@@ -1000,9 +1000,10 @@ cleanup:
return ret; return ret;
} }
static int openvzGetMaxVCPUs(virConnectPtr conn, const char *type) { static int openvzGetMaxVCPUs(virConnectPtr conn, const char *type)
if (STRCASEEQ(type, "openvz")) {
return 1028; //OpenVZ has no limitation if (type == NULL || STRCASEEQ(type, "openvz"))
return 1028; /* OpenVZ has no limitation */
openvzError(conn, VIR_ERR_INVALID_ARG, openvzError(conn, VIR_ERR_INVALID_ARG,
_("unknown type '%s'"), type); _("unknown type '%s'"), type);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册