qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] vmdk: fix VMFS extent parsing


From: Fam Zheng
Subject: [Qemu-devel] [PATCH] vmdk: fix VMFS extent parsing
Date: Fri, 18 Oct 2013 15:07:33 +0800

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 <address@hidden>
---
 block/vmdk.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/block/vmdk.c b/block/vmdk.c
index 5a9f278..5ef46f5 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -728,6 +728,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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]