Author: blueswirl Date: Mon Aug 9 22:41:45 2010 New Revision: 847 URL: http://tracker.coreboot.org/trac/openbios/changeset/847
Log: Fix load breakage by r828
If a loader succeeds, don't try the others.
Signed-off-by: Blue Swirl blauwirbel@gmail.com
Modified: trunk/openbios-devel/libopenbios/load.c
Modified: trunk/openbios-devel/libopenbios/load.c ============================================================================== --- trunk/openbios-devel/libopenbios/load.c Mon Aug 9 21:21:22 2010 (r846) +++ trunk/openbios-devel/libopenbios/load.c Mon Aug 9 22:41:45 2010 (r847) @@ -44,6 +44,7 @@ { /* Invoke the loaders on the specified device */ char *param; + ucell valid;
#ifdef CONFIG_LOADER_ELF
@@ -57,18 +58,38 @@ param = pop_fstr_copy();
elf_load(&sys_info, dev, param, &elf_boot_notes); + feval("state-valid @"); + valid = POP(); + if (valid) { + return; + } #endif
#ifdef CONFIG_LOADER_AOUT aout_load(&sys_info, dev); + feval("state-valid @"); + valid = POP(); + if (valid) { + return; + } #endif
#ifdef CONFIG_LOADER_FCODE fcode_load(dev); + feval("state-valid @"); + valid = POP(); + if (valid) { + return; + } #endif
#ifdef CONFIG_LOADER_FORTH forth_load(dev); + feval("state-valid @"); + valid = POP(); + if (valid) { + return; + } #endif
}