diff options
author | Eduardo Habkost <ehabkost@redhat.com> | 2014-12-18 23:07:01 -0200 |
---|---|---|
committer | Eduardo Habkost <ehabkost@redhat.com> | 2015-02-25 15:00:07 -0300 |
commit | 15258d46baef5f8265ad5f1002905664cf58f051 (patch) | |
tree | b080ff025174a25580b5fbe3651afadfd882b96a /target-i386/cpu.c | |
parent | 644dba250a3ed04079792f0d6cc918fb1483e6a5 (diff) | |
download | qemu-15258d46baef5f8265ad5f1002905664cf58f051.zip |
target-i386: Eliminate cpu_init() function
Instead of putting extra logic inside cpu.h, just do everything inside
cpu_x86_init_user().
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'target-i386/cpu.c')
-rw-r--r-- | target-i386/cpu.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/target-i386/cpu.c b/target-i386/cpu.c index 8f18556960..aee4d3e7ce 100644 --- a/target-i386/cpu.c +++ b/target-i386/cpu.c @@ -2135,7 +2135,7 @@ out: return cpu; } -X86CPU *cpu_x86_init_user(const char *cpu_model) +CPUX86State *cpu_x86_init_user(const char *cpu_model) { Error *error = NULL; X86CPU *cpu; @@ -2153,10 +2153,10 @@ out: error_free(error); if (cpu != NULL) { object_unref(OBJECT(cpu)); - cpu = NULL; } + return NULL; } - return cpu; + return &cpu->env; } static void x86_cpu_cpudef_class_init(ObjectClass *oc, void *data) |