aboutsummaryrefslogtreecommitdiff
path: root/hw/block
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2015-12-04 14:41:02 +0000
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2015-12-11 17:02:37 +0000
commitfc3e493bc8e96ef4bf7ae4f035f43cb39382c936 (patch)
treeae418320678e9631d87aeaf1337898e0835a6775 /hw/block
parent55c8672c2e65276c19edd3323076518248730cca (diff)
downloadqemu-fc3e493bc8e96ef4bf7ae4f035f43cb39382c936.zip
qemu-fc3e493bc8e96ef4bf7ae4f035f43cb39382c936.tar.gz
qemu-fc3e493bc8e96ef4bf7ae4f035f43cb39382c936.tar.bz2
xen_disk: treat "vhd" as "vpc"
The Xen toolstack uses "vhd" to specify a disk in VHD format, however the name of the driver in QEMU is "vpc". Replace "vhd" with "vpc", so that QEMU can find the right driver to use for it. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'hw/block')
-rw-r--r--hw/block/xen_disk.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index 8146650..a48e726 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -825,6 +825,9 @@ static int blk_init(struct XenDevice *xendev)
if (!strcmp("aio", blkdev->fileproto)) {
blkdev->fileproto = "raw";
}
+ if (!strcmp("vhd", blkdev->fileproto)) {
+ blkdev->fileproto = "vpc";
+ }
if (blkdev->mode == NULL) {
blkdev->mode = xenstore_read_be_str(&blkdev->xendev, "mode");
}