diff options
author | Kevin Wolf | 2017-01-24 14:21:41 +0100 |
---|---|---|
committer | Kevin Wolf | 2017-02-28 20:40:36 +0100 |
commit | 39829a01ae524788c68dc0794e6912faa898eb75 (patch) | |
tree | 782efad2d4de3a29885b310b50032b0f766890f3 /hw/scsi | |
parent | block: Request real permissions in blk_new_open() (diff) | |
download | qemu-39829a01ae524788c68dc0794e6912faa898eb75.tar.gz qemu-39829a01ae524788c68dc0794e6912faa898eb75.tar.xz qemu-39829a01ae524788c68dc0794e6912faa898eb75.zip |
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 'hw/scsi')
-rw-r--r-- | hw/scsi/scsi-disk.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index 546acc7b62..c1ccfad1ee 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -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; |