summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2010-10-22 16:17:57 +0200
committerKevin Wolf <kwolf@redhat.com>2010-11-04 12:52:16 +0100
commit87d315f27efa583d617d24a758d54ec18ef81667 (patch)
treeded1b41060cb16df4428f490e80881d6b494c099
parent923b13aea2ad06480d3e0e93b39c7a354d0a5296 (diff)
downloadqemu-87d315f27efa583d617d24a758d54ec18ef81667.tar.gz
qemu-87d315f27efa583d617d24a758d54ec18ef81667.tar.bz2
qemu-87d315f27efa583d617d24a758d54ec18ef81667.zip
vpc: Implement bdrv_flush
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r--block/vpc.c21
1 files changed, 13 insertions, 8 deletions
diff --git a/block/vpc.c b/block/vpc.c
index e50509eeaa..416f48900c 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -439,6 +439,10 @@ static int vpc_write(BlockDriverState *bs, int64_t sector_num,
return 0;
}
+static int vpc_flush(BlockDriverState *bs)
+{
+ return bdrv_flush(bs->file);
+}
/*
* Calculates the number of cylinders, heads and sectors per cylinder
@@ -618,14 +622,15 @@ static QEMUOptionParameter vpc_create_options[] = {
};
static BlockDriver bdrv_vpc = {
- .format_name = "vpc",
- .instance_size = sizeof(BDRVVPCState),
- .bdrv_probe = vpc_probe,
- .bdrv_open = vpc_open,
- .bdrv_read = vpc_read,
- .bdrv_write = vpc_write,
- .bdrv_close = vpc_close,
- .bdrv_create = vpc_create,
+ .format_name = "vpc",
+ .instance_size = sizeof(BDRVVPCState),
+ .bdrv_probe = vpc_probe,
+ .bdrv_open = vpc_open,
+ .bdrv_read = vpc_read,
+ .bdrv_write = vpc_write,
+ .bdrv_flush = vpc_flush,
+ .bdrv_close = vpc_close,
+ .bdrv_create = vpc_create,
.create_options = vpc_create_options,
};