mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
c62d32f503
commit
39829a01ae
8 changed files with 36 additions and 15 deletions
|
@ -2240,7 +2240,7 @@ static void scsi_disk_resize_cb(void *opaque)
|
|||
}
|
||||
}
|
||||
|
||||
static void scsi_cd_change_media_cb(void *opaque, bool load)
|
||||
static void scsi_cd_change_media_cb(void *opaque, bool load, Error **errp)
|
||||
{
|
||||
SCSIDiskState *s = opaque;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue