mirror of https://github.com/xemu-project/xemu.git
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>
This commit is contained in:
parent
c338b6ad60
commit
dbbcaa8d43
|
@ -726,6 +726,8 @@ static int vmdk_parse_extents(const char *desc, BlockDriverState *bs,
|
||||||
error_setg(errp, "Invalid extent lines: \n%s", p);
|
error_setg(errp, "Invalid extent lines: \n%s", p);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
} else if (!strcmp(type, "VMFS")) {
|
||||||
|
flat_offset = 0;
|
||||||
} else if (ret != 4) {
|
} else if (ret != 4) {
|
||||||
error_setg(errp, "Invalid extent lines: \n%s", p);
|
error_setg(errp, "Invalid extent lines: \n%s", p);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
Loading…
Reference in New Issue