diff mbox

[v1,04/24] monitor: Make monitor_fprintf public before extracting it

Message ID 1406870842-17988-5-git-send-email-benoit.canet@irqsave.net
State New
Headers show

Commit Message

Benoît Canet Aug. 1, 2014, 5:27 a.m. UTC
Signed-off-by: Benoit Canet <benoit@irqsave.net>
---
 disas.c                   | 10 ----------
 include/monitor/monitor.h |  2 ++
 monitor.c                 |  4 ++--
 3 files changed, 4 insertions(+), 12 deletions(-)

Comments

Eric Blake Aug. 5, 2014, 12:48 p.m. UTC | #1
On 07/31/2014 11:27 PM, Benoît Canet wrote:
> Signed-off-by: Benoit Canet <benoit@irqsave.net>
> ---
>  disas.c                   | 10 ----------
>  include/monitor/monitor.h |  2 ++
>  monitor.c                 |  4 ++--
>  3 files changed, 4 insertions(+), 12 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>
diff mbox

Patch

diff --git a/disas.c b/disas.c
index 44a019a..b174f26 100644
--- a/disas.c
+++ b/disas.c
@@ -435,16 +435,6 @@  monitor_read_memory (bfd_vma memaddr, bfd_byte *myaddr, int length,
     return 0;
 }
 
-static int GCC_FMT_ATTR(2, 3)
-monitor_fprintf(FILE *stream, const char *fmt, ...)
-{
-    va_list ap;
-    va_start(ap, fmt);
-    monitor_vprintf((Monitor *)stream, fmt, ap);
-    va_end(ap);
-    return 0;
-}
-
 /* Disassembler for the monitor.
    See target_disas for a description of flags. */
 void monitor_disas(Monitor *mon, CPUArchState *env,
diff --git a/include/monitor/monitor.h b/include/monitor/monitor.h
index bd9a1f2..0155390 100644
--- a/include/monitor/monitor.h
+++ b/include/monitor/monitor.h
@@ -77,4 +77,6 @@  void add_completion_option(ReadLineState *rs, const char *str,
 void monitor_user_noop(Monitor *mon, const QObject *data);
 int do_qmp_capabilities(Monitor *mon, const QDict *params, QObject **ret_data);
 
+int GCC_FMT_ATTR(2, 3) monitor_fprintf(FILE *stream, const char *fmt, ...);
+
 #endif /* !MONITOR_H */
diff --git a/monitor.c b/monitor.c
index 703f5e9..e06f9b5 100644
--- a/monitor.c
+++ b/monitor.c
@@ -328,8 +328,8 @@  void monitor_printf(Monitor *mon, const char *fmt, ...)
     va_end(ap);
 }
 
-static int GCC_FMT_ATTR(2, 3) monitor_fprintf(FILE *stream,
-                                              const char *fmt, ...)
+int GCC_FMT_ATTR(2, 3) monitor_fprintf(FILE *stream,
+                                       const char *fmt, ...)
 {
     va_list ap;
     va_start(ap, fmt);