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>
This commit is contained in:
Kevin Wolf 2011-09-14 11:22:26 +02:00
parent 973b3d0a7b
commit 074abad326

View File

@ -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