# HG changeset patch
# User Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
# Date 1204806487 -3600
# Node ID 151ba048e3353023aff00c63f23e34abdecd64d8
# Parent 2e10c9124c322ff48c740db177a63a49eadf7164
EAFP: adopt renamed Device function
Signed-off-by: Heidi Eckhart <heidieck(a)linux.vnet.ibm.com>
diff -r 2e10c9124c32 -r 151ba048e335 src/Virt_ElementAllocatedFromPool.c
--- a/src/Virt_ElementAllocatedFromPool.c Thu Mar 06 13:28:06 2008 +0100
+++ b/src/Virt_ElementAllocatedFromPool.c Thu Mar 06 13:28:07 2008 +0100
@@ -40,24 +40,6 @@
const static CMPIBroker *_BROKER;
-static uint16_t class_to_type(const CMPIObjectPath *ref)
-{
- uint16_t type;
-
- if (CMClassPathIsA(_BROKER, ref, "CIM_LogicalDisk", NULL))
- type = CIM_RES_TYPE_DISK;
- else if (CMClassPathIsA(_BROKER, ref, "CIM_NetworkPort", NULL))
- type = CIM_RES_TYPE_NET;
- else if (CMClassPathIsA(_BROKER, ref, "CIM_Memory", NULL))
- type = CIM_RES_TYPE_MEM;
- else if (CMClassPathIsA(_BROKER, ref, "CIM_Processor", NULL))
- type = CIM_RES_TYPE_PROC;
- else
- type = CIM_RES_TYPE_UNKNOWN;
-
- return type;
-}
-
static CMPIStatus vdev_to_pool(const CMPIObjectPath *ref,
struct std_assoc_info *info,
struct inst_list *list)
@@ -76,7 +58,7 @@ static CMPIStatus vdev_to_pool(const CMP
if (s.rc != CMPI_RC_OK)
goto out;
- type = class_to_type(ref);
+ type = res_type_from_device_classname(CLASSNAME(ref));
if (type == CIM_RES_TYPE_UNKNOWN) {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,