summaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
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)