xen_disk: treat "vhd" as "vpc"
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 4 Dec 2015 14:41:02 +0000 (14:41 +0000)
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>
Fri, 11 Dec 2015 17:02:37 +0000 (17:02 +0000)
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>
hw/block/xen_disk.c

index 814665034d8cd144230e5632f57afe5cde148ae3..a48e726f4a158f6494159adeec11c9456a2ec6a6 100644 (file)
@@ -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");
     }