# HG changeset patch
# User Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
# Date 1244339211 10800
# Node ID f40d6547d9db21d942f0f033f8f51150f5c57637
# Parent 54abd208846613c4babff527809b2b5fcd305de6
Added support for BusType prop on RASD and VSMS
Signed-off-by: Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
diff -r 54abd2088466 -r f40d6547d9db src/Virt_RASD.c
--- a/src/Virt_RASD.c Sat Jun 06 22:46:51 2009 -0300
+++ b/src/Virt_RASD.c Sat Jun 06 22:46:51 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 54abd2088466 -r f40d6547d9db src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Sat Jun 06 22:46:51 2009 -0300
+++ b/src/Virt_VirtualSystemManagementService.c Sat Jun 06 22:46:51 2009 -0300
@@ -599,6 +599,12 @@
else
return "Invalid value for EmulatedType";
+ if (cu_get_str_prop(inst, "BusType", &val) != CMPI_RC_OK)
+ val = "ide";
+
+ free(dev->dev.disk.bus_type);
+ dev->dev.disk.bus_type = strdup(val);
+
free(dev->id);
dev->id = strdup(dev->dev.disk.virtual_dev);