diff options
author | Kevin Wolf <kwolf@redhat.com> | 2016-05-31 14:42:08 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2016-07-05 16:46:27 +0200 |
commit | 18d51c4bac9d96302035de0faa11e3df98358f45 (patch) | |
tree | 729e91be407f51a7f9765e4c366b2d9fea6a4a6c /block/io.c | |
parent | fbcbbf4e80a57298c605f4a2b486280d70c69d00 (diff) |
block: Convert bdrv_write() to BdrvChild
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'block/io.c')
-rw-r--r-- | block/io.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/block/io.c b/block/io.c index 6dfc0ebb55..2e04a80010 100644 --- a/block/io.c +++ b/block/io.c @@ -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, |