# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1196470485 28800
# Node ID e69c02e79e40056b1d1a4825c048d70355e9cf85
# Parent e6be7823c8e90c1f4b722ce1b33d6d15db123029
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(a)us.ibm.com>
diff -r e6be7823c8e9 -r e69c02e79e40 src/Virt_EnabledLogicalElementCapabilities.c
--- a/src/Virt_EnabledLogicalElementCapabilities.c Fri Nov 30 15:32:26 2007 -0800
+++ b/src/Virt_EnabledLogicalElementCapabilities.c Fri Nov 30 16:54:45 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;
}