# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1236209133 28800
# Node ID 1aff0d0e9bf49e738827b7157c0df407b814ae7d
# Parent ad367dfd38f4a78eeaf5369bb00d22bbf6aec911
Set device type to UNKNOWN after dynamic resource delete is called.
If this is done before, then the call to detach_device() always fails. The
proper device type is needed by the device_to_xml() call to generate the
XML needed for the virDomainDetachDevice() call.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r ad367dfd38f4 -r 1aff0d0e9bf4 src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Wed Mar 04 13:04:18 2009 -0800
+++ b/src/Virt_VirtualSystemManagementService.c Wed Mar 04 15:25:33 2009 -0800
@@ -1551,8 +1551,6 @@
struct virt_device *dev = &list[i];
if (STREQ(dev->id, devid)) {
- dev->type = CIM_RES_TYPE_UNKNOWN;
-
if ((type == CIM_RES_TYPE_GRAPHICS) ||
(type == CIM_RES_TYPE_INPUT))
cu_statusf(_BROKER, &s, CMPI_RC_OK, "");
@@ -1562,6 +1560,9 @@
RESOURCE_DEL,
CLASSNAME(op));
}
+
+ dev->type = CIM_RES_TYPE_UNKNOWN;
+
break;
}
}
_______________________________________________
Libvirt-cim mailing list
Libvirt-cim(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-cim
--
Richard Maciel, MSc
IBM Linux Technology Center
rmaciel(a)linux.vnet.ibm.com