From patchwork Wed Mar 16 11:36:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Denis V. Lunev" X-Patchwork-Id: 8598831 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B43479F44D for ; Wed, 16 Mar 2016 11:37:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 24C5E202E6 for ; Wed, 16 Mar 2016 11:37:21 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 687F620225 for ; Wed, 16 Mar 2016 11:37:20 +0000 (UTC) Received: from localhost ([::1]:55383 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag9lP-0006VR-QA for patchwork-qemu-devel@patchwork.kernel.org; Wed, 16 Mar 2016 07:37:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53023) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag9lD-0006TO-Ma for qemu-devel@nongnu.org; Wed, 16 Mar 2016 07:37:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ag9l8-0001Ta-On for qemu-devel@nongnu.org; Wed, 16 Mar 2016 07:37:07 -0400 Received: from mailhub.sw.ru ([195.214.232.25]:27143 helo=relay.sw.ru) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ag9l8-0001T2-Bf for qemu-devel@nongnu.org; Wed, 16 Mar 2016 07:37:02 -0400 Received: from irbis.sw.ru ([10.30.2.139]) by relay.sw.ru (8.13.4/8.13.4) with ESMTP id u2GBaqAo029599; Wed, 16 Mar 2016 14:36:57 +0300 (MSK) From: "Denis V. Lunev" To: qemu-devel@nongnu.org Date: Wed, 16 Mar 2016 14:36:52 +0300 Message-Id: <1458128212-4197-3-git-send-email-den@openvz.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1458128212-4197-1-git-send-email-den@openvz.org> References: <1458128212-4197-1-git-send-email-den@openvz.org> X-detected-operating-system: by eggs.gnu.org: OpenBSD 3.x X-Received-From: 195.214.232.25 Cc: pbonzini@redhat.com, Stefan Hajnoczi , "Denis V. Lunev" Subject: [Qemu-devel] [PATCH 2/2] log: move qemu_log_close/qemu_log_flush from header to log.c X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP There is no particular reason to keep these functions in the header. Suggested by Paolo. Signed-off-by: Denis V. Lunev CC: Stefan Hajnoczi CC: Paolo Bonzini --- 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" },