summaryrefslogtreecommitdiff
path: root/include/block
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2014-10-22 14:09:27 +0200
committerKevin Wolf <kwolf@redhat.com>2014-10-23 15:34:01 +0200
commit9ebd84480583bb6d9a7666c079d99ff3266c423d (patch)
treeb067b93364dea1e291fac497fa9125a5f1d85302 /include/block
parentc5f7c0af473cadb8b0b5fc6d399e4ede1fc9408d (diff)
downloadqemu-9ebd84480583bb6d9a7666c079d99ff3266c423d.zip
block: Add qemu_{,try_}blockalign0()
These functions call their non-0-counterparts and then fill the allocated buffer with 0 (if the allocation has been successful). Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/block')
-rw-r--r--include/block/block.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/block/block.h b/include/block/block.h
index c9ec0ab386..341054dcf7 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -412,7 +412,9 @@ void bdrv_img_create(const char *filename, const char *fmt,
size_t bdrv_opt_mem_align(BlockDriverState *bs);
void bdrv_set_guest_block_size(BlockDriverState *bs, int align);
void *qemu_blockalign(BlockDriverState *bs, size_t size);
+void *qemu_blockalign0(BlockDriverState *bs, size_t size);
void *qemu_try_blockalign(BlockDriverState *bs, size_t size);
+void *qemu_try_blockalign0(BlockDriverState *bs, size_t size);
bool bdrv_qiov_is_aligned(BlockDriverState *bs, QEMUIOVector *qiov);
struct HBitmapIter;