From patchwork Wed Jul 22 16:44:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 498733 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A5A461402D2 for ; Thu, 23 Jul 2015 02:47:18 +1000 (AEST) Received: from localhost ([::1]:37504 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHxAq-0004rZ-SL for incoming@patchwork.ozlabs.org; Wed, 22 Jul 2015 12:47:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46037) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHx84-0007hI-39 for qemu-devel@nongnu.org; Wed, 22 Jul 2015 12:44:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZHx82-0004eU-MZ for qemu-devel@nongnu.org; Wed, 22 Jul 2015 12:44:23 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:34676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHx82-0004ZT-FO for qemu-devel@nongnu.org; Wed, 22 Jul 2015 12:44:22 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1ZHx7r-0002Wf-HJ; Wed, 22 Jul 2015 17:44:11 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Date: Wed, 22 Jul 2015 17:44:01 +0100 Message-Id: <1437583451-9677-3-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1437583451-9677-1-git-send-email-peter.maydell@linaro.org> References: <1437583451-9677-1-git-send-email-peter.maydell@linaro.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:8b0:1d0::1 Cc: patches@linaro.org Subject: [Qemu-devel] [PATCH 02/12] osdep.h: Remove qemu_printf 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org qemu_printf is an ancient remnant which has been a simple #define to printf for over a decade, and is used in only a few places. Expand it out in those places and remove the #define. Signed-off-by: Peter Maydell Reviewed-by: Daniel P. Berrange --- include/qemu/osdep.h | 2 -- monitor.c | 4 ++-- user-exec.c | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index 3247364..e9b8b92 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -99,8 +99,6 @@ typedef signed int int_fast16_t; #define inline always_inline #endif -#define qemu_printf printf - int qemu_daemon(int nochdir, int noclose); void *qemu_try_memalign(size_t alignment, size_t size); void *qemu_memalign(size_t alignment, size_t size); diff --git a/monitor.c b/monitor.c index aeea2b5..fc32f12 100644 --- a/monitor.c +++ b/monitor.c @@ -678,7 +678,7 @@ static int get_str(char *buf, int buf_size, const char **pp) case '\"': break; default: - qemu_printf("unsupported escape code: '\\%c'\n", c); + printf("unsupported escape code: '\\%c'\n", c); goto fail; } if ((q - buf) < buf_size - 1) { @@ -692,7 +692,7 @@ static int get_str(char *buf, int buf_size, const char **pp) } } if (*p != '\"') { - qemu_printf("unterminated string\n"); + printf("unterminated string\n"); goto fail; } p++; diff --git a/user-exec.c b/user-exec.c index ed9a07f..8ad89a4 100644 --- a/user-exec.c +++ b/user-exec.c @@ -92,8 +92,8 @@ static inline int handle_cpu_signal(uintptr_t pc, unsigned long address, int ret; #if defined(DEBUG_SIGNAL) - qemu_printf("qemu: SIGSEGV pc=0x%08lx address=%08lx w=%d oldset=0x%08lx\n", - pc, address, is_write, *(unsigned long *)old_set); + printf("qemu: SIGSEGV pc=0x%08lx address=%08lx w=%d oldset=0x%08lx\n", + pc, address, is_write, *(unsigned long *)old_set); #endif /* XXX: locking issue */ if (is_write && h2g_valid(address)