]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
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>
Mon, 18 Jan 2016 16:08:36 +0000 (16:08 +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.

upstream-commit-id: fc3e493bc8e96ef4bf7ae4f035f43cb39382c936

Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
hw/block/xen_disk.c

index 267d8a8c7070895a0a4707f7eba8839d7b5c42ed..37e14d1482e3b88c87dfcb1edf349bc864577b40 100644 (file)
@@ -811,6 +811,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");
     }