mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
memory: follow Error API guidelines
Return true/false on success/failure. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: David Hildenbrand <david@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20231009075310.153617-1-marcandre.lureau@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
47538e44d6
commit
8a5b974b98
7 changed files with 19 additions and 16 deletions
|
@ -34,17 +34,17 @@ bool cpu_paging_enabled(const CPUState *cpu)
|
|||
return false;
|
||||
}
|
||||
|
||||
void cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list,
|
||||
bool cpu_get_memory_mapping(CPUState *cpu, MemoryMappingList *list,
|
||||
Error **errp)
|
||||
{
|
||||
CPUClass *cc = CPU_GET_CLASS(cpu);
|
||||
|
||||
if (cc->sysemu_ops->get_memory_mapping) {
|
||||
cc->sysemu_ops->get_memory_mapping(cpu, list, errp);
|
||||
return;
|
||||
return cc->sysemu_ops->get_memory_mapping(cpu, list, errp);
|
||||
}
|
||||
|
||||
error_setg(errp, "Obtaining memory mappings is unsupported on this CPU.");
|
||||
return false;
|
||||
}
|
||||
|
||||
hwaddr cpu_get_phys_page_attrs_debug(CPUState *cpu, vaddr addr,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue