[Libvirt-cim] [PATCH 2 of 2] Removing support for devid-style InstanceID from EC

Kaitlin Rupert kaitlin at linux.vnet.ibm.com
Sat Dec 1 01:22:22 UTC 2007


# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1196472093 28800
# Node ID 23e70ea23f1a9d8fd59ed0980b077a014da8eb8b
# Parent  e69c02e79e40056b1d1a4825c048d70355e9cf85
Removing support for devid-style InstanceID from EC.

Since ELEC no longer uses devid-style InstanceID, we need to remove the devid-parsing from cap_to_cs().

Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>

diff -r e69c02e79e40 -r 23e70ea23f1a src/Virt_ElementCapabilities.c
--- a/src/Virt_ElementCapabilities.c	Fri Nov 30 16:54:45 2007 -0800
+++ b/src/Virt_ElementCapabilities.c	Fri Nov 30 17:21:33 2007 -0800
@@ -31,7 +31,6 @@
 #include "libcmpiutil.h"
 #include "misc_util.h"
 #include "std_association.h"
-#include "device_parsing.h"
 
 #include "Virt_VirtualSystemManagementCapabilities.h"
 #include "Virt_EnabledLogicalElementCapabilities.h"
@@ -119,8 +118,6 @@ static CMPIStatus cap_to_cs(const CMPIOb
                             struct inst_list *list)
 {
         const char *inst_id;
-        char *host;
-        char *device;
         CMPIInstance *inst;
         virConnectPtr conn;
         CMPIStatus s = {CMPI_RC_OK, NULL};
@@ -129,13 +126,6 @@ static CMPIStatus cap_to_cs(const CMPIOb
                 cu_statusf(_BROKER, &s, 
                            CMPI_RC_ERR_FAILED,
                            "Could not get InstanceID");
-                goto error1;
-        }
-
-        if (!parse_fq_devid(inst_id, &host, &device)) {
-                cu_statusf(_BROKER, &s, 
-                           CMPI_RC_ERR_FAILED,
-                           "Could not get system name");
                 goto error1;
         }
 
@@ -143,14 +133,12 @@ static CMPIStatus cap_to_cs(const CMPIOb
         if (s.rc != CMPI_RC_OK)
                 goto error1;
 
-        inst = instance_from_name(_BROKER, conn, host, ref);
+        inst = instance_from_name(_BROKER, conn, inst_id, ref);
         if (inst)
                 inst_list_add(list, inst);
 
         virConnectClose(conn);
  error1:
-        free(host);
-        free(device);
 
         return s;
 }




More information about the Libvirt-cim mailing list