Commit Graph
100 Commits
Author SHA1 Message Date
BVK Chaitanya 1bce65c7b1 not command (!) support 2010-09-05 14:57:28 +05:30
BVK Chaitanya 35ee15e09a Filename expansion support for wildcards in GRUB script.
* tests/grub_script_expansion.in: New test.
	* Makefile.util.def: Rule for new test.

	* grub-core/commands/wildcard.c: New file, implements filename
	expansion support for GRUB script.
	* grub-core/Makefile.core.def: Rule update for regexp.mod.
	* grub-core/script/argv.c: Cosmetic changes.
	* grub-core/script/execute.c (grub_script_arglist_to_argv):
	Refactored to perform wildcard expansion on arguments.
	* include/grub/script_sh.h (grub_script_wildcard_translator): New
	struct.

	* tests/util/grub-shell.in: Fix quoting for read input.
2010-09-04 22:45:34 +05:30
BVK Chaitanya ee14ec9935 merge with mainline 2010-09-04 22:34:32 +05:30
BVK Chaitanya 5f0c4acaca Support for updating environment variables with matched substrings
of regexp.

	* tests/grub_cmd_regexp.in: New test.
	* Makefile.util.def: Rule for new test.

	* grub-core/commands/regexp.c: New option -s to update environment
	variables with regexp matches.
2010-09-04 22:19:58 +05:30
BVK Chaitanya a431c98a52 merge with mainline 2010-09-04 22:13:45 +05:30
BVK Chaitanya ed8c6dec96 Support for options to appear multiple times on cmdline.
* include/grub/lib/arg.h (grub_arg_list_alloc): New prototype.
	* grub-core/commands/extcmd.c: Support for repeatable option.
	* grub-core/lib/arg.c (grub_arg_list_alloc): New function for
	repeatable option support.

	Refactor menuentry into a regular command.

	* grub-core/commands/menuentry.c: New file, menuentry command
	implementation.
	* grub-core/Makefile.core.def: Rule update for normal.mod.
	* grub-core/normal/main.c: Moved menuentry creation to
	grub-core/commands/menuentry.c.
	* grub-core/normal/menu.c (grub_menu_execute_entry): Removed.
	(grub_menu_execute_entry_real): Removed.
	* grub-core/script/execute.c (grub_script_execute_sourcecode): New
	function.
	(grub_script_execute_menuentry): Removed.
	* grub-core/script/parser.y (menuentry): Removed.
	* grub-core/script/script.c (grub_script_create_cmdmenu): Removed.
	* grub-core/script/yylex.l (menuentry): Removed.
	* include/grub/menu.h (grub_menu_init): New prototype.
	(grub_menu_fini): New prototype.
	* include/grub/normal.h (grub_normal_add_menu_entry): Removed.
	* include/grub/script_sh.h (grub_script_cmd_menuentry): Removed.
	(grub_script_execute_sourcecode): New prototype.
2010-09-04 21:43:54 +05:30
BVK Chaitanya 9fcd1ee541 merge with mainline 2010-09-04 21:02:48 +05:30
BVK Chaitanya dacd0cf07a "return" command for GRUB script functions.
* tests/grub_script_return.in: New test.
	* Makefile.util.def: Rules for new test.

	* grub-core/script/execute.c (grub_script_return): New function.
	* grub-core/script/main.c: Register/unregister return commaond.
	* include/grub/script_sh.h (grub_script_return): New prototype.
2010-09-04 20:53:09 +05:30
BVK Chaitanya 165bfce138 merge with mainline 2010-09-04 20:44:44 +05:30
BVK Chaitanya 52e72f9d46 "setparams" command to update positional parameters.
* tests/grub_script_setparams.in: New test.
	* Makefile.util.def: Rules for new test.

	* grub-core/script/argv.c (grub_script_argv_make): New function.
	* grub-core/script/execute.c (replace_scope): New function.
	(grub_script_setparams): New function.
	* grub-core/script/lexer.c: Remove unused variables.
	* grub-core/script/main.c: Register/unregister setparams command.
	* include/grub/script_sh.h (grub_script_argv_make): New prototype.
	(grub_script_setparams): New prototype.
2010-09-04 20:27:48 +05:30
BVK Chaitanya cd652829a1 merge with mainline 2010-09-04 14:41:08 +05:30
BVK Chaitanya 49649ac85d review comments 2010-09-04 14:32:59 +05:30
BVK Chaitanya 965e0faac8 merge with mainline 2010-09-04 14:30:12 +05:30
BVK Chaitanya 854bd47cb8 fix memory leak and out-of-range writes 2010-09-04 14:22:51 +05:30
BVK Chaitanya e77cc389d5 merge with mainline 2010-09-04 14:21:56 +05:30
BVK Chaitanya 25b60c913b * grub-core/normal/completion.c (grub_normal_do_completion): Fix
grub_free order.
2010-09-04 14:19:04 +05:30
BVK Chaitanya 6d7c073bc8 merge with mainline 2010-09-04 11:49:02 +05:30
BVK Chaitanya 7af6505ba1 merge with mainline 2010-09-04 11:37:59 +05:30
BVK Chaitanya 312e3e3668 merge with mainline 2010-09-04 11:28:45 +05:30
BVK Chaitanya 227cab7c79 merge with mainline 2010-09-04 10:56:23 +05:30
BVK Chaitanya 37e7bf68c5 Support for passing block of commands as an argument to
extcmds.

	* Makefile.util.def: Rules for new test.
	* tests/grub_script_blockarg.in: New test.
	* grub-core/tests/test_blockarg.c: New file, block argument
	command used in the test.

	* include/grub/extcmd.h (grub_extcmd_context): New struct.
	(grub_register_extcmd_prio): New function prototype.
	(grub_extcmd_dispatcher): New function prototype.
	* include/grub/command.h (GRUB_COMMAND_FLAG_BLOCKS): New command
	type.
	* include/grub/script_sh.h (struct grub_script): New members
	`children', `next_siblings' and `refcnt' for block arguments and
	reference counting.
	(GRUB_SCRIPT_ARG_TYPE_BLOCK): New argument type.
	(grub_script_arg): New member `script' for block argument.
	(grub_script_argv): New member `script' for block argument.
	(grub_parser_param): New member `scripts' for block argument.
	(grub_script_mem_free): New extern function prototype.
	(grub_script_ref): New function prototype.
	(grub_script_unref): New function prototype.

	* grub-core/normal/dyncmd.c (grub_dyncmd_dispatcher): Moved to
	extcmd form to support block arguments.
	* grub-core/script/argv.c: Block arguments support.
	* grub-core/script/execute.c: Likewise.
	* grub-core/script/lexer.c: Likewise.
	* grub-core/script/main.c: Likewise.
	* grub-core/script/script.c: Likewise.
	* grub-core/script/parser.y: Likewise.  New `block' and `block0'
	non-terminals.

	* grub-core/commands/acpi.c: Update extcmd implementations with
	grub_extcmd_context_t.
	* grub-core/commands/cat.c: Likewise.
	* grub-core/commands/echo.c: Likewise.
	* grub-core/commands/extcmd.c: Likewise.
	* grub-core/commands/hashsum.c: Likewise.
	* grub-core/commands/hdparm.c: Likewise.
	* grub-core/commands/help.c: Likewise.
	* grub-core/commands/hexdump.c: Likewise.
	* grub-core/commands/i386/cpuid.c: Likewise.
	* grub-core/commands/i386/pc/drivemap.c: Likewise.
	* grub-core/commands/i386/pc/halt.c: Likewise.
	* grub-core/commands/i386/pc/sendkey.c: Likewise.
	* grub-core/commands/iorw.c: Likewise.
	* grub-core/commands/keystatus.c: Likewise.
	* grub-core/commands/loadenv.c: Likewise.
	* grub-core/commands/ls.c: Likewise.
	* grub-core/commands/lspci.c: Likewise.
	* grub-core/commands/memrw.c: Likewise.
	* grub-core/commands/probe.c: Likewise.
	* grub-core/commands/search_wrap.c: Likewise.
	* grub-core/commands/setpci.c: Likewise.
	* grub-core/commands/sleep.c: Likewise.
	* grub-core/disk/loopback.c: Likewise.
	* grub-core/hello/hello.c: Likewise.
	* grub-core/loader/i386/bsd.c: Likewise.
	* grub-core/loader/xnu.c: Likewise.
	* grub-core/term/gfxterm.c: Likewise.
	* grub-core/term/serial.c: Likewise.
	* grub-core/tests/lib/functional_test.c: Likewise.
2010-09-04 09:13:30 +05:30
BVK Chaitanya e5a73c4247 merge with mainline 2010-09-04 09:05:21 +05:30
BVK Chaitanya 888d1500b2 Multi-line quoted strings support.
* grub-core/script/lexer.c (append_newline): Removed.
	(grub_script_lexer_yywrap): Refactored.
	(grub_script_lexer_init): Refactored.
	* grub-core/script/yylex.l (yywrap): New function.
	(grub_lexer_resplit): New function.
	(grub_lexer_unput): New function.
	* include/grub/script_sh.h (grub_lexer_param): New members, unput
	and resplit.
	* tests/grub_script_echo1.in: Added few more testcases.
2010-09-04 08:43:35 +05:30
BVK Chaitanya adcf5a8e30 merge with mainline 2010-09-04 08:33:42 +05:30
BVK Chaitanya 80f5b97cdc --source option for menuentry 2010-09-04 08:14:50 +05:30
BVK Chaitanya e89f9ec539 add setparams prefix 2010-09-03 22:28:16 +05:30
BVK Chaitanya 6556eba9c6 Add missing files into "make dist" tarball for other platforms.
* gentpl.py (script): Use dist_noinst_DATA instead of EXTRA_DIST.
	* conf/Makefile.common (dist_noinst_DATA): New variable.
	* conf/Makefile.extra-dist: Added missing make dist files.
	* grub-core/Makefile.core.def: Likewise.
2010-09-03 21:23:00 +05:30
BVK Chaitanya 9284756e17 merge menuentry.mod into normal.mod 2010-09-03 21:08:12 +05:30
BVK Chaitanya 78780e7005 fix hotkey handling 2010-09-03 20:53:38 +05:30
BVK Chaitanya cc7b1ab4d6 review comments 2010-09-03 20:35:23 +05:30
BVK Chaitanya 0dfb7ba053 merge with mainline 2010-09-03 20:06:57 +05:30
BVK Chaitanya ebd65b82dc remove leading / in dprintf output 2010-08-30 09:37:35 +05:30
BVK Chaitanya 6568636e31 use preprocessing-marker technique for creating list files 2010-08-29 21:22:41 +05:30
BVK Chaitanya 466b9c3567 distcheck fixes 2010-08-29 16:58:43 +05:30
BVK Chaitanya 6b5f780f05 use objcopy instead of creating mod-*.c and mod-*.o 2010-08-29 16:43:07 +05:30
BVK Chaitanya ea943e89a3 distcheck fixes 2010-08-29 12:35:52 +05:30
BVK Chaitanya 0d4552faca remove def-* and und-* list files 2010-08-29 11:17:30 +05:30
BVK Chaitanya a0bf9fc930 remove per module lst files for creating fs.lst, command.lst, etc. 2010-08-29 10:38:46 +05:30
BVK Chaitanya a7363f53c8 Use ldadd instead of ldflags for libraries 2010-08-29 09:33:13 +05:30
BVK Chaitanya 8fdefb9253 merge with mainline 2010-08-26 12:11:57 +05:30
BVK Chaitanya ab8629d2ac pull-in menuentry branch 2010-08-26 12:02:52 +05:30
BVK Chaitanya b899201c69 merge with mainline 2010-08-26 11:45:29 +05:30
BVK Chaitanya 322061f869 pull-in setparams branch 2010-08-26 11:34:39 +05:30
BVK Chaitanya 47b4c2c3e8 pull-in block-arg branch 2010-08-26 11:32:35 +05:30
BVK Chaitanya 928bad4708 merge with mainline 2010-08-26 09:30:11 +05:30
BVK Chaitanya aa5cd41af5 return command for functions 2010-08-25 19:35:52 +05:30
BVK Chaitanya 8ecbb72dee Multiple variable names support to "export" command.
* normal/context.c (grub_cmd_export): "export" command supports
	multiple variable names.
2010-08-25 18:50:41 +05:30
BVK Chaitanya cd6891117f review comment fixes 2010-08-25 18:39:00 +05:30
BVK Chaitanya d24c6190ae add changelog 2010-08-25 18:34:20 +05:30
BVK Chaitanya a9b85993ee merge with mainline 2010-08-25 14:45:56 +05:30
BVK Chaitanya 5faf2ec0d7 merge with mainline 2010-08-25 14:05:05 +05:30
BVK Chaitanya 0c8b61d8e4 automake based build system for grub 2010-08-23 23:26:24 +05:30
BVK Chaitanya 645586e686 Replace --enable-grub-emu-modules with grub-emu-lite.
* kern/emu/cache.S: New file.  Wrapper for $target_cpu specific
	cache.S.

	* include/grub/emu/misc.h (grub_emu_init): New prototype.
	* kern/emu/full.c: New file. For grub-emu specific initialization.
	* kern/emu/lite.c: New file. For grub-emu-lite initialization.
	* kern/emu/main.c: Call initialization function grub_emu_init.

	* Makefile.in: Include grub-emu-lite in install.
	* commands/parttool.c: Use grub_no_autoload to differentiate
	between grub-emu and grub-emu-lite.
	* include/grub/misc.h: New variable grub_no_autoload.

	* conf/any-emu.rmk: New rules for grub-emu-lite.
	* configure.ac: Remove --enable-grub-emu-modules.
	* genmk.rb: Cleanup unnecessary rules.
	* include/grub/dl.h: Remove GRUB_NO_MODULES macro.

	* normal/main.c: Don't load list files on grub-emu-lite.
	* util/misc.c (grub_arch_sync_caches): Removed.
2010-08-23 23:06:29 +05:30
BVK Chaitanya 9444311834 merge with mainline 2010-08-23 21:50:38 +05:30
BVK Chaitanya 41b016a481 fix x86_64-efi build 2010-08-23 21:23:39 +05:30
BVK Chaitanya 9e860d5437 force bash for autogen.sh 2010-08-23 14:07:29 +05:30
BVK Chaitanya 40a4a8a9ed fix exit 1 in autogen.sh 2010-08-23 13:32:59 +05:30
BVK Chaitanya f7711f5ef1 final touches 2010-08-23 13:23:56 +05:30
BVK Chaitanya 30c4f234cc fix emu build 2010-08-23 10:31:08 +05:30
BVK Chaitanya d84666e6bb merge with mainline 2010-08-22 21:00:22 +05:30
BVK Chaitanya f51c98c485 remove wrong extension 2010-08-21 21:23:42 +05:30
BVK Chaitanya 5815f2c19a picks 10_${host_kernel} script 2010-08-21 21:03:26 +05:30
BVK Chaitanya 354128c8af fix x86_64_efi build 2010-08-21 17:22:19 +05:30
BVK Chaitanya c721825b4f build fixes for mips and ieee1275 platforms 2010-08-21 17:11:40 +05:30
BVK Chaitanya 8427685faa *_sources now collect all values of all its groups 2010-08-21 14:27:31 +05:30
BVK Chaitanya bdf0d62321 review comments 2010-08-21 09:48:27 +05:30
BVK Chaitanya 2bd591d03e add USE_ASCII_FAILBACK define 2010-08-21 00:50:12 +05:30
BVK Chaitanya 2be24791dd merge with mainline 2010-08-21 00:49:29 +05:30
BVK Chaitanya 00d0648491 fix emu build on netbsd 2010-08-20 22:34:19 +05:30
BVK Chaitanya a71e471975 fix distcheck from source tree 2010-08-20 21:01:13 +05:30
BVK Chaitanya 34cf2b8aea fix distcheck 2010-08-20 18:47:22 +05:30
BVK Chaitanya 3d9d354297 generate gcry rules from import_gcry 2010-08-20 18:21:31 +05:30
BVK Chaitanya 771111e53d fix COND_APPLE_CC definition 2010-08-20 13:00:11 +05:30
BVK Chaitanya 07daa815af better fix for setjmp module 2010-08-20 11:39:47 +05:30
BVK Chaitanya a26187d7c0 update .bzrignore 2010-08-20 11:13:37 +05:30
BVK Chaitanya 02a6605e7e minor fixes 2010-08-20 11:10:42 +05:30
BVK Chaitanya a5a3bccd54 added conf/Makefile.common and conf/Makefile.extra-dist 2010-08-20 10:14:29 +05:30
BVK Chaitanya 34980574fc minor cleanups 2010-08-19 17:50:05 +05:30
BVK Chaitanya 16c7cb32c8 merge with mainline 2010-08-19 16:54:00 +05:30
BVK Chaitanya 7afdce98a6 fix example_unit_test build 2010-08-19 15:47:38 +05:30
BVK Chaitanya 62f7d20835 fixed grub-emu build 2010-08-18 20:25:16 +05:30
BVK Chaitanya 019be613d0 fixed distcheck 2010-08-18 16:53:11 +05:30
BVK Chaitanya 2b6c00842d distcheck almost done 2010-08-18 11:57:51 +05:30
BVK Chaitanya f99b0464df rm grub-core/video/emu.moved 2010-08-17 19:46:13 +05:30
BVK Chaitanya a525bb9ae4 rm grub-core/configure.ac 2010-08-17 19:43:37 +05:30
BVK Chaitanya 76ed06b921 moved configure.common back to configure.ac 2010-08-17 19:41:43 +05:30
BVK Chaitanya adf4ef86af add po/Makefile.am 2010-08-17 19:23:50 +05:30
BVK Chaitanya a6b3849314 move grub-core/po back 2010-08-17 19:23:26 +05:30
BVK Chaitanya c49e5dfff8 remove Makefile.kernel and Makefile.vars 2010-08-17 19:17:57 +05:30
BVK Chaitanya 5c2d039c58 update .bzrignore 2010-08-17 19:04:35 +05:30
BVK Chaitanya 6304d29255 working copy, wo nested packaging 2010-08-17 19:03:22 +05:30
BVK Chaitanya 1ec4a27928 export command supports multiple args 2010-08-16 15:04:30 +05:30
BVK Chaitanya 0a4fc180ec parallel build fix for utils 2010-08-15 21:09:37 +05:30
BVK Chaitanya db4122ba30 fix for grub-core parallel build failure 2010-08-15 20:40:24 +05:30
BVK Chaitanya a8876fc7ca merge with setparams branch 2010-08-15 12:11:07 +05:30
BVK Chaitanya 3a20130e7a setparams command to set positional parameters 2010-08-15 12:02:33 +05:30
BVK Chaitanya 1379af7834 merge with mainline 2010-08-15 11:12:53 +05:30
BVK Chaitanya 7a3c13dea5 Fix for misspelled color names defaulting to black/black (bug
reported by Doug Nazar)

	* include/grub/normal.h (grub_parse_color_name_pair): Add return
	status to prototype.
	* normal/color.c (grub_parse_color_name_pair): Return failure
	status.
	(grub_env_write_color_normal): Ignore bad color names.
	(grub_env_write_color_highlight): Likewise.
	* normal/main.c (GRUB_MOD_INIT): Set default color names.
2010-08-12 20:52:42 +05:30
BVK Chaitanya 681440aa5b fix bad color name handling 2010-08-12 20:45:55 +05:30
BVK Chaitanya 00a8a3eee3 merge with mainline 2010-08-12 14:43:34 +05:30