提交 074abad3 编写于 作者: K Kevin Wolf

raw-posix: Fix bdrv_flush error return values

bdrv_flush is supposed to use 0/-errno return values
Signed-off-by: NKevin Wolf <kwolf@redhat.com>
上级 973b3d0a
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册