diff options
author | Fam Zheng <famz@redhat.com> | 2013-10-18 15:07:33 +0800 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2013-10-18 13:41:36 +0200 |
commit | dbbcaa8d4358fdf3c42bf01e9e2d687300e84770 (patch) | |
tree | 170268960b5523da51985c666c4ff73b869a7f97 /block/vmdk.c | |
parent | c338b6ad609699cf352c8dd6338360b7e3895ad0 (diff) |
vmdk: fix VMFS extent parsing
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 <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/vmdk.c')
-rw-r--r-- | block/vmdk.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/block/vmdk.c b/block/vmdk.c index b8901e272a..32ec8b7766 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; |