mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
block: bdrv_create_file is a coroutine_fn
It is always called in coroutine_fn callbacks, therefore it can directly call bdrv_co_create(). Rename it to bdrv_co_create_file too. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Message-Id: <20221128142337.657646-9-eesposit@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
parent
84bdf21f97
commit
2475a0d0f4
12 changed files with 16 additions and 14 deletions
5
block.c
5
block.c
|
@ -719,7 +719,8 @@ out:
|
|||
return ret;
|
||||
}
|
||||
|
||||
int bdrv_create_file(const char *filename, QemuOpts *opts, Error **errp)
|
||||
int coroutine_fn bdrv_co_create_file(const char *filename, QemuOpts *opts,
|
||||
Error **errp)
|
||||
{
|
||||
QemuOpts *protocol_opts;
|
||||
BlockDriver *drv;
|
||||
|
@ -760,7 +761,7 @@ int bdrv_create_file(const char *filename, QemuOpts *opts, Error **errp)
|
|||
goto out;
|
||||
}
|
||||
|
||||
ret = bdrv_create(drv, filename, protocol_opts, errp);
|
||||
ret = bdrv_co_create(drv, filename, protocol_opts, errp);
|
||||
out:
|
||||
qemu_opts_del(protocol_opts);
|
||||
qobject_unref(qdict);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue