From 336c1c12551ff0a6e1a2af226d6cbdbadd2e02b5 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Wed, 28 Jul 2010 11:26:29 +0200 Subject: block: Fix bdrv_has_zero_init Assuming that any image on a block device is not properly zero-initialized is actually wrong: Only raw images have this problem. Any other image format shouldn't care about it, they initialize everything properly themselves. Signed-off-by: Kevin Wolf --- block/raw-win32.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'block/raw-win32.c') diff --git a/block/raw-win32.c b/block/raw-win32.c index 745bbde673..503ed3959a 100644 --- a/block/raw-win32.c +++ b/block/raw-win32.c @@ -394,6 +394,11 @@ static int raw_set_locked(BlockDriverState *bs, int locked) } #endif +static int hdev_has_zero_init(BlockDriverState *bs) +{ + return 0; +} + static BlockDriver bdrv_host_device = { .format_name = "host_device", .protocol_name = "host_device", @@ -402,6 +407,7 @@ static BlockDriver bdrv_host_device = { .bdrv_file_open = hdev_open, .bdrv_close = raw_close, .bdrv_flush = raw_flush, + .bdrv_has_zero_init = hdev_has_zero_init, .bdrv_read = raw_read, .bdrv_write = raw_write, -- cgit v1.2.1