Received: from eggs.gnu.org ([2001:4830:134:3::10]:48632) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXAtP-0005FE-OR for qemu-devel@nongnu.org; Fri, 18 Oct 2013 10:19:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VXAtI-00022G-RB for qemu-devel@nongnu.org; Fri, 18 Oct 2013 10:19:07 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59874) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VXAtI-000226-Ja for qemu-devel@nongnu.org; Fri, 18 Oct 2013 10:19:00 -0400 From: Stefan Hajnoczi Date: Fri, 18 Oct 2013 16:18:35 +0200 Message-Id: <1382105915-27735-8-git-send-email-stefanha@redhat.com> In-Reply-To: <1382105915-27735-1-git-send-email-stefanha@redhat.com> References: <1382105915-27735-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PULL 7/7] vmdk: fix VMFS extent parsing List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Fam Zheng , Stefan Hajnoczi , Anthony Liguori From: Fam Zheng The VMFS extent line in description file doesn't have start offset as FLAT lines does, and it should be defaulted to 0. The flat_offset variable is initialized to -1, so we need to set it in this case. Signed-off-by: Fam Zheng Signed-off-by: Stefan Hajnoczi --- block/vmdk.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/vmdk.c b/block/vmdk.c index b8901e2..32ec8b7 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -726,6 +726,8 @@ static int vmdk_parse_extents(const char *desc, BlockDriverState *bs, error_setg(errp, "Invalid extent lines: \n%s", p); return -EINVAL; } + } else if (!strcmp(type, "VMFS")) { + flat_offset = 0; } else if (ret != 4) { error_setg(errp, "Invalid extent lines: \n%s", p); return -EINVAL; -- 1.8.3.1