aboutsummaryrefslogtreecommitdiff
path: root/block/raw.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 15:57:22 +0200
commit336c1c12551ff0a6e1a2af226d6cbdbadd2e02b5 (patch)
tree0f5945db7be86283562c5d86abf3eb36cb4d695c /block/raw.c
parentbd0858bb460c0c134e9a62c73e60e465037b1240 (diff)
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>
Diffstat (limited to 'block/raw.c')
-rw-r--r--block/raw.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/block/raw.c b/block/raw.c
index 1414e777b3..61e674856d 100644
--- a/block/raw.c
+++ b/block/raw.c
@@ -237,6 +237,11 @@ static QEMUOptionParameter raw_create_options[] = {
{ NULL }
};
+static int raw_has_zero_init(BlockDriverState *bs)
+{
+ return bdrv_has_zero_init(bs->file);
+}
+
static BlockDriver bdrv_raw = {
.format_name = "raw",
@@ -264,6 +269,7 @@ static BlockDriver bdrv_raw = {
.bdrv_create = raw_create,
.create_options = raw_create_options,
+ .bdrv_has_zero_init = raw_has_zero_init,
};
static void bdrv_raw_init(void)