[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] raw-posix: Fix bdrv_flush error return values
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH] raw-posix: Fix bdrv_flush error return values |
Date: |
Wed, 14 Sep 2011 11:23:34 +0200 |
bdrv_flush is supposed to use 0/-errno return values
Signed-off-by: Kevin Wolf <address@hidden>
---
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 a624f56..305998d 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
--
1.7.6
- [Qemu-devel] [PATCH] raw-posix: Fix bdrv_flush error return values,
Kevin Wolf <=