mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 08:13:54 -06:00
block: Convert bdrv_write() to BdrvChild
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
fbcbbf4e80
commit
18d51c4bac
8 changed files with 100 additions and 12 deletions
|
@ -642,10 +642,11 @@ int bdrv_read(BdrvChild *child, int64_t sector_num,
|
|||
-EINVAL Invalid sector number or nb_sectors
|
||||
-EACCES Trying to write a read-only device
|
||||
*/
|
||||
int bdrv_write(BlockDriverState *bs, int64_t sector_num,
|
||||
int bdrv_write(BdrvChild *child, int64_t sector_num,
|
||||
const uint8_t *buf, int nb_sectors)
|
||||
{
|
||||
return bdrv_rw_co(bs, sector_num, (uint8_t *)buf, nb_sectors, true, 0);
|
||||
return bdrv_rw_co(child->bs, sector_num, (uint8_t *)buf, nb_sectors,
|
||||
true, 0);
|
||||
}
|
||||
|
||||
int bdrv_pwrite_zeroes(BlockDriverState *bs, int64_t offset,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue