mirror of
https://github.com/mborgerson/xemu.git
synced 2025-12-01 16:10:01 +00:00
block-backend: inline bdrv_co_get_geometry
bdrv_co_get_geometry is only used in blk_co_get_geometry. Inline it in there, to reduce the number of wrappers for bs->total_sectors. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20230407153303.391121-7-pbonzini@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
committed by
Kevin Wolf
parent
2c5451ca52
commit
e5203a3b5d
10
block.c
10
block.c
@ -5879,16 +5879,6 @@ int64_t coroutine_fn bdrv_co_getlength(BlockDriverState *bs)
|
||||
return ret * BDRV_SECTOR_SIZE;
|
||||
}
|
||||
|
||||
/* return 0 as number of sectors if no device present or error */
|
||||
void coroutine_fn bdrv_co_get_geometry(BlockDriverState *bs,
|
||||
uint64_t *nb_sectors_ptr)
|
||||
{
|
||||
int64_t nb_sectors = bdrv_co_nb_sectors(bs);
|
||||
IO_CODE();
|
||||
|
||||
*nb_sectors_ptr = nb_sectors < 0 ? 0 : nb_sectors;
|
||||
}
|
||||
|
||||
bool bdrv_is_sg(BlockDriverState *bs)
|
||||
{
|
||||
IO_CODE();
|
||||
|
||||
Reference in New Issue
Block a user