summaryrefslogtreecommitdiffstats
path: root/include/exec/ram_addr.h
diff options
context:
space:
mode:
authorHu Tao2014-09-09 07:27:54 +0200
committerPaolo Bonzini2014-09-09 13:41:25 +0200
commitef701d7b6f9e33cef11c823b140a0f93e150b27b (patch)
treed06f422bf8f59c7947fd0d6e7a1ddeed21312110 /include/exec/ram_addr.h
parentrules.mak: Fix DSO build by pulling in archive symbols (diff)
downloadqemu-ef701d7b6f9e33cef11c823b140a0f93e150b27b.tar.gz
qemu-ef701d7b6f9e33cef11c823b140a0f93e150b27b.tar.xz
qemu-ef701d7b6f9e33cef11c823b140a0f93e150b27b.zip
exec: add parameter errp to qemu_ram_alloc and qemu_ram_alloc_from_ptr
Add parameter errp to qemu_ram_alloc and qemu_ram_alloc_from_ptr so that we can handle errors. Signed-off-by: Hu Tao <hutao@cn.fujitsu.com> Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> [Assert ptr != NULL in memory_region_init_ram_ptr. - Paolo] Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/exec/ram_addr.h')
-rw-r--r--include/exec/ram_addr.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/exec/ram_addr.h b/include/exec/ram_addr.h
index 6593be1310..cf1d4c7e1f 100644
--- a/include/exec/ram_addr.h
+++ b/include/exec/ram_addr.h
@@ -26,8 +26,8 @@ ram_addr_t qemu_ram_alloc_from_file(ram_addr_t size, MemoryRegion *mr,
bool share, const char *mem_path,
Error **errp);
ram_addr_t qemu_ram_alloc_from_ptr(ram_addr_t size, void *host,
- MemoryRegion *mr);
-ram_addr_t qemu_ram_alloc(ram_addr_t size, MemoryRegion *mr);
+ MemoryRegion *mr, Error **errp);
+ram_addr_t qemu_ram_alloc(ram_addr_t size, MemoryRegion *mr, Error **errp);
int qemu_get_ram_fd(ram_addr_t addr);
void *qemu_get_ram_block_host_ptr(ram_addr_t addr);
void *qemu_get_ram_ptr(ram_addr_t addr);