
# HG changeset patch # User Kaitlin Rupert <karupert@us.ibm.com> # Date 1260583468 28800 # Node ID b7bb0916ce5f3e6b70b4ff666160e076bfd8783a # Parent 54c432d2bec6493cbbd3fa7c5a28b2e461014f68 Add support for floppy devices Signed-off-by: Kaitlin Rupert <karupert@us.ibm.com> diff -r 54c432d2bec6 -r b7bb0916ce5f schema/ResourceAllocationSettingData.mof --- a/schema/ResourceAllocationSettingData.mof Wed Dec 09 11:42:06 2009 -0800 +++ b/schema/ResourceAllocationSettingData.mof Fri Dec 11 18:04:28 2009 -0800 @@ -10,8 +10,8 @@ string VirtualDevice; [Description ("Device emulation type"), - ValueMap {"0", "1"}, - Values {"Disk", "CDROM"}] + ValueMap {"0", "1", "2"}, + Values {"Disk", "CDROM", "floppy"}] uint16 EmulatedType; [Description ("Bus type of the device")] @@ -29,8 +29,8 @@ string VirtualDevice; [Description ("Device emulation type"), - ValueMap {"0", "1"}, - Values {"Disk", "CDROM"}] + ValueMap {"0", "1", "2"}, + Values {"Disk", "CDROM", "floppy"}] uint16 EmulatedType; [Description ("Bus type of the device")] diff -r 54c432d2bec6 -r b7bb0916ce5f src/Virt_RASD.c --- a/src/Virt_RASD.c Wed Dec 09 11:42:06 2009 -0800 +++ b/src/Virt_RASD.c Fri Dec 11 18:04:28 2009 -0800 @@ -264,6 +264,9 @@ if ((dev->dev.disk.device != NULL) && STREQ(dev->dev.disk.device, "cdrom")) type = VIRT_DISK_TYPE_CDROM; + else if ((dev->dev.disk.device != NULL) && + STREQ(dev->dev.disk.device, "floppy")) + type = VIRT_DISK_TYPE_FLOPPY; else type = VIRT_DISK_TYPE_DISK; diff -r 54c432d2bec6 -r b7bb0916ce5f src/Virt_RASD.h --- a/src/Virt_RASD.h Wed Dec 09 11:42:06 2009 -0800 +++ b/src/Virt_RASD.h Fri Dec 11 18:04:28 2009 -0800 @@ -25,6 +25,7 @@ #define VIRT_DISK_TYPE_DISK 0 #define VIRT_DISK_TYPE_CDROM 1 +#define VIRT_DISK_TYPE_FLOPPY 2 char *rasd_to_xml(CMPIInstance *rasd); diff -r 54c432d2bec6 -r b7bb0916ce5f src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c Wed Dec 09 11:42:06 2009 -0800 +++ b/src/Virt_VirtualSystemManagementService.c Fri Dec 11 18:04:28 2009 -0800 @@ -789,6 +789,8 @@ dev->dev.disk.device = strdup("disk"); else if (type == VIRT_DISK_TYPE_CDROM) dev->dev.disk.device = strdup("cdrom"); + else if (type == VIRT_DISK_TYPE_FLOPPY) + dev->dev.disk.device = strdup("floppy"); else return "Invalid value for EmulatedType";