aboutsummaryrefslogtreecommitdiff
path: root/include/block
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2017-01-24 14:21:41 +0100
committerKevin Wolf <kwolf@redhat.com>2017-02-28 20:40:36 +0100
commit39829a01ae524788c68dc0794e6912faa898eb75 (patch)
tree782efad2d4de3a29885b310b50032b0f766890f3 /include/block
parentc62d32f503b37322a3960bad4cd4cdb69947d81e (diff)
block: Allow error return in BlockDevOps.change_media_cb()
Some devices allow a media change between read-only and read-write media. They need to adapt the permissions in their .change_media_cb() implementation, which can fail. So add an Error parameter to the function. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Acked-by: Fam Zheng <famz@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/block_int.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/block/block_int.h b/include/block/block_int.h
index 63d54460e5..e00d0f4c8c 100644
--- a/include/block/block_int.h
+++ b/include/block/block_int.h
@@ -891,7 +891,7 @@ void bdrv_format_default_perms(BlockDriverState *bs, BdrvChild *c,
uint64_t *nperm, uint64_t *nshared);
const char *bdrv_get_parent_name(const BlockDriverState *bs);
-void blk_dev_change_media_cb(BlockBackend *blk, bool load);
+void blk_dev_change_media_cb(BlockBackend *blk, bool load, Error **errp);
bool blk_dev_has_removable_media(BlockBackend *blk);
bool blk_dev_has_tray(BlockBackend *blk);
void blk_dev_eject_request(BlockBackend *blk, bool force);