mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
block: Allow bdrv_flush to return errors
This changes bdrv_flush to return 0 on success and -errno in case of failure. It's a requirement for implementing proper error handle in users of bdrv_flush. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
parent
5dba48a882
commit
205ef7961f
13 changed files with 45 additions and 25 deletions
|
@ -39,9 +39,9 @@ static void raw_close(BlockDriverState *bs)
|
|||
{
|
||||
}
|
||||
|
||||
static void raw_flush(BlockDriverState *bs)
|
||||
static int raw_flush(BlockDriverState *bs)
|
||||
{
|
||||
bdrv_flush(bs->file);
|
||||
return bdrv_flush(bs->file);
|
||||
}
|
||||
|
||||
static BlockDriverAIOCB *raw_aio_flush(BlockDriverState *bs,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue