diff options
author | Kevin Wolf <kwolf@redhat.com> | 2011-09-14 11:22:26 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2011-09-19 11:34:33 +0200 |
commit | 074abad3264bf2bb7cfd279b7457416b318716ca (patch) | |
tree | bb257a05a4617c80248567074437e0a5dd79e613 /block | |
parent | 973b3d0a7b2823f510e948283284f103ede43c49 (diff) |
raw-posix: Fix bdrv_flush error return values
bdrv_flush is supposed to use 0/-errno return values
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/raw-posix.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/block/raw-posix.c b/block/raw-posix.c index a624f56f86..305998ddb3 100644 --- a/block/raw-posix.c +++ b/block/raw-posix.c @@ -839,7 +839,14 @@ static int raw_create(const char *filename, QEMUOptionParameter *options) static int raw_flush(BlockDriverState *bs) { BDRVRawState *s = bs->opaque; - return qemu_fdatasync(s->fd); + int ret; + + ret = qemu_fdatasync(s->fd); + if (ret < 0) { + return -errno; + } + + return 0; } #ifdef CONFIG_XFS |