diff options
author | Anthony Liguori <aliguori@us.ibm.com> | 2013-07-26 13:04:07 -0500 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-07-26 13:04:07 -0500 |
commit | b142d79328cd0a0556634b0eeb891a15bfd5a00c (patch) | |
tree | 61e21503063ee4e41ebdbcbc82f9655813f66b95 | |
parent | 003e26bc9f7c4f5cd90e046ae112c1d09363b8d1 (diff) | |
parent | 9b146e9a28bbd9567f5ac6a8e2bcb543aa3b9392 (diff) |
Merge remote-tracking branch 'jliu/or32' into staging
# By Jia Liu
# Via Jia Liu
* jliu/or32:
target-openrisc: Free typename in openrisc_cpu_class_by_name
hw/openrisc: Use stderr output instead of qemu_log
hw/openrisc: Indent typo
Message-id: 1374576458-22808-1-git-send-email-proljc@gmail.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-rw-r--r-- | hw/openrisc/openrisc_sim.c | 6 | ||||
-rw-r--r-- | target-openrisc/cpu.c | 1 |
2 files changed, 4 insertions, 3 deletions
diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c index 924438bcc2..a08f27ce2e 100644 --- a/hw/openrisc/openrisc_sim.c +++ b/hw/openrisc/openrisc_sim.c @@ -82,7 +82,7 @@ static void cpu_openrisc_load_kernel(ram_addr_t ram_size, } if (kernel_size < 0) { - qemu_log("QEMU: couldn't load the kernel '%s'\n", + fprintf(stderr, "QEMU: couldn't load the kernel '%s'\n", kernel_filename); exit(1); } @@ -96,7 +96,7 @@ static void openrisc_sim_init(QEMUMachineInitArgs *args) ram_addr_t ram_size = args->ram_size; const char *cpu_model = args->cpu_model; const char *kernel_filename = args->kernel_filename; - OpenRISCCPU *cpu = NULL; + OpenRISCCPU *cpu = NULL; MemoryRegion *ram; int n; @@ -107,7 +107,7 @@ static void openrisc_sim_init(QEMUMachineInitArgs *args) for (n = 0; n < smp_cpus; n++) { cpu = cpu_openrisc_init(cpu_model); if (cpu == NULL) { - qemu_log("Unable to find CPU definition!\n"); + fprintf(stderr, "Unable to find CPU definition!\n"); exit(1); } qemu_register_reset(main_cpu_reset, cpu); diff --git a/target-openrisc/cpu.c b/target-openrisc/cpu.c index 3da5a7a8b1..7718820ecc 100644 --- a/target-openrisc/cpu.c +++ b/target-openrisc/cpu.c @@ -106,6 +106,7 @@ static ObjectClass *openrisc_cpu_class_by_name(const char *cpu_model) typename = g_strdup_printf("%s-" TYPE_OPENRISC_CPU, cpu_model); oc = object_class_by_name(typename); + g_free(typename); if (oc != NULL && (!object_class_dynamic_cast(oc, TYPE_OPENRISC_CPU) || object_class_is_abstract(oc))) { return NULL; |