* [Qemu-devel] [PATCH 0/2] target-openrisc hw/openrisc: Two OpenRISC fix.
@ 2013-07-15 9:09 Jia Liu
2013-07-15 9:09 ` [Qemu-devel] [PATCH 1/2] target-openrisc: Free typename in cpu_class_by_name Jia Liu
2013-07-15 9:09 ` [Qemu-devel] [PATCH 2/2] hw/openrisc: Use stderr output instead of qemu_log Jia Liu
0 siblings, 2 replies; 3+ messages in thread
From: Jia Liu @ 2013-07-15 9:09 UTC (permalink / raw)
To: qemu-devel
Fix OpenRISC CPU and sim broad, in cpu.c we should free typename,
and in openrisc_sim.c we should use stderr output.
Jia Liu (2):
target-openrisc: free typename in cpu_class_by_name
hw/openrisc: Use stderr output instead of qemu_log
hw/openrisc/openrisc_sim.c | 2 +-
target-openrisc/cpu.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
--
1.7.12.4 (Apple Git-37)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH 1/2] target-openrisc: Free typename in cpu_class_by_name
2013-07-15 9:09 [Qemu-devel] [PATCH 0/2] target-openrisc hw/openrisc: Two OpenRISC fix Jia Liu
@ 2013-07-15 9:09 ` Jia Liu
2013-07-15 9:09 ` [Qemu-devel] [PATCH 2/2] hw/openrisc: Use stderr output instead of qemu_log Jia Liu
1 sibling, 0 replies; 3+ messages in thread
From: Jia Liu @ 2013-07-15 9:09 UTC (permalink / raw)
To: qemu-devel
Add a g_free into openrisc_cpu_class_by_name to free typename.
Signed-off-by: Jia Liu <proljc@gmail.com>
---
target-openrisc/cpu.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target-openrisc/cpu.c b/target-openrisc/cpu.c
index 6d40f1b..e348df0 100644
--- a/target-openrisc/cpu.c
+++ b/target-openrisc/cpu.c
@@ -99,6 +99,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;
--
1.7.12.4 (Apple Git-37)
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH 2/2] hw/openrisc: Use stderr output instead of qemu_log
2013-07-15 9:09 [Qemu-devel] [PATCH 0/2] target-openrisc hw/openrisc: Two OpenRISC fix Jia Liu
2013-07-15 9:09 ` [Qemu-devel] [PATCH 1/2] target-openrisc: Free typename in cpu_class_by_name Jia Liu
@ 2013-07-15 9:09 ` Jia Liu
1 sibling, 0 replies; 3+ messages in thread
From: Jia Liu @ 2013-07-15 9:09 UTC (permalink / raw)
To: qemu-devel
Here should be stderr output instead of qemu_log.
Signed-off-by: Jia Liu <proljc@gmail.com>
---
hw/openrisc/openrisc_sim.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/openrisc/openrisc_sim.c b/hw/openrisc/openrisc_sim.c
index 924438b..26bff75 100644
--- a/hw/openrisc/openrisc_sim.c
+++ b/hw/openrisc/openrisc_sim.c
@@ -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);
--
1.7.12.4 (Apple Git-37)
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-15 9:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-15 9:09 [Qemu-devel] [PATCH 0/2] target-openrisc hw/openrisc: Two OpenRISC fix Jia Liu
2013-07-15 9:09 ` [Qemu-devel] [PATCH 1/2] target-openrisc: Free typename in cpu_class_by_name Jia Liu
2013-07-15 9:09 ` [Qemu-devel] [PATCH 2/2] hw/openrisc: Use stderr output instead of qemu_log Jia Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).