aboutsummaryrefslogtreecommitdiff
path: root/trace/simple.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2019-04-17 21:17:50 +0200
committerMarkus Armbruster <armbru@redhat.com>2019-04-18 22:18:59 +0200
commitba4912cb0d6035192d58fbb4b901e8f39cfd0948 (patch)
treecd717d7606c2d15ba743b7267ad89739be5f8c6e /trace/simple.c
parent15ce35fcf18f88e345bd65c169f26d3a3d250ab9 (diff)
trace: Simplify how st_print_trace_file_status() prints
st_print_trace_file_status() takes an fprintf()-like callback and a FILE * to pass to it. Its only caller hmp_trace_file() passes monitor_fprintf() and the current monitor cast to FILE *. monitor_fprintf() casts it right back, and is otherwise identical to monitor_printf(). The type-punning is ugly. Drop the callback, and call qemu_printf() instead. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20190417191805.28198-3-armbru@redhat.com>
Diffstat (limited to 'trace/simple.c')
-rw-r--r--trace/simple.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/trace/simple.c b/trace/simple.c
index ac904eca91..fc7106ec49 100644
--- a/trace/simple.c
+++ b/trace/simple.c
@@ -16,6 +16,7 @@
#include "trace/control.h"
#include "trace/simple.h"
#include "qemu/error-report.h"
+#include "qemu/qemu-print.h"
/** Trace file header event ID, picked to avoid conflict with real event IDs */
#define HEADER_EVENT_ID (~(uint64_t)0)
@@ -363,10 +364,10 @@ void st_set_trace_file(const char *file)
st_set_trace_file_enabled(true);
}
-void st_print_trace_file_status(FILE *stream, int (*stream_printf)(FILE *stream, const char *fmt, ...))
+void st_print_trace_file_status(void)
{
- stream_printf(stream, "Trace file \"%s\" %s.\n",
- trace_file_name, trace_fp ? "on" : "off");
+ qemu_printf("Trace file \"%s\" %s.\n",
+ trace_file_name, trace_fp ? "on" : "off");
}
void st_flush_trace_buffer(void)