Skip to contentSkip to conversation

xen_disk: treat "vhd" as "vpc"

PATCH New Stefano Stabellini 1 participant 1 message Dec 4, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

hw/block/xen_disk.c +3 -0
index 267d8a8..37e14d1 100644
@@ -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");
     }