mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-11 15:27:47 +00:00
vbox: fix stale comment about vdi storage type
The code had some todo's about adding 'vdi' to the list of virStorageType, but we've already done that. * src/vbox/vbox_tmpl.c (vboxStorageVolCreateXML) (vboxStorageVolGetXMLDesc): Use enum value for vdi type. Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
6f9c75a6f7
commit
3e44cf7fc6
@ -8763,13 +8763,8 @@ static virStorageVolPtr vboxStorageVolCreateXML(virStoragePoolPtr pool,
|
|||||||
(def->type != VIR_STORAGE_VOL_FILE))
|
(def->type != VIR_STORAGE_VOL_FILE))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
/* TODO: for now only the vmdk, vpc and vdi type harddisk
|
/* For now only the vmdk, vpc and vdi type harddisk
|
||||||
* variants can be created, also since there is no vdi
|
* variants can be created. For historical reason, we default to vdi */
|
||||||
* type in enum virStorageFileFormat {} the default
|
|
||||||
* will be to create vdi if nothing is specified in
|
|
||||||
* def->target.format
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (def->target.format == VIR_STORAGE_FILE_VMDK) {
|
if (def->target.format == VIR_STORAGE_FILE_VMDK) {
|
||||||
VBOX_UTF8_TO_UTF16("VMDK", &hddFormatUtf16);
|
VBOX_UTF8_TO_UTF16("VMDK", &hddFormatUtf16);
|
||||||
} else if (def->target.format == VIR_STORAGE_FILE_VPC) {
|
} else if (def->target.format == VIR_STORAGE_FILE_VPC) {
|
||||||
@ -9175,13 +9170,11 @@ static char *vboxStorageVolGetXMLDesc(virStorageVolPtr vol, unsigned int flags)
|
|||||||
def.target.format = VIR_STORAGE_FILE_VMDK;
|
def.target.format = VIR_STORAGE_FILE_VMDK;
|
||||||
else if (STRCASEEQ("vhd", hddFormatUtf8))
|
else if (STRCASEEQ("vhd", hddFormatUtf8))
|
||||||
def.target.format = VIR_STORAGE_FILE_VPC;
|
def.target.format = VIR_STORAGE_FILE_VPC;
|
||||||
|
else if (STRCASEEQ("vdi", hddFormatUtf8))
|
||||||
|
def.target.format = VIR_STORAGE_FILE_VDI;
|
||||||
else
|
else
|
||||||
def.target.format = VIR_STORAGE_FILE_RAW;
|
def.target.format = VIR_STORAGE_FILE_RAW;
|
||||||
|
|
||||||
/* TODO: need to add vdi to enum virStorageFileFormat {}
|
|
||||||
* and then add it here
|
|
||||||
*/
|
|
||||||
|
|
||||||
VBOX_UTF8_FREE(hddFormatUtf8);
|
VBOX_UTF8_FREE(hddFormatUtf8);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user