diff options
| author | Fam Zheng | 2013-10-18 09:07:33 +0200 |
|---|---|---|
| committer | Stefan Hajnoczi | 2013-10-18 13:41:36 +0200 |
| commit | dbbcaa8d4358fdf3c42bf01e9e2d687300e84770 (patch) | |
| tree | 170268960b5523da51985c666c4ff73b869a7f97 | |
| parent | vmdk: Only read cid from image file when opening (diff) | |
| download | qemu-dbbcaa8d4358fdf3c42bf01e9e2d687300e84770.tar.gz qemu-dbbcaa8d4358fdf3c42bf01e9e2d687300e84770.tar.xz qemu-dbbcaa8d4358fdf3c42bf01e9e2d687300e84770.zip | |
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>
| -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; |
