From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44571) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPfEf-0005yg-44 for qemu-devel@nongnu.org; Mon, 17 Mar 2014 17:38:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WPfEX-0005aw-RP for qemu-devel@nongnu.org; Mon, 17 Mar 2014 17:38:17 -0400 Received: from e06smtp17.uk.ibm.com ([195.75.94.113]:34053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WPfEX-0005Xc-H7 for qemu-devel@nongnu.org; Mon, 17 Mar 2014 17:38:09 -0400 Received: from /spool/local by e06smtp17.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 17 Mar 2014 21:38:08 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (d06relay10.portsmouth.uk.ibm.com [9.149.109.195]) by d06dlp03.portsmouth.uk.ibm.com (Postfix) with ESMTP id 57DA71B08040 for ; Mon, 17 Mar 2014 21:37:55 +0000 (GMT) Received: from d06av05.portsmouth.uk.ibm.com (d06av05.portsmouth.uk.ibm.com [9.149.37.229]) by b06cxnps3075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s2HLbsCK62456020 for ; Mon, 17 Mar 2014 21:37:54 GMT Received: from d06av05.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av05.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s2HLc5At006437 for ; Mon, 17 Mar 2014 15:38:05 -0600 From: Christian Borntraeger Date: Mon, 17 Mar 2014 22:38:24 +0100 Message-Id: <1395092307-42208-2-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1395092307-42208-1-git-send-email-borntraeger@de.ibm.com> References: <1395092307-42208-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PULL 1/4] s390/ipl: Fix error path on BIOS loading List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , Peter Maydell Cc: Alexey Kardashevskiy , qemu-devel , Alexander Graf , Christian Borntraeger , Jens Freimann , Cornelia Huck , Richard Henderson commit 18674b26788a9e47f1157170234e32ece2044367 (elf-loader: add more return codes) enabled the elf loader to return other errors than -1. Lets also handle that case for our "BIOS" on s390. Signed-off-by: Christian Borntraeger CC: Alexey Kardashevskiy CC: Alexander Graf --- hw/s390x/ipl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index 32d38a0..4fa9cff 100644 --- a/hw/s390x/ipl.c +++ b/hw/s390x/ipl.c @@ -80,7 +80,7 @@ static int s390_ipl_init(SysBusDevice *dev) bios_size = load_elf(bios_filename, NULL, NULL, &ipl->start_addr, NULL, NULL, 1, ELF_MACHINE, 0); - if (bios_size == -1) { + if (bios_size < 0) { bios_size = load_image_targphys(bios_filename, ZIPL_IMAGE_START, 4096); ipl->start_addr = ZIPL_IMAGE_START; -- 1.8.4.2