[Libvirt-cim] [PATCHv2 5/5] VSSM: Set default values based on libvirt capabilities on DefineSystem calls

Viktor Mihajlovski mihajlov at linux.vnet.ibm.com
Fri Aug 30 11:31:43 UTC 2013


Hi John,

could you squash this in? 

-- 

diff --git a/src/Virt_VirtualSystemManagementService.c b/src/Virt_VirtualSystemManagementService.c
index 53b9691..79dec73 100644
--- a/src/Virt_VirtualSystemManagementService.c
+++ b/src/Virt_VirtualSystemManagementService.c
@@ -465,7 +465,7 @@ static int fv_vssd_to_domain(CMPIInstance *inst,
         int ret = 1;
         int retr;
         const char *val;
-        const char *domtype;
+        const char *domtype = NULL;
         const char *ostype = "hvm";
         struct capabilities *capsinfo = NULL;
 
@@ -481,7 +481,6 @@ static int fv_vssd_to_domain(CMPIInstance *inst,
                 }
         } else if (STREQC(pfx, "Xen")) {
                 domain->type = DOMAIN_XENFV;
-                domtype = NULL;
         } else {
                 CU_DEBUG("Unknown fullvirt domain type: %s", pfx);
                 ret = 0;
@@ -738,8 +737,10 @@ static int vssd_to_domain(CMPIInstance *inst,
 
         if (fullvirt || STREQC(pfx, "KVM")) {
                 conn = connect_by_classname(_BROKER, cn, &s);
-                if (conn == NULL || (s.rc != CMPI_RC_OK)) {
-                        CU_DEBUG("libvirt connection failed");
+                if (conn == NULL) {
+                        cu_statusf(_BROKER, &s,
+                                   CMPI_RC_ERR_FAILED,
+                                   "Error connecting to libvirt");
                         ret = 0;
                         goto out;
                 }


Mit freundlichen Grüßen/Kind Regards
   Viktor Mihajlovski

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martina Köderitz
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294   




More information about the Libvirt-cim mailing list