# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1196194889 28800
# Node ID 57656dc04de25a4b9b4986d94f73b42c9db571b9
# Parent 620fadffdb9642fb379441d5341f89049c634ae7
Fixes to Device for libcmpiutil API change
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 620fadffdb96 -r 57656dc04de2 src/Virt_Device.c
--- a/src/Virt_Device.c Tue Nov 27 12:21:05 2007 -0800
+++ b/src/Virt_Device.c Tue Nov 27 12:21:29 2007 -0800
@@ -470,7 +470,7 @@ CMPIInstance *instance_from_devid(const
static CMPIStatus get_device(const CMPIObjectPath *reference,
const CMPIResult *results,
- char *devid)
+ const char *devid)
{
CMPIStatus s;
virConnectPtr conn;
@@ -525,10 +525,9 @@ static CMPIStatus GetInstance(CMPIInstan
const CMPIObjectPath *reference,
const char **properties)
{
- char *devid;
-
- devid = cu_get_str_path(reference, "DeviceID");
- if (devid == NULL) {
+ const char *devid;
+
+ if (cu_get_str_path(reference, "DeviceID", &devid) != CMPI_RC_OK)
{
CMPIStatus s;
CMSetStatusWithChars(_BROKER, &s,