summaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorAlberto Faria2022-10-13 14:37:09 +0200
committerKevin Wolf2022-10-27 20:14:11 +0200
commiteb342749c0cc8002fc19a5589fb5c3d836118185 (patch)
tree791933f20d47bad890647053a6faf0e75b3f7bb1 /block
parentvdi: switch to *_co_* functions (diff)
downloadqemu-eb342749c0cc8002fc19a5589fb5c3d836118185.tar.gz
qemu-eb342749c0cc8002fc19a5589fb5c3d836118185.tar.xz
qemu-eb342749c0cc8002fc19a5589fb5c3d836118185.zip
vhdx: switch to *_co_* functions
Signed-off-by: Alberto Faria <afaria@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20221013123711.620631-23-pbonzini@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r--block/vhdx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/block/vhdx.c b/block/vhdx.c
index ce1e75f5ec..a41db46294 100644
--- a/block/vhdx.c
+++ b/block/vhdx.c
@@ -2011,15 +2011,15 @@ static int coroutine_fn vhdx_co_create(BlockdevCreateOptions *opts,
creator = g_utf8_to_utf16("QEMU v" QEMU_VERSION, -1, NULL,
&creator_items, NULL);
signature = cpu_to_le64(VHDX_FILE_SIGNATURE);
- ret = blk_pwrite(blk, VHDX_FILE_ID_OFFSET, sizeof(signature), &signature,
- 0);
+ ret = blk_co_pwrite(blk, VHDX_FILE_ID_OFFSET, sizeof(signature), &signature,
+ 0);
if (ret < 0) {
error_setg_errno(errp, -ret, "Failed to write file signature");
goto delete_and_exit;
}
if (creator) {
- ret = blk_pwrite(blk, VHDX_FILE_ID_OFFSET + sizeof(signature),
- creator_items * sizeof(gunichar2), creator, 0);
+ ret = blk_co_pwrite(blk, VHDX_FILE_ID_OFFSET + sizeof(signature),
+ creator_items * sizeof(gunichar2), creator, 0);
if (ret < 0) {
error_setg_errno(errp, -ret, "Failed to write creator field");
goto delete_and_exit;