[06/17] target-i386: cpu_x86_init(): print error message in case of error

Message ID 1352756342-13716-7-git-send-email-ehabkost@redhat.com
State New
Headers show

Commit Message

Eduardo Habkost Nov. 12, 2012, 9:38 p.m.
Error information is being ignored and never returned to the caller.

While we don't change cpu_x86_init() to not return error information, print
error message inside cpu_x86_init() in case of error.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Changes v2:
 - Use error_report()
 - Add "cpu_x86_init:" prefix to error message
 target-i386/cpu.c | 1 +
 1 file changed, 1 insertion(+)


diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 69f1204..2907fb0 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1517,6 +1517,7 @@  X86CPU *cpu_x86_init(const char *cpu_model)
     if (error) {
+        error_report("cpu_x86_init: %s", error_get_pretty(error));
     return NULL;