aboutsummaryrefslogtreecommitdiff
path: root/block/raw-posix.c
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2011-09-20 15:21:03 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2011-09-20 15:21:03 -0500
commitc8af89af96dac46922f6664cf0ca238a6b1adf0d (patch)
tree1f484f739ba85f5f9d71c3128abcbf99108a8c7c /block/raw-posix.c
parent39ba59c21bdc3b1dda09219919b87fe001e7d5d9 (diff)
parent16a06b24306b5733a4ef2e585964838e47735a54 (diff)
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Diffstat (limited to 'block/raw-posix.c')
-rw-r--r--block/raw-posix.c9
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