
# HG changeset patch # User Kaitlin Rupert <karupert@us.ibm.com> # Date 1196468209 28800 # Node ID 069db51711b5089167809cecc193b700aa2c6814 # Parent 075b7c91e9729f9705af3a2f4726e6883be29b59 ELEC cleanup - remove get_fq_devid(). Removing get_fq_devid() since it's not necessary for building an InstanceID. Since this change causes error1 to be removed, I also renamed error2 to out, which conforms to the style of the other of the providers. Also, having an error2 without an error1 seemed silly. Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com> diff -r 075b7c91e972 -r 069db51711b5 src/Virt_EnabledLogicalElementCapabilities.c --- a/src/Virt_EnabledLogicalElementCapabilities.c Fri Nov 30 14:16:17 2007 -0800 +++ b/src/Virt_EnabledLogicalElementCapabilities.c Fri Nov 30 16:16:49 2007 -0800 @@ -30,7 +30,6 @@ #include "std_instance.h" #include "misc_util.h" -#include "device_parsing.h" #include "cs_util.h" #include "Virt_EnabledLogicalElementCapabilities.h" @@ -58,24 +57,15 @@ static CMPIStatus set_inst_properties(co CMPIArray *array; uint16_t element; int edit_name = 0; - char *devid; CMSetProperty(inst, "CreationClassName", (CMPIValue *)classname, CMPI_chars); - devid = get_fq_devid((char *)sys_name, "0"); - if (devid == NULL) { - cu_statusf(broker, &s, - CMPI_RC_ERR_FAILED, - "Could not get full ID"); - goto error1; - } - - CMSetProperty(inst, "InstanceID", (CMPIValue *)devid, CMPI_chars); + CMSetProperty(inst, "InstanceID", (CMPIValue *)sys_name, CMPI_chars); array = CMNewArray(broker, 5, CMPI_uint16, &s); if ((s.rc != CMPI_RC_OK) || CMIsNullObject(array)) - goto error2; + goto out; element = (uint16_t)ENABLED; CMSetArrayElementAt(array, 0, &element, CMPI_uint16); @@ -97,9 +87,7 @@ static CMPIStatus set_inst_properties(co CMSetProperty(inst, "ElementNameEditSupported", (CMPIValue *)&edit_name, CMPI_boolean); - error2: - free(devid); - error1: + out: return s; }