[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/20] raw-posix: Fix bdrv_flush error return values
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 04/20] raw-posix: Fix bdrv_flush error return values |
Date: |
Tue, 20 Sep 2011 13:11:36 +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.2
- [Qemu-devel] [PULL 00/20] Block patches, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 03/20] nbd: support NBD_SET_FLAGS ioctl, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 01/20] nbd: support feature negotiation, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 02/20] nbd: sync API definitions with upstream, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 08/20] dma-helpers: rewrite completion/cancellation, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 05/20] scsi-generic: do not disable FUA, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 07/20] dma-helpers: allow including from target-independent code, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 06/20] dma-helpers: rename is_write to to_dev, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 11/20] VMDK: fix leak of extent_file, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 09/20] scsi-disk: commonize iovec creation between reads and writes, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 04/20] raw-posix: Fix bdrv_flush error return values,
Kevin Wolf <=
- [Qemu-devel] [PATCH 12/20] posix-aio-compat: Removed unused offset variable, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 10/20] scsi-disk: lazily allocate bounce buffer, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 16/20] rbd: call flush, if available, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 13/20] AHCI Port Interrupt Enable register cleaning on soft reset, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 14/20] rbd: ignore failures when reading from default conf location, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 18/20] block: avoid SIGUSR2, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 17/20] scsi: fix sign extension problems, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 15/20] rbd: update comment heading, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 19/20] linux-aio: remove process requests callback, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 20/20] rbd: allow escaping in config string, Kevin Wolf, 2011/09/20