From 39829a01ae524788c68dc0794e6912faa898eb75 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Tue, 24 Jan 2017 14:21:41 +0100 Subject: 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 Reviewed-by: Max Reitz Acked-by: Fam Zheng --- hw/block/fdc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hw/block/fdc.c') diff --git a/hw/block/fdc.c b/hw/block/fdc.c index 74f3634..5f6c496 100644 --- a/hw/block/fdc.c +++ b/hw/block/fdc.c @@ -469,7 +469,7 @@ static void fd_revalidate(FDrive *drv) } } -static void fd_change_cb(void *opaque, bool load) +static void fd_change_cb(void *opaque, bool load, Error **errp) { FDrive *drive = opaque; -- cgit v1.1