qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 41/53] hw/core: drop support for NULL pointer for FILE * in cp


From: Daniel P . Berrangé
Subject: [PATCH v2 41/53] hw/core: drop support for NULL pointer for FILE * in cpu_dump_state
Date: Tue, 14 Sep 2021 15:20:30 +0100

The monitor is converted to use cpu_format_state, so the only remaining
users of cpu_dump_state all pass a non-NULL pointer for the FILE *
parameter.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 hw/core/cpu-common.c  | 2 +-
 include/hw/core/cpu.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/core/cpu-common.c b/hw/core/cpu-common.c
index 494f4f41eb..ffd9b9e07e 100644
--- a/hw/core/cpu-common.c
+++ b/hw/core/cpu-common.c
@@ -110,7 +110,7 @@ void cpu_dump_state(CPUState *cpu, FILE *f, int flags)
 {
     g_autoptr(GString) buf = g_string_new("");
     cpu_format_state(cpu, buf, flags);
-    qemu_fprintf(f, "%s", buf->str);
+    fprintf(f, "%s", buf->str);
 }
 
 void cpu_format_state(CPUState *cpu, GString *buf, int flags)
diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
index 9cfc7d7479..4c47e1df18 100644
--- a/include/hw/core/cpu.h
+++ b/include/hw/core/cpu.h
@@ -531,7 +531,7 @@ enum CPUDumpFlags {
 /**
  * cpu_dump_state:
  * @cpu: The CPU whose state is to be dumped.
- * @f: If non-null, dump to this stream, else to current print sink.
+ * @f: dump to this stream
  *
  * Dumps CPU state.
  */
-- 
2.31.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]