summaryrefslogtreecommitdiff
path: root/block/raw-posix.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2010-10-21 16:43:43 +0200
committerKevin Wolf <kwolf@redhat.com>2010-11-04 12:52:16 +0100
commit205ef7961f781496366e0a93a4ec621ad3724bd7 (patch)
tree7c1861837185ba98074140dba8f03e65941c8c8c /block/raw-posix.c
parent5dba48a882c126ccc86db6506cfa6dcca97badab (diff)
downloadqemu-205ef7961f781496366e0a93a4ec621ad3724bd7.tar.gz
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>
Diffstat (limited to 'block/raw-posix.c')
-rw-r--r--block/raw-posix.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/raw-posix.c b/block/raw-posix.c
index d0393e0c44..d0960b85c4 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -734,10 +734,10 @@ static int raw_create(const char *filename, QEMUOptionParameter *options)
return result;
}
-static void raw_flush(BlockDriverState *bs)
+static int raw_flush(BlockDriverState *bs)
{
BDRVRawState *s = bs->opaque;
- qemu_fdatasync(s->fd);
+ return qemu_fdatasync(s->fd);
}