diff options
| author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-10-09 11:53:10 +0400 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-10-19 23:13:27 +0200 |
| commit | 8a5b974b981725019c31faa156c36d8141517e15 (patch) | |
| tree | 2a63da87af51a481bc071686f0a779f2d2f534d1 /hw/core/cpu-sysemu.c | |
| parent | 47538e44d6e7a3aa04873d84cf620345fd29a366 (diff) | |
| download | focaccia-qemu-8a5b974b981725019c31faa156c36d8141517e15.tar.gz focaccia-qemu-8a5b974b981725019c31faa156c36d8141517e15.zip | |
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>
Diffstat (limited to 'hw/core/cpu-sysemu.c')
| -rw-r--r-- | hw/core/cpu-sysemu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/core/cpu-sysemu.c b/hw/core/cpu-sysemu.c index 5eaf2e79e6..d0d6a910f9 100644 --- a/hw/core/cpu-sysemu.c +++ b/hw/core/cpu-sysemu.c @@ -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, |