aboutsummaryrefslogtreecommitdiff
path: root/memory_mapping.c
diff options
context:
space:
mode:
authorAndreas Färber <afaerber@suse.de>2013-05-28 13:52:01 +0200
committerAndreas Färber <afaerber@suse.de>2013-06-11 18:03:35 +0200
commita23bbfda75118eb738acce84afd64965934828f0 (patch)
tree657bf51b76711385cea7df8464d32bf7bd620f84 /memory_mapping.c
parent6d4d3ae77dbb756d454c2deb2ef844b0cc7bde7b (diff)
downloadqemu-a23bbfda75118eb738acce84afd64965934828f0.zip
qemu-a23bbfda75118eb738acce84afd64965934828f0.tar.gz
qemu-a23bbfda75118eb738acce84afd64965934828f0.tar.bz2
cpu: Turn cpu_get_memory_mapping() into a CPUState hook
Change error reporting from return value to Error argument. Reviewed-by: Jens Freimann <jfrei@linux.vnet.ibm.com> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> [AF: Fixed cpu_get_memory_mapping() documentation] Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'memory_mapping.c')
-rw-r--r--memory_mapping.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/memory_mapping.c b/memory_mapping.c
index 0790aac..9bd24ce 100644
--- a/memory_mapping.c
+++ b/memory_mapping.c
@@ -183,13 +183,14 @@ int qemu_get_guest_memory_mapping(MemoryMappingList *list)
CPUArchState *env, *first_paging_enabled_cpu;
RAMBlock *block;
ram_addr_t offset, length;
- int ret;
first_paging_enabled_cpu = find_paging_enabled_cpu(first_cpu);
if (first_paging_enabled_cpu) {
for (env = first_paging_enabled_cpu; env != NULL; env = env->next_cpu) {
- ret = cpu_get_memory_mapping(list, env);
- if (ret < 0) {
+ Error *err = NULL;
+ cpu_get_memory_mapping(ENV_GET_CPU(env), list, &err);
+ if (err) {
+ error_free(err);
return -1;
}
}