From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58084) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOTr5-0001Le-01 for qemu-devel@nongnu.org; Fri, 14 Mar 2014 11:17:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WOTqw-0004sT-JB for qemu-devel@nongnu.org; Fri, 14 Mar 2014 11:17:02 -0400 Received: from e06smtp18.uk.ibm.com ([195.75.94.114]:48095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WOTqw-0004sC-1q for qemu-devel@nongnu.org; Fri, 14 Mar 2014 11:16:54 -0400 Received: from /spool/local by e06smtp18.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 14 Mar 2014 15:16:53 -0000 Received: from b06cxnps4074.portsmouth.uk.ibm.com (d06relay11.portsmouth.uk.ibm.com [9.149.109.196]) by d06dlp02.portsmouth.uk.ibm.com (Postfix) with ESMTP id 74F73219005C for ; Fri, 14 Mar 2014 15:16:46 +0000 (GMT) Received: from d06av10.portsmouth.uk.ibm.com (d06av10.portsmouth.uk.ibm.com [9.149.37.251]) by b06cxnps4074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id s2EFGd2R196896 for ; Fri, 14 Mar 2014 15:16:39 GMT Received: from d06av10.portsmouth.uk.ibm.com (localhost [127.0.0.1]) by d06av10.portsmouth.uk.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id s2EFGomQ028319 for ; Fri, 14 Mar 2014 09:16:50 -0600 From: Christian Borntraeger Date: Fri, 14 Mar 2014 16:17:09 +0100 Message-Id: <1394810232-9079-2-git-send-email-borntraeger@de.ibm.com> In-Reply-To: <1394810232-9079-1-git-send-email-borntraeger@de.ibm.com> References: <1394810232-9079-1-git-send-email-borntraeger@de.ibm.com> Subject: [Qemu-devel] [PATCH 1/4] s390/ipl: Fix error path on BIOS loading List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel Cc: Alexey Kardashevskiy , 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