Received: from eggs.gnu.org ([208.118.235.92]:48737) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWpRJ-0007ij-5D for qemu-devel@nongnu.org; Mon, 29 Apr 2013 10:52:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UWpRA-0002VQ-Ll for qemu-devel@nongnu.org; Mon, 29 Apr 2013 10:52:25 -0400 Received: from e06smtp16.uk.ibm.com ([195.75.94.112]:46976) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UWpRA-0002TF-Co for qemu-devel@nongnu.org; Mon, 29 Apr 2013 10:52:16 -0400 Received: from /spool/local by e06smtp16.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 29 Apr 2013 15:48:28 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (d06relay09.portsmouth.uk.ibm.com [9.149.109.194]) by d06dlp01.portsmouth.uk.ibm.com (Postfix) with ESMTP id 1188517D801B for ; Mon, 29 Apr 2013 15:53:14 +0100 (BST) Received: from d06av08.portsmouth.uk.ibm.com (d06av08.portsmouth.uk.ibm.com [9.149.37.249]) by b06cxnps3074.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r3TEq3W838469754 for ; Mon, 29 Apr 2013 14:52:03 GMT Received: from d06av08.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av08.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r3TEqC8k029550 for ; Mon, 29 Apr 2013 08:52:13 -0600 From: Dominik Dingel Date: Mon, 29 Apr 2013 16:52:05 +0200 Message-Id: <1367247128-22409-3-git-send-email-dingel@linux.vnet.ibm.com> In-Reply-To: <1367247128-22409-1-git-send-email-dingel@linux.vnet.ibm.com> References: <1367247128-22409-1-git-send-email-dingel@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH v2 2/5] S390: BIOS check for file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Christian Borntraeger , Alexander Graf , Dominik Dingel Add a check if the BIOS blob exists before trying to load. Signed-off-by: Dominik Dingel diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c index bcbba7c..f7a570e 100644 --- a/hw/s390x/ipl.c +++ b/hw/s390x/ipl.c @@ -93,6 +93,10 @@ static int s390_ipl_init(SysBusDevice *dev) } bios_filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, bios_name); + if (bios_filename == NULL) { + hw_error("could not find stage1 bootloader\n"); + } + bios_size = load_elf(bios_filename, NULL, NULL, &ipl->start_addr, NULL, NULL, 1, ELF_MACHINE, 0); if (bios_size == -1UL) { -- 1.7.9.5