[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 70/71] vmdk: false positive of compat6 with hwversion
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 70/71] vmdk: false positive of compat6 with hwversion not set |
Date: |
Mon, 25 Feb 2019 16:20:52 +0100 |
From: yuchenlin <address@hidden>
In vmdk_co_create_opts, when it finds hw_version is undefined, it will
set it to 4, which misleading the compat6 and hwversion in
vmdk_co_do_create. Simply set hw_version to NULL after free, let
the logic in vmdk_co_do_create to decide the value of hw_version.
This bug can be reproduced by:
$ qemu-img convert -O vmdk -o subformat=streamOptimized,compat6
/home/yuchenlin/syno.qcow2 /home/yuchenlin/syno.vmdk
qemu-img: /home/yuchenlin/syno.vmdk: error while converting vmdk:
compat6 cannot be enabled with hwversion set
Signed-off-by: yuchenlin <address@hidden>
Message-id: address@hidden
Signed-off-by: Max Reitz <address@hidden>
---
block/vmdk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/vmdk.c b/block/vmdk.c
index 91345babb5..f4e68aa00b 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -2267,7 +2267,7 @@ static int coroutine_fn vmdk_co_create_opts(const char
*filename, QemuOpts *opts
compat6 = qemu_opt_get_bool_del(opts, BLOCK_OPT_COMPAT6, false);
if (strcmp(hw_version, "undefined") == 0) {
g_free(hw_version);
- hw_version = g_strdup("4");
+ hw_version = NULL;
}
fmt = qemu_opt_get_del(opts, BLOCK_OPT_SUBFMT);
zeroed_grain = qemu_opt_get_bool_del(opts, BLOCK_OPT_ZEROED_GRAIN, false);
--
2.20.1
- [Qemu-devel] [PULL 59/71] iotests: Fix 237 for Python 2.x, (continued)
- [Qemu-devel] [PULL 59/71] iotests: Fix 237 for Python 2.x, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 60/71] iotests: Remove superfluous rm from 232, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 57/71] iotests: Test json:{} filenames of internal BDSs, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 61/71] iotests: Fix 232 for LUKS, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 62/71] iotests: Fix 207 to use QMP filters for qmp_log, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 63/71] iotests.py: Add is_str(), Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 65/71] iotests: Filter SSH paths, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 64/71] iotests.py: Filter filename in any string value, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 66/71] iotests: Let 045 be run concurrently, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 69/71] iotests: add LUKS payload overhead to 178 qemu-img measure test, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 70/71] vmdk: false positive of compat6 with hwversion not set,
Kevin Wolf <=
- [Qemu-devel] [PULL 68/71] qcow2: include LUKS payload overhead in qemu-img measure, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 71/71] iotests: Skip 211 on insufficient memory, Kevin Wolf, 2019/02/25
- [Qemu-devel] [PULL 67/71] iotests.py: s/_/-/g on keys in qmp_log(), Kevin Wolf, 2019/02/25
- Re: [Qemu-devel] [PULL 00/71] Block layer patches, no-reply, 2019/02/27
- Re: [Qemu-devel] [PULL 00/71] Block layer patches, Peter Maydell, 2019/02/28