mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-24 12:09:58 +00:00
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:
parent
973b3d0a7b
commit
074abad326
@ -839,7 +839,14 @@ static int raw_create(const char *filename, QEMUOptionParameter *options)
|
|||||||
static int raw_flush(BlockDriverState *bs)
|
static int raw_flush(BlockDriverState *bs)
|
||||||
{
|
{
|
||||||
BDRVRawState *s = bs->opaque;
|
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
|
#ifdef CONFIG_XFS
|
||||||
|
Loading…
Reference in New Issue
Block a user