summaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2017-02-16 18:39:03 +0100
committerKevin Wolf <kwolf@redhat.com>2017-02-24 16:09:23 +0100
commit52cdbc5869a3fbbe4d91c83e97dffb212af28ce3 (patch)
tree73198d7c2deb39b1d04d7b4d29729198aa1a62f7 /block.c
parentbecc347e1ca6884b4bc74a0572d3206bee7fec13 (diff)
downloadqemu-52cdbc5869a3fbbe4d91c83e97dffb212af28ce3.zip
block: Pass BdrvChild to bdrv_truncate()
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block.c')
-rw-r--r--block.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/block.c b/block.c
index 743c349100..d951b5dc9e 100644
--- a/block.c
+++ b/block.c
@@ -2626,8 +2626,9 @@ exit:
/**
* Truncate file to 'offset' bytes (needed only for file protocols)
*/
-int bdrv_truncate(BlockDriverState *bs, int64_t offset)
+int bdrv_truncate(BdrvChild *child, int64_t offset)
{
+ BlockDriverState *bs = child->bs;
BlockDriver *drv = bs->drv;
int ret;
if (!drv)