qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Denis V. Lunev" <den@openvz.org>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, Stefan Hajnoczi <stefanha@redhat.com>,
	"Denis V. Lunev" <den@openvz.org>
Subject: [Qemu-devel] [PATCH 2/2] log: move qemu_log_close/qemu_log_flush from header to log.c
Date: Wed, 16 Mar 2016 14:36:52 +0300	[thread overview]
Message-ID: <1458128212-4197-3-git-send-email-den@openvz.org> (raw)
In-Reply-To: <1458128212-4197-1-git-send-email-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>
CC: Stefan Hajnoczi <stefanha@redhat.com>
CC: Paolo Bonzini <pbonzini@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 40c24fd..2c2c220 100644
--- a/include/qemu/log.h
+++ b/include/qemu/log.h
@@ -73,23 +73,6 @@ void GCC_FMT_ATTR(2, 3) qemu_log_mask(int mask, const char *fmt, ...);
 
 /* 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;
@@ -122,4 +105,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 8b921de..d03b3a8 100644
--- a/util/log.c
+++ b/util/log.c
@@ -105,6 +105,23 @@ void qemu_set_log_filename(const char *filename)
     qemu_set_log(qemu_loglevel);
 }
 
+/* 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.1.4

  parent reply	other threads:[~2016-03-16 11:37 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-16 11:36 [Qemu-devel] [PATCH 0/2] log: simple changes Denis V. Lunev
2016-03-16 11:36 ` [Qemu-devel] [PATCH 1/2] trace: do not always call exit() in trace_enable_events Denis V. Lunev
2016-03-16 11:36 ` Denis V. Lunev [this message]
2016-03-16 11:49 ` [Qemu-devel] [PATCH 0/2] log: simple changes Paolo Bonzini
2016-03-21 15:10 ` Stefan Hajnoczi

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=1458128212-4197-3-git-send-email-den@openvz.org \
    --to=den@openvz.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).