OSDN Git Service

ppc: Clean up error handling in ppc_set_compat()
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 20 Jan 2016 01:58:07 +0000 (12:58 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Sat, 30 Jan 2016 12:37:37 +0000 (23:37 +1100)
commitf9ab1e87edae8a72ae2a65fad658a77ad15d4da0
treea0d9738ac82901752bcda96af79bcabf33dfa273
parent16c25aef5362c6dd99c54fec78936ec3c10dc513
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>
hw/ppc/spapr.c
hw/ppc/spapr_hcall.c
target-ppc/cpu.h
target-ppc/translate_init.c