diff options
author | Max Reitz | 2017-03-28 22:51:28 +0200 |
---|---|---|
committer | Max Reitz | 2017-04-28 16:02:03 +0200 |
commit | 4bff28b81a0ddb48a09d279e99ab847e8a292506 (patch) | |
tree | 5d792e847143ace016de670db3106a3d9466c10a /include/block | |
parent | block: Add errp to b{lk,drv}_truncate() (diff) | |
download | qemu-4bff28b81a0ddb48a09d279e99ab847e8a292506.tar.gz qemu-4bff28b81a0ddb48a09d279e99ab847e8a292506.tar.xz qemu-4bff28b81a0ddb48a09d279e99ab847e8a292506.zip |
block: Add errp to BD.bdrv_truncate()
Add an Error parameter to the block drivers' bdrv_truncate() interface.
If a block driver does not set this in case of an error, the generic
bdrv_truncate() implementation will do so.
Where it is obvious, this patch also makes some block drivers set this
value.
Signed-off-by: Max Reitz <mreitz@redhat.com>
Message-id: 20170328205129.15138-4-mreitz@redhat.com
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r-- | include/block/block_int.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h index 4f8cd29ae4..dcde90a5d3 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -196,7 +196,7 @@ struct BlockDriver { int coroutine_fn (*bdrv_co_flush_to_os)(BlockDriverState *bs); const char *protocol_name; - int (*bdrv_truncate)(BlockDriverState *bs, int64_t offset); + int (*bdrv_truncate)(BlockDriverState *bs, int64_t offset, Error **errp); int64_t (*bdrv_getlength)(BlockDriverState *bs); bool has_variable_length; |