From nobody Tue Feb 10 09:10:40 2026 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1558086184; cv=none; d=zoho.com; s=zohoarc; b=KkUvjwvS4AdxPTLIGCAXogSOpgBOIsKnfqrEi3LJGuoC+AUscTFNPXiv+MmAyrgwygptr4PjuCvUI2GQCzrD68Qo76WdvdbTf+zxPmUXee9RFUD7PxRfiiglZrRyrzsWrB9YTcQARReepXXIuj6rUcmoYBLAJ6xK+hKiQ7zPH4U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558086184; h=Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=D42Slidm+XszXSSbTf+dRRDDJ43/x7Os3GxFtbvUrz8=; b=ond7jqeCn83/B4yEiqwnGZVZTCBZbj/QhvlG172HUC9iwMbZHP6gSh6Q6hQMJo8Ff/iqYSJuAmme4ZroYYmT+bxqmV3LOvEhK8tEW6W79+XA0iG3ZFjpqTyabXsEwwp2LYsDtQbY4z96EcLhfswJu+Z7W6eNPCKBQrqPJW8wF0Y= ARC-Authentication-Results: i=1; mx.zoho.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1558086184126720.0121375064125; Fri, 17 May 2019 02:43:04 -0700 (PDT) Received: from localhost ([127.0.0.1]:45304 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRZO4-0005Tz-Tp for importer@patchew.org; Fri, 17 May 2019 05:42:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:39850) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hRZM0-0004IP-Tc for qemu-devel@nongnu.org; Fri, 17 May 2019 05:40:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hRZLz-00022i-Mm for qemu-devel@nongnu.org; Fri, 17 May 2019 05:40:40 -0400 Received: from mail.ilande.co.uk ([46.43.2.167]:55350 helo=mail.default.ilande.uk0.bigv.io) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hRZLz-0001xp-F8 for qemu-devel@nongnu.org; Fri, 17 May 2019 05:40:39 -0400 Received: from host109-146-247-8.range109-146.btcentralplus.com ([109.146.247.8] helo=kentang.home) by mail.default.ilande.uk0.bigv.io with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1hRZLD-00018L-NP; Fri, 17 May 2019 10:39:52 +0100 From: Mark Cave-Ayland To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Fri, 17 May 2019 10:40:23 +0100 Message-Id: <20190517094029.7667-3-mark.cave-ayland@ilande.co.uk> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190517094029.7667-1-mark.cave-ayland@ilande.co.uk> References: <20190517094029.7667-1-mark.cave-ayland@ilande.co.uk> X-SA-Exim-Connect-IP: 109.146.247.8 X-SA-Exim-Mail-From: mark.cave-ayland@ilande.co.uk X-SA-Exim-Version: 4.2.1 (built Tue, 02 Aug 2016 21:08:31 +0000) X-SA-Exim-Scanned: Yes (on mail.default.ilande.uk0.bigv.io) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 46.43.2.167 Subject: [Qemu-devel] [PULL 2/8] leon3: fix the error message when no bios are provided X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: KONRAD Frederic The leon3 board is looking for u-boot.bin by default (LEON3_PROM_FILENAME).. But in the case this file is not found and no other file are given on the command line we get the following error: $ ./qemu-system-sparc -M leon3_generic qemu-system-sparc: Can't read bios image (null) So use LEON3_PROM_FILENAME instead of filename in case it is NULL to get a less cryptic message: $ ./qemu-system-sparc -M leon3_generic qemu-system-sparc: Can't read bios image 'u-boot.bin' Suggested-by: Mark Cave-Ayland Signed-off-by: KONRAD Frederic Signed-off-by: Mark Cave-Ayland --- hw/sparc/leon3.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/sparc/leon3.c b/hw/sparc/leon3.c index 0383b17c29..f438718794 100644 --- a/hw/sparc/leon3.c +++ b/hw/sparc/leon3.c @@ -1,7 +1,7 @@ /* * QEMU Leon3 System Emulator * - * Copyright (c) 2010-2011 AdaCore + * Copyright (c) 2010-2019 AdaCore * * Permission is hereby granted, free of charge, to any person obtaining a= copy * of this software and associated documentation files (the "Software"), t= o deal @@ -43,7 +43,7 @@ /* Default system clock. */ #define CPU_CLK (40 * 1000 * 1000) =20 -#define PROM_FILENAME "u-boot.bin" +#define LEON3_PROM_FILENAME "u-boot.bin" =20 #define MAX_PILS 16 =20 @@ -158,7 +158,7 @@ static void leon3_generic_hw_init(MachineState *machine) =20 /* Load boot prom */ if (bios_name =3D=3D NULL) { - bios_name =3D PROM_FILENAME; + bios_name =3D LEON3_PROM_FILENAME; } filename =3D qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); =20 @@ -180,7 +180,9 @@ static void leon3_generic_hw_init(MachineState *machine) exit(1); } } else if (kernel_filename =3D=3D NULL && !qtest_enabled()) { - error_report("Can't read bios image %s", filename); + error_report("Can't read bios image '%s'", filename + ? filename + : LEON3_PROM_FILENAME); exit(1); } g_free(filename); --=20 2.11.0