[Libvirt-cim] [PATCH] Update CS and VSMS for compare_ref changes

Dan Smith danms at us.ibm.com
Wed Nov 7 15:41:50 UTC 2007


# HG changeset patch
# User Dan Smith <danms at us.ibm.com>
# Date 1194453696 28800
# Node ID 55d37343f11204b02dde1df910001e8021a5afc5
# Parent  704edab17bc7ceac8a0d59285cf7bfb3c900b188
Update CS and VSMS for compare_ref changes

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

diff -r 704edab17bc7 -r 55d37343f112 src/Virt_ComputerSystem.c
--- a/src/Virt_ComputerSystem.c	Mon Nov 05 11:12:26 2007 -0800
+++ b/src/Virt_ComputerSystem.c	Wed Nov 07 08:41:36 2007 -0800
@@ -379,12 +379,7 @@ static CMPIStatus get_domain(const CMPIO
         CMPIInstance *inst[2] = {NULL, NULL};
         CMPIStatus s;
         virConnectPtr conn = NULL;
-        const struct cu_property *prop;
-        static struct cu_property props[] = {
-                {"CreationClassName", 0},
-                {"Name", 1},
-                {NULL, 0}
-        };
+        const char *prop = NULL;
 
         conn = lv_connect(_BROKER, &s);
         if (conn == NULL)
@@ -398,11 +393,11 @@ static CMPIStatus get_domain(const CMPIO
                 goto out;
         }
 
-        prop = cu_compare_ref(reference, inst[0], props);
+        prop = cu_compare_ref(reference, inst[0]);
         if (prop != NULL) {
                 cu_statusf(_BROKER, &s,
                            CMPI_RC_ERR_NOT_FOUND,
-                           "No such instance (%s)", prop->name);
+                           "No such instance (%s)", prop);
                 goto out;
         }
 
diff -r 704edab17bc7 -r 55d37343f112 src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c	Mon Nov 05 11:12:26 2007 -0800
+++ b/src/Virt_VirtualSystemManagementService.c	Wed Nov 07 08:41:36 2007 -0800
@@ -1030,24 +1030,17 @@ static CMPIStatus GetInstance(CMPIInstan
 {
         CMPIInstance *inst;
         CMPIStatus s;
-        const struct cu_property *prop;
-        static struct cu_property props[] = {
-                {"CreationClassName", 0},
-                {"SystemName", 0},
-                {"SystemCreationClassName", 0},
-                {"Name", 1},
-                {NULL, 0}
-        };
+        const char *prop;
 
         s = _get_vsms(ref, &inst, 0);
         if (s.rc != CMPI_RC_OK)
                 return s;
 
-        prop = cu_compare_ref(ref, inst, props);
+        prop = cu_compare_ref(ref, inst);
         if (prop != NULL) {
                 cu_statusf(_BROKER, &s,
                            CMPI_RC_ERR_NOT_FOUND,
-                           "No such instance (%s)", prop->name);
+                           "No such instance (%s)", prop);
         } else {
                 CMSetStatus(&s, CMPI_RC_OK);
                 CMReturnInstance(results, inst);




More information about the Libvirt-cim mailing list