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: Chris Lalancette <clalance@redhat.com>
This commit is contained in:
Chris Lalancette 2009-08-17 14:24:27 +02:00
parent 776f527926
commit 1dac1b3726

View File

@ -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);