diff options
author | Max Reitz <mreitz@redhat.com> | 2017-03-28 22:51:27 +0200 |
---|---|---|
committer | Michael Roth <mdroth@linux.vnet.ibm.com> | 2017-08-03 14:29:55 -0500 |
commit | 5797a36abd2069232c39c7acd57a34220fe11d21 (patch) | |
tree | cf3a574f0cef35438e48d8e45f2985f98af92ea2 /include/block/block.h | |
parent | 73aa7ad7d2249a602a93b6c2a8ecbd57bacbc482 (diff) | |
download | qemu-5797a36abd2069232c39c7acd57a34220fe11d21.zip qemu-5797a36abd2069232c39c7acd57a34220fe11d21.tar.gz qemu-5797a36abd2069232c39c7acd57a34220fe11d21.tar.bz2 |
block: Add errp to b{lk,drv}_truncate()
For one thing, this allows us to drop the error message generation from
qemu-img.c and blockdev.c and instead have it unified in
bdrv_truncate().
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 20170328205129.15138-3-mreitz@redhat.com
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
(cherry picked from commit ed3d2ec98a33fbdeabc471b11ff807075f07e996)
* prereq for 698bdfa
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Diffstat (limited to 'include/block/block.h')
-rw-r--r-- | include/block/block.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/block/block.h b/include/block/block.h index 5ddc0cf..4bf4843 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -294,7 +294,7 @@ BlockDriverState *bdrv_find_backing_image(BlockDriverState *bs, const char *backing_file); int bdrv_get_backing_file_depth(BlockDriverState *bs); void bdrv_refresh_filename(BlockDriverState *bs); -int bdrv_truncate(BdrvChild *child, int64_t offset); +int bdrv_truncate(BdrvChild *child, int64_t offset, Error **errp); int64_t bdrv_nb_sectors(BlockDriverState *bs); int64_t bdrv_getlength(BlockDriverState *bs); int64_t bdrv_get_allocated_file_size(BlockDriverState *bs); |