aboutsummaryrefslogtreecommitdiff
path: root/include/block/block.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2014-05-20 12:24:05 +0200
committerKevin Wolf <kwolf@redhat.com>2014-08-15 15:07:15 +0200
commit7d2a35cc921ea4832083a7e8598461868bb538ce (patch)
tree0aabab68f9ae59485bba04d9fe374ed0e603af1e /include/block/block.h
parent23d20b5b4fb7bde102e6779b7a13b88375e4db66 (diff)
block: Introduce qemu_try_blockalign()
This function returns NULL instead of aborting when an allocation fails. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Benoit Canet <benoit@irqsave.net>
Diffstat (limited to 'include/block/block.h')
-rw-r--r--include/block/block.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/block/block.h b/include/block/block.h
index d4c816d738..e94b701667 100644
--- a/include/block/block.h
+++ b/include/block/block.h
@@ -455,6 +455,7 @@ 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_try_blockalign(BlockDriverState *bs, size_t size);
bool bdrv_qiov_is_aligned(BlockDriverState *bs, QEMUIOVector *qiov);
struct HBitmapIter;