From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LB9ep-0007eb-8x for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:10:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LB9el-0007Zz-V7 for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:10:20 -0500 Received: from [199.232.76.173] (port=50378 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LB9el-0007Za-EA for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:10:19 -0500 Received: from mx2.redhat.com ([66.187.237.31]:32970) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LB9ek-0001dw-Kk for qemu-devel@nongnu.org; Fri, 12 Dec 2008 10:10:19 -0500 From: Eduardo Habkost Date: Fri, 12 Dec 2008 13:08:44 -0200 Message-Id: <1229094550-2022-6-git-send-email-ehabkost@redhat.com> In-Reply-To: <1229094550-2022-1-git-send-email-ehabkost@redhat.com> References: <1229094550-2022-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 05/31] vl.c: LOG_IOPORT macro Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Eduardo Habkost This macro will avoid some #ifdefs in the code and create a single point where the logging call can be changed in the future. Signed-off-by: Eduardo Habkost --- vl.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/vl.c b/vl.c index c3a8d8f..a87c3b4 100644 --- a/vl.c +++ b/vl.c @@ -162,6 +162,16 @@ //#define DEBUG_NET //#define DEBUG_SLIRP + +#ifdef DEBUG_IOPORT +# define LOG_IOPORT(...) do { \ + if (loglevel & CPU_LOG_IOPORT) \ + fprintf(logfile, ## __VA_ARGS__); \ + } while (0) +#else +# define LOG_IOPORT(...) do { } while (0) +#endif + #ifdef TARGET_PPC #define DEFAULT_RAM_SIZE 144 #else -- 1.5.5.GIT