From 33e0eb5297883444f784a7c22bcf30550a30d601 Mon Sep 17 00:00:00 2001 From: Hu Tao Date: Tue, 9 Sep 2014 13:27:57 +0800 Subject: memory: add parameter errp to memory_region_init_rom_device Add parameter errp to memory_region_init_rom_device and update all call sites to propagate the error. Reviewed-by: Peter Crosthwaite Signed-off-by: Hu Tao [Propagate the error out of realize. - Paolo] Signed-off-by: Paolo Bonzini --- include/exec/memory.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/exec') diff --git a/include/exec/memory.h b/include/exec/memory.h index fd4131b5f6..072aad2239 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -386,13 +386,15 @@ void memory_region_init_alias(MemoryRegion *mr, * @ops: callbacks for write access handling. * @name: the name of the region. * @size: size of the region. + * @errp: pointer to Error*, to store an error if it happens. */ void memory_region_init_rom_device(MemoryRegion *mr, struct Object *owner, const MemoryRegionOps *ops, void *opaque, const char *name, - uint64_t size); + uint64_t size, + Error **errp); /** * memory_region_init_reservation: Initialize a memory region that reserves -- cgit v1.2.3