Fix wildcard escaping.

* grub-core/commands/wildcard.c (wildcard_escape): Moved from here ...
	* grub-core/script/execute.c (wildcard_escape): .. to here.
	Don't escape dot.
	* grub-core/commands/wildcard.c (wildcard_unescape): Moved from here ...
	* grub-core/script/execute.c (wildcard_unescape): .. to here.
	Don't escape dot.
	* grub-core/script/execute.c (gettext_append): Always escape.
	(grub_script_arglist_to_argv): Always handle escaping/unescaping.
	* grub-core/script/yylex.l: Don't cut away the escaping.
	* tests/grub_script_echo1.in: Add tests with wildcard.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-06-08 22:54:21 +02:00
parent c8ca585593
commit 5e619f408d
6 changed files with 112 additions and 104 deletions

View file

@ -174,3 +174,10 @@ $var
if test x$grubshell = xyes; then insmod regexp; fi
echo /boot/grub/i386-pc/normal.mod
echo x\\y
echo x\*y
echo x\\
echo x\\\\
echo x\\\\y