[Libvirt-cim] [PATCH 4 of 4] getInstance of DevicePool returns FAILED in case of NOT_FOUND

Heidi Eckhart heidieck at linux.vnet.ibm.com
Wed Jan 9 11:09:16 UTC 2008


# HG changeset patch
# User Heidi Eckhart <heidieck at linux.vnet.ibm.com>
# Date 1199880497 -3600
# Node ID 102f4ccc2080dbaddb62b61eb9409ba09922cefd
# Parent  5a1645d367b15bd3c6d144f5098c5c2824875eb8
getInstance of DevicePool returns FAILED in case of NOT_FOUND
Signed-off-by: Heidi Eckhart <heidieck at linux.vnet.ibm.com>

diff -r 5a1645d367b1 -r 102f4ccc2080 src/Virt_DevicePool.c
--- a/src/Virt_DevicePool.c	Wed Jan 09 13:08:16 2008 +0100
+++ b/src/Virt_DevicePool.c	Wed Jan 09 13:08:17 2008 +0100
@@ -817,7 +817,6 @@ CMPIStatus get_pool_inst(const CMPIBroke
         CMPIInstance *inst = NULL;
         virConnectPtr conn = NULL;
         const char *id = NULL;
-        const char *prop;
 
         if (cu_get_str_path(reference, "InstanceID", &id) != CMPI_RC_OK) {
                 cu_statusf(broker, &s,
@@ -831,19 +830,11 @@ CMPIStatus get_pool_inst(const CMPIBroke
                 goto out;
 
         inst = get_pool_by_id(broker, conn, id, NAMESPACE(reference));
-        if (inst) {
-                prop = cu_compare_ref(reference, inst);
-                if (prop != NULL) {
-                        cu_statusf(broker, &s,
-                                   CMPI_RC_ERR_NOT_FOUND,
-                                   "No such ResourcePool instance (%s)", prop);
-                }
-        } else {
+        if (inst == NULL)
                 cu_statusf(broker, &s,
-                           CMPI_RC_ERR_FAILED,
-                           "No such instance `%s'", id);
-        }
-
+                           CMPI_RC_ERR_NOT_FOUND,
+                           "No such instance (%s)", id);
+        
  out:
         virConnectClose(conn);
         *instance = inst;




More information about the Libvirt-cim mailing list