@@ -143,7 +143,7 @@ int bdrv_get_flags(BlockDriverState *bs);
bool coroutine_fn bdrv_co_is_inserted(BlockDriverState *bs);
bool co_wrapper bdrv_is_inserted(BlockDriverState *bs);
-void bdrv_lock_medium(BlockDriverState *bs, bool locked);
+void coroutine_fn bdrv_co_lock_medium(BlockDriverState *bs, bool locked);
void coroutine_fn bdrv_co_eject(BlockDriverState *bs, bool eject_flag);
const char *bdrv_get_format_name(BlockDriverState *bs);
@@ -712,7 +712,7 @@ struct BlockDriver {
/* removable device specific */
bool coroutine_fn (*bdrv_is_inserted)(BlockDriverState *bs);
void coroutine_fn (*bdrv_eject)(BlockDriverState *bs, bool eject_flag);
- void (*bdrv_lock_medium)(BlockDriverState *bs, bool locked);
+ void coroutine_fn (*bdrv_lock_medium)(BlockDriverState *bs, bool locked);
/* to control generic scsi devices */
BlockAIOCB *(*bdrv_aio_ioctl)(BlockDriverState *bs,
@@ -58,7 +58,9 @@ bool coroutine_fn blk_co_is_inserted(BlockBackend *blk);
bool co_wrapper_mixed blk_is_inserted(BlockBackend *blk);
bool blk_is_available(BlockBackend *blk);
-void blk_lock_medium(BlockBackend *blk, bool locked);
+
+void coroutine_fn blk_co_lock_medium(BlockBackend *blk, bool locked);
+void co_wrapper blk_lock_medium(BlockBackend *blk, bool locked);
void coroutine_fn blk_co_eject(BlockBackend *blk, bool eject_flag);
void co_wrapper blk_eject(BlockBackend *blk, bool eject_flag);
@@ -6834,7 +6834,7 @@ void coroutine_fn bdrv_co_eject(BlockDriverState *bs, bool eject_flag)
* Lock or unlock the media (if it is locked, the user won't be able
* to eject it manually).
*/
-void bdrv_lock_medium(BlockDriverState *bs, bool locked)
+void coroutine_fn bdrv_co_lock_medium(BlockDriverState *bs, bool locked)
{
BlockDriver *drv = bs->drv;
IO_CODE();
@@ -1999,13 +1999,13 @@ bool blk_is_available(BlockBackend *blk)
return blk_is_inserted(blk) && !blk_dev_is_tray_open(blk);
}
-void blk_lock_medium(BlockBackend *blk, bool locked)
+void coroutine_fn blk_co_lock_medium(BlockBackend *blk, bool locked)
{
BlockDriverState *bs = blk_bs(blk);
IO_CODE();
if (bs) {
- bdrv_lock_medium(bs, locked);
+ bdrv_co_lock_medium(bs, locked);
}
}
@@ -224,7 +224,7 @@ static void cor_eject(BlockDriverState *bs, bool eject_flag)
static void cor_lock_medium(BlockDriverState *bs, bool locked)
{
- bdrv_lock_medium(bs->file->bs, locked);
+ bdrv_co_lock_medium(bs->file->bs, locked);
}
@@ -124,7 +124,7 @@ static void compress_eject(BlockDriverState *bs, bool eject_flag)
static void compress_lock_medium(BlockDriverState *bs, bool locked)
{
- bdrv_lock_medium(bs->file->bs, locked);
+ bdrv_co_lock_medium(bs->file->bs, locked);
}
@@ -410,7 +410,7 @@ static void raw_eject(BlockDriverState *bs, bool eject_flag)
static void raw_lock_medium(BlockDriverState *bs, bool locked)
{
- bdrv_lock_medium(bs->file->bs, locked);
+ bdrv_co_lock_medium(bs->file->bs, locked);
}
static int coroutine_fn raw_co_ioctl(BlockDriverState *bs,