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>


git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@799 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Mark Cave-Ayland
2010-06-27 13:06:38 +00:00
committed by Mark Cave-Ayland
parent 3d7832bba9
commit 78863dfcc9
5 changed files with 6 additions and 6 deletions

View File

@@ -72,7 +72,7 @@ static int try_path(const char *path, char *param)
#ifdef CONFIG_LOADER_FORTH
/* Forth loader */
forth_load(path);
forth_load(dev);
feval("state-valid @");
valid = POP();
if (valid)

View File

@@ -64,7 +64,7 @@ static int try_path(const char *path, char *param)
#ifdef CONFIG_LOADER_FORTH
/* Forth loader */
forth_load(path);
forth_load(dev);
feval("state-valid @");
valid = POP();
if (valid)

View File

@@ -61,7 +61,7 @@ static int try_path(const char *path, char *param)
#ifdef CONFIG_LOADER_FORTH
/* Forth loader */
forth_load(path);
forth_load(dev);
feval("state-valid @");
valid = POP();
if (valid)

View File

@@ -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 */

View File

@@ -23,7 +23,7 @@ int is_forth(char *forth)
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 @@ int forth_load(const char *filename)
/* Mark the saved-program-state as invalid */
feval("0 state-valid !");
fd = open_io(filename);
fd = open_ih(dev);
if (!fd)
goto out;