[Libvirt-cim] [PATCH] Set CreationClassName property in VSMS

Sharad Mishra snmishra at us.ibm.com
Fri Feb 25 14:31:46 UTC 2011


# HG changeset patch
# User Sharad Mishra <snmishra at us.ibm.com>
# Date 1298644240 28800
# Node ID 147d3bcdefe0b21076c6aaa3eb66fbe7343db2fa
# Parent  219b9e147e611772e9f540800943653ce73acdfd
Set CreationClassName property in VSMS

CCName was not getting set correctly. I do not understand why there was a check to see if CCName is set, and set it only if it is set.
This patch removed the check, and sets the ccname if CMPIInstance is not null and ccname property is non-null.

Signed-off-by: Sharad Mishra <snmishra at us.ibm.com>

diff -r 219b9e147e61 -r 147d3bcdefe0 libxkutil/misc_util.c
--- a/libxkutil/misc_util.c	Wed Feb 23 06:48:43 2011 -0800
+++ b/libxkutil/misc_util.c	Fri Feb 25 06:30:40 2011 -0800
@@ -260,10 +260,8 @@
         if ((s.rc != CMPI_RC_OK) || CMIsNullObject(inst))
                 goto out;
         
-        data = CMGetProperty(inst, "CreationClassName", &s);
-        if (s.rc == CMPI_RC_OK)
-                CMSetProperty(inst, "CreationClassName",
-                              (CMPIValue *)new_cn, CMPI_chars);
+        CMSetProperty(inst, "CreationClassName",
+                      (CMPIValue *)new_cn, CMPI_chars);
 
  out:
         free(new_cn);




More information about the Libvirt-cim mailing list