Author: mcayland Date: Sun Jun 27 15:06:38 2010 New Revision: 799 URL: http://tracker.coreboot.org/trac/openbios/changeset/799
Log: Switch Forth loader over to using an ihandle rather than a direct path reference.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@siriusit.co.uk
Modified: trunk/openbios-devel/arch/sparc32/boot.c trunk/openbios-devel/arch/sparc64/boot.c trunk/openbios-devel/arch/x86/boot.c trunk/openbios-devel/include/libopenbios/forth_load.h trunk/openbios-devel/libopenbios/forth_load.c
Modified: trunk/openbios-devel/arch/sparc32/boot.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/boot.c Fri Jun 25 22:42:00 2010 (r798) +++ trunk/openbios-devel/arch/sparc32/boot.c Sun Jun 27 15:06:38 2010 (r799) @@ -72,7 +72,7 @@
#ifdef CONFIG_LOADER_FORTH /* Forth loader */ - forth_load(path); + forth_load(dev); feval("state-valid @"); valid = POP(); if (valid)
Modified: trunk/openbios-devel/arch/sparc64/boot.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/boot.c Fri Jun 25 22:42:00 2010 (r798) +++ trunk/openbios-devel/arch/sparc64/boot.c Sun Jun 27 15:06:38 2010 (r799) @@ -64,7 +64,7 @@
#ifdef CONFIG_LOADER_FORTH /* Forth loader */ - forth_load(path); + forth_load(dev); feval("state-valid @"); valid = POP(); if (valid)
Modified: trunk/openbios-devel/arch/x86/boot.c ============================================================================== --- trunk/openbios-devel/arch/x86/boot.c Fri Jun 25 22:42:00 2010 (r798) +++ trunk/openbios-devel/arch/x86/boot.c Sun Jun 27 15:06:38 2010 (r799) @@ -61,7 +61,7 @@
#ifdef CONFIG_LOADER_FORTH /* Forth loader */ - forth_load(path); + forth_load(dev); feval("state-valid @"); valid = POP(); if (valid)
Modified: trunk/openbios-devel/include/libopenbios/forth_load.h ============================================================================== --- trunk/openbios-devel/include/libopenbios/forth_load.h Fri Jun 25 22:42:00 2010 (r798) +++ trunk/openbios-devel/include/libopenbios/forth_load.h Sun Jun 27 15:06:38 2010 (r799) @@ -18,7 +18,7 @@ #define _H_FORTHLOAD
extern int is_forth(char *forth); -extern int forth_load(const char *filename); +extern int forth_load(ihandle_t dev); extern void forth_init_program(void);
#endif /* _H_FORTHLOAD */
Modified: trunk/openbios-devel/libopenbios/forth_load.c ============================================================================== --- trunk/openbios-devel/libopenbios/forth_load.c Fri Jun 25 22:42:00 2010 (r798) +++ trunk/openbios-devel/libopenbios/forth_load.c Sun Jun 27 15:06:38 2010 (r799) @@ -23,7 +23,7 @@ return (forth[0] == '\' && forth[1] == ' '); }
-int forth_load(const char *filename) +int forth_load(ihandle_t dev) { char magic[2]; unsigned long forthsize; @@ -32,7 +32,7 @@ /* Mark the saved-program-state as invalid */ feval("0 state-valid !");
- fd = open_io(filename); + fd = open_ih(dev); if (!fd) goto out;