qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 2/2] log: move qemu_log_close/qemu_log_flush from he


From: Denis V. Lunev
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

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

Signed-off-by: Denis V. Lunev <address@hidden>
CC: Stefan Hajnoczi <address@hidden>
CC: Paolo Bonzini <address@hidden>
---
 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]