# HG changeset patch
# User Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
# Date 1248800674 10800
# Node ID 4ff0f15857f88d54dac54c149da08f0d0b1052f1
# Parent b4da93f35181591b2a225c9e8377a426312270b7
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
Signed-off-by: Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
diff -r b4da93f35181 -r 4ff0f15857f8 src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Tue Jul 28 06:10:38 2009 -0300
+++ b/src/Virt_VirtualSystemManagementService.c Tue Jul 28 14:04:34 2009 -0300
@@ -1011,6 +1011,11 @@
for (i = 0; i < *index; i++) {
struct virt_device *ptr = &list[i];
+
+ if (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);