From patchwork Tue Aug 6 11:08:37 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aurelien Jarno X-Patchwork-Id: 265019 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id BD94F2C0085 for ; Tue, 6 Aug 2013 21:09:15 +1000 (EST) Received: from localhost ([::1]:40322 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6f8a-0002z9-Rw for incoming@patchwork.ozlabs.org; Tue, 06 Aug 2013 07:09:12 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55098) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6f8H-0002to-6K for qemu-devel@nongnu.org; Tue, 06 Aug 2013 07:08:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V6f8B-0000eW-KA for qemu-devel@nongnu.org; Tue, 06 Aug 2013 07:08:53 -0400 Received: from hall.aurel32.net ([2001:470:1f0b:4a8::1]:39386) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V6f8B-0000eM-DC for qemu-devel@nongnu.org; Tue, 06 Aug 2013 07:08:47 -0400 Received: from anguille.univ-lyon1.fr ([134.214.4.207] helo=ohm.aurel32.net) by hall.aurel32.net with esmtpsa (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1V6f87-0001UH-Or; Tue, 06 Aug 2013 13:08:44 +0200 Received: from aurel32 by ohm.aurel32.net with local (Exim 4.80) (envelope-from ) id 1V6f82-0008B4-43; Tue, 06 Aug 2013 13:08:38 +0200 From: Aurelien Jarno To: qemu-devel@nongnu.org Date: Tue, 6 Aug 2013 13:08:37 +0200 Message-Id: <1375787317-31359-1-git-send-email-aurelien@aurel32.net> X-Mailer: git-send-email 1.7.10.4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:470:1f0b:4a8::1 Cc: Anthony Liguori , =?UTF-8?q?Andreas=20F=C3=A4rber?= , Aurelien Jarno Subject: [Qemu-devel] [PATCH v2 for-1.6] mips: revert commit b332d24a8e1290954029814d09156b06ede358e2 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 Now that this code path is not triggered anymore during the tests, revert commit b332d24a8e1290954029814d09156b06ede358e2. Booting a MIPS target without kernel nor bios doesn't really make sense. At the same time replace fprintf(stderr, ...) by error_report(). Signed-off-by: Aurelien Jarno --- hw/mips/mips_fulong2e.c | 4 +++- hw/mips/mips_jazz.c | 5 +++-- hw/mips/mips_malta.c | 7 ++++--- hw/mips/mips_mipssim.c | 7 ++++--- 4 files changed, 14 insertions(+), 9 deletions(-) v1 -> v2: replace fprintf(stderr, ...) by error_report() diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index b13750d..b699100 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -44,6 +44,7 @@ #include "sysemu/blockdev.h" #include "exec/address-spaces.h" #include "sysemu/qtest.h" +#include "qemu/error-report.h" #define DEBUG_FULONG2E_INIT @@ -335,7 +336,8 @@ static void mips_fulong2e_init(QEMUMachineInitArgs *args) if ((bios_size < 0 || bios_size > BIOS_SIZE) && !kernel_filename && !qtest_enabled()) { - fprintf(stderr, "qemu: Warning, could not load MIPS bios '%s'\n", bios_name); + error_report("Could not load MIPS bios '%s'\n", bios_name); + exit(1); } } diff --git a/hw/mips/mips_jazz.c b/hw/mips/mips_jazz.c index 36677cc..d748ded 100644 --- a/hw/mips/mips_jazz.c +++ b/hw/mips/mips_jazz.c @@ -43,6 +43,7 @@ #include "hw/sysbus.h" #include "exec/address-spaces.h" #include "sysemu/qtest.h" +#include "qemu/error-report.h" enum jazz_model_e { @@ -178,8 +179,8 @@ static void mips_jazz_init(MemoryRegion *address_space, bios_size = -1; } if ((bios_size < 0 || bios_size > MAGNUM_BIOS_SIZE) && !qtest_enabled()) { - fprintf(stderr, "qemu: Warning, could not load MIPS bios '%s'\n", - bios_name); + error_report("Could not load MIPS bios '%s'", bios_name); + exit(1); } /* Init CPU internal devices */ diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c index f56f34f..0f5de33 100644 --- a/hw/mips/mips_malta.c +++ b/hw/mips/mips_malta.c @@ -49,6 +49,7 @@ #include "hw/sysbus.h" /* SysBusDevice */ #include "qemu/host-utils.h" #include "sysemu/qtest.h" +#include "qemu/error-report.h" //#define DEBUG_BOARD_INIT @@ -1008,9 +1009,9 @@ void mips_malta_init(QEMUMachineInitArgs *args) } if ((bios_size < 0 || bios_size > BIOS_SIZE) && !kernel_filename && !qtest_enabled()) { - fprintf(stderr, - "qemu: Warning, could not load MIPS bios '%s', and no -kernel argument was specified\n", - bios_name); + error_report("Could not load MIPS bios '%s', and no " + "-kernel argument was specified", bios_name); + exit(1); } } /* In little endian mode the 32bit words in the bios are swapped, diff --git a/hw/mips/mips_mipssim.c b/hw/mips/mips_mipssim.c index fea1a15..c10d1ad 100644 --- a/hw/mips/mips_mipssim.c +++ b/hw/mips/mips_mipssim.c @@ -37,6 +37,7 @@ #include "elf.h" #include "hw/sysbus.h" #include "exec/address-spaces.h" +#include "qemu/error-report.h" static struct _loaderparams { int ram_size; @@ -191,9 +192,9 @@ mips_mipssim_init(QEMUMachineInitArgs *args) } if ((bios_size < 0 || bios_size > BIOS_SIZE) && !kernel_filename) { /* Bail out if we have neither a kernel image nor boot vector code. */ - fprintf(stderr, - "qemu: Warning, could not load MIPS bios '%s', and no -kernel argument was specified\n", - filename); + error_report("Could not load MIPS bios '%s', and no " + "-kernel argument was specified\n", filename); + exit(1); } else { /* We have a boot vector start address. */ env->active_tc.PC = (target_long)(int32_t)0xbfc00000;