summaryrefslogtreecommitdiff
path: root/block.c
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2010-07-28 11:26:29 +0200
committerKevin Wolf <kwolf@redhat.com>2010-08-03 16:39:53 +0200
commitada70b452236757a07df73e8ab44cb343c3ab2fe (patch)
tree00eedd3d781ac6061696a6ceba5623f7737872bb /block.c
parent8f6e28789faeac4f01f8dbfdac147a3d3b635f24 (diff)
downloadqemu-ada70b452236757a07df73e8ab44cb343c3ab2fe.tar.gz
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 <kwolf@redhat.com> (cherry picked from commit 336c1c12551ff0a6e1a2af226d6cbdbadd2e02b5)
Diffstat (limited to 'block.c')
-rw-r--r--block.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/block.c b/block.c
index 452ae94eea..40e78f9aea 100644
--- a/block.c
+++ b/block.c
@@ -1476,10 +1476,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;