[PATCH] VirtualDevice default value for a cdrom template rasd changed from hda to hdc

# HG changeset patch # User Richard Maciel <rmaciel@linux.vnet.ibm.com> # Date 1248772238 10800 # Node ID b4da93f35181591b2a225c9e8377a426312270b7 # Parent bdf6eda6765f09c27f7306cd8c074ca5acda38a6 VirtualDevice default value for a cdrom template rasd changed from hda to hdc Signed-off-by: Richard Maciel <rmaciel@linux.vnet.ibm.com> diff -r bdf6eda6765f -r b4da93f35181 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Thu Jul 30 15:59:26 2009 -0700 +++ b/src/Virt_SettingsDefineCapabilities.c Tue Jul 28 06:10:38 2009 -0300 @@ -782,13 +782,6 @@ CMPIInstance *inst; CMPIStatus s = {CMPI_RC_OK, NULL}; - if (type == DOMAIN_LXC) { - dev = "/lxc_mnt/tmp"; - } - else { - dev = "hda"; - } - inst = sdc_rasd_inst(&s, ref, CIM_RES_TYPE_DISK, DEVICE_RASD); if ((inst == NULL) || (s.rc != CMPI_RC_OK)) goto out; @@ -798,12 +791,11 @@ (CMPIValue *)"MegaBytes", CMPI_chars); CMSetProperty(inst, "Address", (CMPIValue *)disk_path, CMPI_chars); - if (type == DOMAIN_LXC) + if (type == DOMAIN_LXC) { + dev = "/lxc_mnt/tmp"; CMSetProperty(inst, "MountPoint", (CMPIValue *)dev, CMPI_chars); - else { - if (emu_type == 0) - CMSetProperty(inst, "VirtualQuantity", - (CMPIValue *)&disk_size, CMPI_uint64); + } else { + dev = "hda"; if (type == DOMAIN_XENPV) { dev = "xvda"; @@ -813,6 +805,13 @@ CMSetProperty(inst, "Caption", (CMPIValue *)"FV disk", CMPI_chars); } + + if (emu_type == 0) { + CMSetProperty(inst, "VirtualQuantity", + (CMPIValue *)&disk_size, CMPI_uint64); + } else if (emu_type == 1) { + dev = "hdc"; + } CMSetProperty(inst, "VirtualDevice", (CMPIValue *)dev, CMPI_chars);
participants (1)
-
Richard Maciel