diff options
author | Markus Armbruster <armbru@redhat.com> | 2019-04-17 21:17:50 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2019-04-18 22:18:59 +0200 |
commit | ba4912cb0d6035192d58fbb4b901e8f39cfd0948 (patch) | |
tree | cd717d7606c2d15ba743b7267ad89739be5f8c6e /monitor.c | |
parent | 15ce35fcf18f88e345bd65c169f26d3a3d250ab9 (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 'monitor.c')
-rw-r--r-- | monitor.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1056,7 +1056,7 @@ static void hmp_trace_file(Monitor *mon, const QDict *qdict) const char *arg = qdict_get_try_str(qdict, "arg"); if (!op) { - st_print_trace_file_status((FILE *)mon, &monitor_fprintf); + st_print_trace_file_status(); } else if (!strcmp(op, "on")) { st_set_trace_file_enabled(true); } else if (!strcmp(op, "off")) { |