qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	"Denis V. Lunev" <den@openvz.org>
Subject: [Qemu-devel] [PULL 3/4] log: move qemu_log_close/qemu_log_flush from header to log.c
Date: Thu, 31 Mar 2016 13:35:37 +0100	[thread overview]
Message-ID: <1459427738-5806-4-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1459427738-5806-1-git-send-email-stefanha@redhat.com>

From: "Denis V. Lunev" <den@openvz.org>

There is no particular reason to keep these functions in the header.
Suggested by Paolo.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1458128212-4197-3-git-send-email-den@openvz.org
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
 include/qemu/log.h | 22 +++++-----------------
 util/log.c         | 17 +++++++++++++++++
 2 files changed, 22 insertions(+), 17 deletions(-)

diff --git a/include/qemu/log.h b/include/qemu/log.h
index cf38adb..c52f136 100644
--- a/include/qemu/log.h
+++ b/include/qemu/log.h
@@ -95,23 +95,6 @@ qemu_log_vprintf(const char *fmt, va_list va)
 
 /* Maintenance: */
 
-/* fflush() the log file */
-static inline void qemu_log_flush(void)
-{
-    fflush(qemu_logfile);
-}
-
-/* Close the log file */
-static inline void qemu_log_close(void)
-{
-    if (qemu_logfile) {
-        if (qemu_logfile != stderr) {
-            fclose(qemu_logfile);
-        }
-        qemu_logfile = NULL;
-    }
-}
-
 /* define log items */
 typedef struct QEMULogItem {
     int mask;
@@ -146,4 +129,9 @@ int qemu_str_to_log_mask(const char *str);
  */
 void qemu_print_log_usage(FILE *f);
 
+/* fflush() the log file */
+void qemu_log_flush(void);
+/* Close the log file */
+void qemu_log_close(void);
+
 #endif
diff --git a/util/log.c b/util/log.c
index b219081..1857730 100644
--- a/util/log.c
+++ b/util/log.c
@@ -198,6 +198,23 @@ void qemu_set_dfilter_ranges(const char *filter_spec)
     }
 }
 
+/* fflush() the log file */
+void qemu_log_flush(void)
+{
+    fflush(qemu_logfile);
+}
+
+/* Close the log file */
+void qemu_log_close(void)
+{
+    if (qemu_logfile) {
+        if (qemu_logfile != stderr) {
+            fclose(qemu_logfile);
+        }
+        qemu_logfile = NULL;
+    }
+}
+
 const QEMULogItem qemu_log_items[] = {
     { CPU_LOG_TB_OUT_ASM, "out_asm",
       "show generated host assembly code for each compiled TB" },
-- 
2.5.5

  parent reply	other threads:[~2016-03-31 12:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-31 12:35 [Qemu-devel] [PULL 0/4] Tracing patches Stefan Hajnoczi
2016-03-31 12:35 ` [Qemu-devel] [PULL 1/4] docs: Update documentation for stderr (now log) tracing backend Stefan Hajnoczi
2016-03-31 12:35 ` [Qemu-devel] [PULL 2/4] trace: do not always call exit() in trace_enable_events Stefan Hajnoczi
2016-03-31 12:35 ` Stefan Hajnoczi [this message]
2016-03-31 12:35 ` [Qemu-devel] [PULL 4/4] trace-events: Fix typos (found by codespell) Stefan Hajnoczi
2016-03-31 13:58 ` [Qemu-devel] [PULL 0/4] Tracing patches Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1459427738-5806-4-git-send-email-stefanha@redhat.com \
    --to=stefanha@redhat.com \
    --cc=den@openvz.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).