# HG changeset patch
# User Sharad Mishra<snmishra(a)us.ibm.com>
# Date 1298901442 28800
# Node ID 7a2ce3106321ac1729aeff2b9e42fb2e75da9295
# Parent 219b9e147e611772e9f540800943653ce73acdfd
(#2) 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.
update #2: Removed unused 'data' variable.
Signed-off-by: Sharad Mishra<snmishra(a)us.ibm.com>
diff -r 219b9e147e61 -r 7a2ce3106321 libxkutil/misc_util.c
--- a/libxkutil/misc_util.c Wed Feb 23 06:48:43 2011 -0800
+++ b/libxkutil/misc_util.c Mon Feb 28 05:57:22 2011 -0800
@@ -246,7 +246,6 @@
CMPIObjectPath *op;
CMPIInstance *inst = NULL;
CMPIStatus s;
- CMPIData data;
new_cn = get_typed_class(refcn, base);
if (new_cn == NULL)
@@ -260,10 +259,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);
_______________________________________________
Libvirt-cim mailing list
Libvirt-cim(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-cim
--
Chip Vincent
Open Virtualization
IBM Linux Technology Center
cvincent(a)linux.vnet.ibm.com