[Libvirt-cim] [PATCH 13 of 17] Fixes to VSSDComponent for libcmpiutil API change

Dan Smith danms at us.ibm.com
Wed Nov 28 17:10:26 UTC 2007


# HG changeset patch
# User Dan Smith <danms at us.ibm.com>
# Date 1196273390 28800
# Node ID 03b1c5492150286774f9087cb273146553d86f37
# Parent  30dcc8eaa9a5455815dae18df6b0a98e7e352fc5
Fixes to VSSDComponent for libcmpiutil API change

Signed-off-by: Dan Smith <danms at us.ibm.com>

diff -r 30dcc8eaa9a5 -r 03b1c5492150 src/Virt_VSSDComponent.c
--- a/src/Virt_VSSDComponent.c	Wed Nov 28 10:08:10 2007 -0800
+++ b/src/Virt_VSSDComponent.c	Wed Nov 28 10:09:50 2007 -0800
@@ -117,15 +117,14 @@ static CMPIStatus rasd_to_vssd(const CMP
 {
         CMPIStatus s;
         CMPIInstance *vssd = NULL;
-        char *id = NULL;
+        const char *id = NULL;
         char *host = NULL;
         char *devid = NULL;
         int ret;
 
         ASSOC_MATCH(info->provider_name, CLASSNAME(ref));
 
-        id = cu_get_str_path(ref, "InstanceID");
-        if (id == NULL) {
+        if (cu_get_str_path(ref, "InstanceID", &id) != CMPI_RC_OK) {
                 cu_statusf(_BROKER, &s,
                            CMPI_RC_ERR_FAILED,
                            "Missing InstanceID");
@@ -145,7 +144,6 @@ static CMPIStatus rasd_to_vssd(const CMP
                 inst_list_add(list, vssd);
 
  out:
-        free(id);
         free(host);
         free(devid);
 




More information about the Libvirt-cim mailing list