2005-11-06 Marco Gerards <mgerards@xs4all.nl>
Add initial scripting support. * commands/test.c: New file. * include/grub/script.h: Likewise. * normal/execute.c: Likewise. * normal/function.c: Likewise. * normal/lexer.c: Likewise. * normal/parser.y: Likewise. * normal/script.c: Likewise. * configure.ac: Add `AC_PROG_YACC' test. * conf/i386-pc.rmk (grub_emu_SOURCES): Add `commands/test.c', `normal/execute.c', `normal/lexer.c', `grub_script.tab.c', `normal/function.c' and `normal/script.c'. (normal_mod_SOURCES): `normal/execute.c', `normal/lexer.c', `grub_script.tab.c', `normal/function.c' and `normal/script.c'. (test_mod_SOURCES, test_mod_CFLAGS, test_mod_LDFLAGS): New variables. (pkgdata_MODULES): Add `test.mod'. (grub_script.tab.c): New rule. (grub_script.tab.h): Likewise. * include/grub/err.h (grub_err_t): Add `GRUB_ERR_TEST_FAILURE'. * include/grub/normal.h (grub_test_init): New prototype. (grub_test_fini): Likewise. * normal/command.c: Include <grub/script.h>. (grub_command_execute): Rewritten. * util/grub-emu.c (main): Call `grub_test_init' and `grub_test_fini'.
This commit is contained in:
parent
77500b2bf0
commit
daac212ae3
16 changed files with 1702 additions and 76 deletions
|
@ -219,6 +219,7 @@ main (int argc, char *argv[])
|
|||
grub_timeout_init ();
|
||||
grub_configfile_init ();
|
||||
grub_search_init ();
|
||||
grub_test_init ();
|
||||
|
||||
/* XXX: Should normal mode be started by default? */
|
||||
grub_normal_init ();
|
||||
|
@ -227,6 +228,7 @@ main (int argc, char *argv[])
|
|||
if (setjmp (main_env) == 0)
|
||||
grub_main ();
|
||||
|
||||
grub_test_fini ();
|
||||
grub_search_fini ();
|
||||
grub_configfile_fini ();
|
||||
grub_timeout_fini ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue