[libvirt] [PATCH] OpenVZ: accept NULL as type for GetMaxVCPUs.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 src/openvz_driver.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/openvz_driver.c b/src/openvz_driver.c
index 6b7c49d..43d54f9 100644
--- a/src/openvz_driver.c
+++ b/src/openvz_driver.c
@@ -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);
-- 
1.6.0.6

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]