aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/ipl.c
diff options
context:
space:
mode:
authorDominik Dingel <dingel@linux.vnet.ibm.com>2013-04-29 04:52:05 +0000
committerAlexander Graf <agraf@suse.de>2013-05-06 17:30:00 +0200
commit1f7de853306499b83e627a09b15281fd6d566a51 (patch)
treee0e2b85e39b461fa2e4d6eed7cd9f1c5fa2a3634 /hw/s390x/ipl.c
parent8e515b125d5f7849167dbee6cbe6ef61636607d4 (diff)
S390: BIOS check for file
Add a check if the BIOS blob exists before trying to load. Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com> Signed-off-by: Alexander Graf <agraf@suse.de>
Diffstat (limited to 'hw/s390x/ipl.c')
-rw-r--r--hw/s390x/ipl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/s390x/ipl.c b/hw/s390x/ipl.c
index ace5ff50d1..cc3cd2352b 100644
--- a/hw/s390x/ipl.c
+++ b/hw/s390x/ipl.c
@@ -82,6 +82,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) {