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_int.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'block_int.h') diff --git a/block_int.h b/block_int.h index f075a8cba..7d5e7515d 100644 --- a/block_int.h +++ b/block_int.h @@ -127,8 +127,11 @@ struct BlockDriver { void (*bdrv_debug_event)(BlockDriverState *bs, BlkDebugEvent event); - /* Set if newly created images are not guaranteed to contain only zeros */ - int no_zero_init; + /* + * Returns 1 if newly created images are guaranteed to contain only + * zeros, 0 otherwise. + */ + int (*bdrv_has_zero_init)(BlockDriverState *bs); QLIST_ENTRY(BlockDriver) list; }; -- cgit v1.2.3