
# HG changeset patch # User Heidi Eckhart <heidieck@linux.vnet.ibm.com> # Date 1203934433 -3600 # Node ID a8bd1f2980451ea709a720d2846300c52e089de0 # Parent 50360523c174c877639dbc2100fd5723b2193226 RAFP: adopt interface changes to RASD Signed-off-by: Heidi Eckhart <heidieck@linux.vnet.ibm.com> diff -r 50360523c174 -r a8bd1f298045 src/Virt_ResourceAllocationFromPool.c --- a/src/Virt_ResourceAllocationFromPool.c Mon Feb 25 11:13:53 2008 +0100 +++ b/src/Virt_ResourceAllocationFromPool.c Mon Feb 25 11:13:53 2008 +0100 @@ -37,28 +37,6 @@ const static CMPIBroker *_BROKER; -static CMPIStatus validate_rasd_ref(const CMPIContext *context, - const CMPIObjectPath *ref, - uint16_t type, - const char *id) -{ - CMPIStatus s = {CMPI_RC_OK, NULL}; - CMPIInstance *rasd = NULL; - - rasd = get_rasd_instance(context, - ref, - _BROKER, - id, - type); - - if (CMIsNullObject(rasd)) - cu_statusf(_BROKER, &s, - CMPI_RC_ERR_NOT_FOUND, - "No such instance (%s)", id); - - return s; -} - static CMPIStatus rasd_to_pool(const CMPIObjectPath *ref, struct std_assoc_info *info, struct inst_list *list) @@ -69,6 +47,7 @@ static CMPIStatus rasd_to_pool(const CMP char *poolid = NULL; virConnectPtr conn = NULL; CMPIInstance *pool = NULL; + CMPIInstance *inst = NULL; if (!match_hypervisor_prefix(ref, info)) return s; @@ -87,10 +66,7 @@ static CMPIStatus rasd_to_pool(const CMP goto out; } - s = validate_rasd_ref(info->context, - ref, - type, - id); + s = get_rasd_by_name(_BROKER, ref, id, type, &inst); if (s.rc != CMPI_RC_OK) goto out;