]> xenbits.xensource.com Git - libvirt.git/commitdiff
OpenVZ: accept NULL as type for GetMaxVCPUs.
authorChris Lalancette <clalance@redhat.com>
Mon, 17 Aug 2009 12:24:27 +0000 (14:24 +0200)
committerChris Lalancette <clalance@redhat.com>
Mon, 31 Aug 2009 19:03:02 +0000 (21:03 +0200)
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>
src/openvz_driver.c

index 6b7c49df4c42e0fdd709efa1b4ed4cb7ebf65ce2..43d54f9d8dc0dcca4503148363b0a72264a66d3f 100644 (file)
@@ -1000,9 +1000,10 @@ cleanup:
     return ret;
 }
 
-static int openvzGetMaxVCPUs(virConnectPtr conn, const char *type) {
-    if (STRCASEEQ(type, "openvz"))
-        return 1028; //OpenVZ has no limitation
+static int openvzGetMaxVCPUs(virConnectPtr conn, const char *type)
+{
+    if (type == NULL || STRCASEEQ(type, "openvz"))
+        return 1028; /* OpenVZ has no limitation */
 
     openvzError(conn, VIR_ERR_INVALID_ARG,
                      _("unknown type '%s'"), type);