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>
This commit is contained in:
Stefano Stabellini 2015-12-04 14:41:02 +00:00
parent 55c8672c2e
commit fc3e493bc8
1 changed files with 3 additions and 0 deletions

View 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");
}