# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1204540082 -3600
# Node ID 74515c28683ce659b54af726d7bc5cec62995df1
# Parent d6992120c4edd5643f53edfe2255d5a1a657ba80
HRP: adopt HostSystem interface changes
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r d6992120c4ed -r 74515c28683c src/Virt_HostedResourcePool.c
--- a/src/Virt_HostedResourcePool.c Mon Mar 03 11:28:00 2008 +0100
+++ b/src/Virt_HostedResourcePool.c Mon Mar 03 11:28:02 2008 +0100
@@ -41,23 +41,23 @@ static CMPIStatus pool_to_sys(const CMPI
struct std_assoc_info *info,
struct inst_list *list)
{
- CMPIInstance *host;
CMPIStatus s = {CMPI_RC_OK, NULL};
- CMPIInstance *inst;
+ CMPIInstance *inst = NULL;
if (!match_hypervisor_prefix(ref, info))
- return s;
+ goto out;
s = get_pool_inst(_BROKER, ref, &inst);
if ((s.rc != CMPI_RC_OK) || (inst == NULL))
- return s;
+ goto out;
- s = get_host_cs(_BROKER, ref, &host);
+ s = get_host(_BROKER, ref, &inst, false);
if (s.rc != CMPI_RC_OK)
- return s;
+ goto out;
- inst_list_add(list, host);
+ inst_list_add(list, inst);
+ out:
return s;
}
@@ -66,19 +66,20 @@ static CMPIStatus sys_to_pool(const CMPI
struct inst_list *list)
{
CMPIStatus s = {CMPI_RC_OK, NULL};
+ CMPIInstance *inst = NULL;
int i;
virConnectPtr conn;
if (!match_hypervisor_prefix(ref, info))
- return s;
+ goto out;
- s = validate_host_ref(_BROKER, ref);
+ s = get_host(_BROKER, ref, &inst, true);
if (s.rc != CMPI_RC_OK)
- return s;
+ goto out;
conn = connect_by_classname(_BROKER, CLASSNAME(ref), &s);
if (conn == NULL)
- return s;
+ goto out;
for (i = 0; device_pool_names[i]; i++)
get_pool_by_type(_BROKER,
@@ -87,10 +88,7 @@ static CMPIStatus sys_to_pool(const CMPI
NAMESPACE(ref),
list);
- cu_statusf(_BROKER, &s,
- CMPI_RC_OK,
- "");
-
+ out:
return s;
}