From 205ef7961f781496366e0a93a4ec621ad3724bd7 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Thu, 21 Oct 2010 16:43:43 +0200 Subject: 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 Reviewed-by: Stefan Hajnoczi --- block/cow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'block/cow.c') diff --git a/block/cow.c b/block/cow.c index eedcc48772..4cf543c832 100644 --- a/block/cow.c +++ b/block/cow.c @@ -282,9 +282,9 @@ exit: return ret; } -static void cow_flush(BlockDriverState *bs) +static int cow_flush(BlockDriverState *bs) { - bdrv_flush(bs->file); + return bdrv_flush(bs->file); } static QEMUOptionParameter cow_create_options[] = { -- cgit v1.2.1