summaryrefslogtreecommitdiff
path: root/hw/sd
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 /hw/sd
parentc62d32f503b37322a3960bad4cd4cdb69947d81e (diff)
downloadqemu-39829a01ae524788c68dc0794e6912faa898eb75.tar.gz
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/sd')
-rw-r--r--hw/sd/sd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 8e88e8311a..8e31491089 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -458,7 +458,7 @@ static bool sd_get_readonly(SDState *sd)
return sd->wp_switch;
}
-static void sd_cardchange(void *opaque, bool load)
+static void sd_cardchange(void *opaque, bool load, Error **errp)
{
SDState *sd = opaque;
DeviceState *dev = DEVICE(sd);