mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 02:03:56 -06:00
ppc: Clean up error handling in ppc_set_compat()
Current ppc_set_compat() returns -1 for errors, and also (unconditionally) reports an error message. The caller in h_client_architecture_support() may then report it again using an outdated fprintf(). Clean this up by using the modern error reporting mechanisms. Also add strerror(errno) to the error message. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Reviewed-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
parent
16c25aef53
commit
f9ab1e87ed
4 changed files with 14 additions and 15 deletions
|
@ -1643,9 +1643,7 @@ static void spapr_cpu_init(sPAPRMachineState *spapr, PowerPCCPU *cpu)
|
|||
}
|
||||
|
||||
if (cpu->max_compat) {
|
||||
if (ppc_set_compat(cpu, cpu->max_compat) < 0) {
|
||||
exit(1);
|
||||
}
|
||||
ppc_set_compat(cpu, cpu->max_compat, &error_fatal);
|
||||
}
|
||||
|
||||
xics_cpu_setup(spapr->icp, cpu);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue