diff options
Diffstat (limited to 'block.c')
-rw-r--r-- | block.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1282,6 +1282,19 @@ void bdrv_flush_all(void) } } +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); + } + + return 1; +} + /* * Returns true iff the specified sector is present in the disk image. Drivers * not implementing the functionality are assumed to not support backing files, |