
# HG changeset patch # User Heidi Eckhart <heidieck@linux.vnet.ibm.com> # Date 1203934434 -3600 # Node ID 09459d892a7ba1f25fdd396dd41ff0e77fb6c234 # Parent a8bd1f2980451ea709a720d2846300c52e089de0 ESD: adopt interface changes to RASD Signed-off-by: Heidi Eckhart <heidieck@linux.vnet.ibm.com> diff -r a8bd1f298045 -r 09459d892a7b src/Virt_ElementSettingData.c --- a/src/Virt_ElementSettingData.c Mon Feb 25 11:13:53 2008 +0100 +++ b/src/Virt_ElementSettingData.c Mon Feb 25 11:13:54 2008 +0100 @@ -63,38 +63,20 @@ static CMPIStatus rasd_to_rasd(const CMP struct inst_list *list) { CMPIStatus s = {CMPI_RC_OK, NULL}; - CMPIInstance *inst; - const char *id = NULL; - uint16_t type; + CMPIInstance *inst = NULL; if (!match_hypervisor_prefix(ref, info)) return s; - if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) { - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Missing InstanceID"); + /* Special association case: + * RASD instance is pointing to itself + */ + s = get_rasd_by_ref(_BROKER, ref, &inst); + if (s.rc != CMPI_RC_OK) goto out; - } - - if (rasd_type_from_classname(CLASSNAME(ref), &type) != CMPI_RC_OK) { - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Unable to determine RASD type"); - goto out; - } - - inst = get_rasd_instance(info->context, ref, _BROKER, id, type); - if (inst == NULL) { - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_FAILED, - "Error getting associated RASD"); - - goto out; - } - + inst_list_add(list, inst); - + out: return s; }