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.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'block.c') diff --git a/block.c b/block.c index c4d6814..a12be0b 100644 --- a/block.c +++ b/block.c @@ -1477,10 +1477,8 @@ int bdrv_has_zero_init(BlockDriverState *bs) { assert(bs->drv); - if (bs->drv->no_zero_init) { - return 0; - } else if (bs->file) { - return bdrv_has_zero_init(bs->file); + if (bs->drv->bdrv_has_zero_init) { + return bs->drv->bdrv_has_zero_init(bs); } return 1; -- cgit v1.1