From patchwork Fri Dec 4 14:41:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 552731 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id F11F014017E for ; Sat, 5 Dec 2015 01:42:58 +1100 (AEDT) Received: from localhost ([::1]:41342 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4rZY-0006VH-Nk for incoming@patchwork.ozlabs.org; Fri, 04 Dec 2015 09:42:56 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46543) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4rYI-0004iE-UC for qemu-devel@nongnu.org; Fri, 04 Dec 2015 09:41:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a4rYE-0001R3-Kr for qemu-devel@nongnu.org; Fri, 04 Dec 2015 09:41:38 -0500 Received: from smtp.citrix.com ([66.165.176.89]:34093) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a4rYE-0001Q7-Ga; Fri, 04 Dec 2015 09:41:34 -0500 X-IronPort-AV: E=Sophos;i="5.20,380,1444694400"; d="scan'208";a="316613880" Date: Fri, 4 Dec 2015 14:41:02 +0000 From: Stefano Stabellini X-X-Sender: sstabellini@kaball.uk.xensource.com To: Message-ID: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 X-DLP: MIA1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.89 Cc: kwolf@redhat.com, qemu-devel@nongnu.org, qemu-block@nongnu.org, Stefano Stabellini Subject: [Qemu-devel] [PATCH] xen_disk: treat "vhd" as "vpc" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 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 diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c index 267d8a8..37e14d1 100644 --- a/hw/block/xen_disk.c +++ b/hw/block/xen_disk.c @@ -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"); }