# HG changeset patch
# User Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
# Date 1244396373 10800
# Node ID fb5a4c3d15d5bad7d09a65dcf70899c1b4e32d9c
# Parent acfd07abeb2602bc0727ff29c05511748cd0a276
Added support for BusType prop on RASD and VSMS
#2:
- If BusType prop cannot be fetched by VSMS, set its disk structure corresponding member
to NULL
Signed-off-by: Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
imported patch dbus_type_rasd
diff -r acfd07abeb26 -r fb5a4c3d15d5 src/Virt_RASD.c
--- a/src/Virt_RASD.c Sun Jun 07 14:39:33 2009 -0300
+++ b/src/Virt_RASD.c Sun Jun 07 14:39:33 2009 -0300
@@ -253,6 +253,11 @@
(CMPIValue *)dev->dev.disk.source,
CMPI_chars);
+ CMSetProperty(inst,
+ "BusType",
+ (CMPIValue *)dev->dev.disk.bus_type,
+ CMPI_chars);
+
/* There's not much we can do here if we don't recognize the type,
* so it seems that assuming 'disk' is a reasonable default
*/
diff -r acfd07abeb26 -r fb5a4c3d15d5 src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Sun Jun 07 14:39:33 2009 -0300
+++ b/src/Virt_VirtualSystemManagementService.c Sun Jun 07 14:39:33 2009 -0300
@@ -603,6 +603,12 @@
else
return "Invalid value for EmulatedType";
+ free(dev->dev.disk.bus_type);
+ if (cu_get_str_prop(inst, "BusType", &val) != CMPI_RC_OK)
+ dev->dev.disk.bus_type = NULL;
+ else
+ dev->dev.disk.bus_type = strdup(val);
+
free(dev->id);
dev->id = strdup(dev->dev.disk.virtual_dev);