projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
973b3d0
)
raw-posix: Fix bdrv_flush error return values
author
Kevin Wolf
<kwolf@redhat.com>
Wed, 14 Sep 2011 09:22:26 +0000
(11:22 +0200)
committer
Kevin Wolf
<kwolf@redhat.com>
Mon, 19 Sep 2011 09:34:33 +0000
(11:34 +0200)
bdrv_flush is supposed to use 0/-errno return values
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/raw-posix.c
patch
|
blob
|
history
diff --git
a/block/raw-posix.c
b/block/raw-posix.c
index a624f56f8680a8f147c237492a8bafeae61b3d98..305998ddb3b52259f79be3c760e270021109aab0 100644
(file)
--- 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