# HG changeset patch
# User Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
# Date 1249492020 10800
# Node ID cf3e493e4b7cd09305b1aba45ca32f82b385ae9d
# Parent 23c0707da946c185f4387a13276b0c9fbf084da2
(#3) Add check to catch duplicated VirtualDevice parameter in DiskRASDs
At the moment of creation of a guest, it is necessary to check if its DiskRASDs all have
unique (among themselves) VirtualDevice parameters
#2:
Fixed patch submission date
#3:
Added check for disk type before comparing virtual_dev members
Signed-off-by: Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
diff -r 23c0707da946 -r cf3e493e4b7c src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Wed Aug 05 02:05:30 2009 -0300
+++ b/src/Virt_VirtualSystemManagementService.c Wed Aug 05 14:07:00 2009 -0300
@@ -1011,6 +1011,13 @@
for (i = 0; i < *index; i++) {
struct virt_device *ptr = &list[i];
+
+ if (dev->type == CIM_RES_TYPE_DISK &&
+ STREQC(ptr->dev.disk.virtual_dev,
+ dev->dev.disk.virtual_dev))
+ return "VirtualDevice property must be unique for each
"
+ "DiskResourceAllocationSettingData in a single
"
+ "guest";
if (STREQC(ptr->id, dev->id)) {
CU_DEBUG("Overriding device %s from refconf",
ptr->id);
Show replies by date