]> git.proxmox.com Git - mirror_qemu.git/commit
block: Allow error return in BlockDevOps.change_media_cb()
authorKevin Wolf <kwolf@redhat.com>
Tue, 24 Jan 2017 13:21:41 +0000 (14:21 +0100)
committerKevin Wolf <kwolf@redhat.com>
Tue, 28 Feb 2017 19:40:36 +0000 (20:40 +0100)
commit39829a01ae524788c68dc0794e6912faa898eb75
tree782efad2d4de3a29885b310b50032b0f766890f3
parentc62d32f503b37322a3960bad4cd4cdb69947d81e
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>
block/block-backend.c
blockdev.c
hw/block/fdc.c
hw/ide/core.c
hw/scsi/scsi-disk.c
hw/sd/sd.c
include/block/block_int.h
include/sysemu/block-backend.h