From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51362) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1albwC-0003uo-EG for qemu-devel@nongnu.org; Thu, 31 Mar 2016 08:43:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1albwB-0001GN-HR for qemu-devel@nongnu.org; Thu, 31 Mar 2016 08:43:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1albwB-0001GD-Bj for qemu-devel@nongnu.org; Thu, 31 Mar 2016 08:42:59 -0400 From: Stefan Hajnoczi Date: Thu, 31 Mar 2016 13:35:37 +0100 Message-Id: <1459427738-5806-4-git-send-email-stefanha@redhat.com> In-Reply-To: <1459427738-5806-1-git-send-email-stefanha@redhat.com> References: <1459427738-5806-1-git-send-email-stefanha@redhat.com> Subject: [Qemu-devel] [PULL 3/4] log: move qemu_log_close/qemu_log_flush from header to log.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Paolo Bonzini , Stefan Hajnoczi , "Denis V. Lunev" From: "Denis V. Lunev" There is no particular reason to keep these functions in the header. Suggested by Paolo. Signed-off-by: Denis V. Lunev Reviewed-by: Paolo Bonzini Message-id: 1458128212-4197-3-git-send-email-den@openvz.org CC: Stefan Hajnoczi CC: Paolo Bonzini Signed-off-by: Stefan Hajnoczi --- 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