Received: from eggs.gnu.org ([2001:4830:134:3::10]:52526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwP8B-0005oG-9F for qemu-devel@nongnu.org; Mon, 25 Sep 2017 04:52:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwP87-0008Lh-WE for qemu-devel@nongnu.org; Mon, 25 Sep 2017 04:52:47 -0400 Received: from 18.mo3.mail-out.ovh.net ([87.98.172.162]:37269) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dwP87-0008LD-Px for qemu-devel@nongnu.org; Mon, 25 Sep 2017 04:52:43 -0400 Received: from player771.ha.ovh.net (b9.ovh.net [213.186.33.59]) by mo3.mail-out.ovh.net (Postfix) with ESMTP id 3CF9415EE67 for ; Mon, 25 Sep 2017 10:52:42 +0200 (CEST) References: <20170925083348.17126-1-clg@kaod.org> <30287e8a-e697-b33e-bcf0-94bf7fe291de@redhat.com> From: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= Message-ID: <37ec7425-9bb8-1f80-12e5-0fad47ecfd63@kaod.org> Date: Mon, 25 Sep 2017 10:52:35 +0200 MIME-Version: 1.0 In-Reply-To: <30287e8a-e697-b33e-bcf0-94bf7fe291de@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc/pnv: check for firmware file presence List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Thomas Huth , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, David Gibson , Greg Kurz On 09/25/2017 10:46 AM, Thomas Huth wrote: > On 25.09.2017 10:33, C=C3=A9dric Le Goater wrote: >> and exit before uslessly trying to load it if the file does >=20 > s/uslessly/uselessly/ >=20 >> not exists. >> >> Issue dicovered by Coverity Scan. >=20 > /dicovered/discovered/ arg. Sorry about that. >> Signed-off-by: C=C3=A9dric Le Goater >> --- >> hw/ppc/pnv.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c >> index 47221158d415..7728eece2eec 100644 >> --- a/hw/ppc/pnv.c >> +++ b/hw/ppc/pnv.c >> @@ -570,6 +570,10 @@ static void ppc_powernv_init(MachineState *machin= e) >> } >> =20 >> fw_filename =3D qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); >> + if (!fw_filename) { >> + error_report("Could not find OPAL '%s'", bios_name); >=20 > I'd suggest to say "OPAL firmware" instead of just "OPAL". Not every > user knows what OPAL is. Yes it deserves a resend anyhow. thanks, C.=20 >> + exit(1); >> + } >> =20 >> fw_size =3D load_image_targphys(fw_filename, FW_LOAD_ADDR, FW_MAX= _SIZE); >> if (fw_size < 0) { >> >=20 > Thomas >=20