From: BVK Chaitanya Date: Thu, 22 Jul 2010 21:14:22 +0000 (+0530) Subject: merge with mainline X-Git-Tag: 1.99~593^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54416e9d71e80cba5b2df13a2e218b70132e9ab4;p=thirdparty%2Fgrub.git merge with mainline --- 54416e9d71e80cba5b2df13a2e218b70132e9ab4 diff --cc conf/common.rmk index 1b71644ae,f92e5bc4c..24d7921f5 --- a/conf/common.rmk +++ b/conf/common.rmk @@@ -637,19 -628,18 +628,18 @@@ keystatus_mod_CFLAGS = $(COMMON_CFLAGS keystatus_mod_LDFLAGS = $(COMMON_LDFLAGS) # For normal.mod. + ifneq (, $(FONT_SOURCE)) + normal/charset.c_DEPENDENCIES = widthspec.h + endif normal_mod_SOURCES = normal/main.c normal/cmdline.c normal/dyncmd.c \ - normal/auth.c normal/autofs.c normal/handler.c \ + normal/auth.c normal/autofs.c \ normal/color.c normal/completion.c normal/datetime.c normal/menu.c \ - normal/menu_entry.c normal/menu_text.c \ - normal/misc.c normal/crypto.c normal/term.c normal/context.c - normal_mod_CFLAGS = $(COMMON_CFLAGS) - normal_mod_LDFLAGS = $(COMMON_LDFLAGS) - - # For sh.mod. - sh_mod_SOURCES = script/main.c script/script.c script/argv.c script/execute.c \ + normal/menu_entry.c normal/menu_text.c normal/charset.c \ + normal/misc.c normal/crypto.c normal/term.c normal/context.c \ - script/main.c script/script.c script/execute.c unidata.c \ ++ script/main.c script/script.c script/execute.c script/argv.c unidata.c \ script/function.c script/lexer.c grub_script.tab.c grub_script.yy.c - sh_mod_CFLAGS = $(COMMON_CFLAGS) $(POSIX_CFLAGS) $(GNULIB_CFLAGS) -Wno-error - sh_mod_LDFLAGS = $(COMMON_LDFLAGS) -normal_mod_CFLAGS = $(COMMON_CFLAGS) $(POSIX_CFLAGS) -Wno-error ++normal_mod_CFLAGS = $(COMMON_CFLAGS) $(POSIX_CFLAGS) $(GNULIB_CFLAGS) -Wno-error + normal_mod_LDFLAGS = $(COMMON_LDFLAGS) ifneq (, $(FONT_SOURCE)) font/font.c_DEPENDENCIES = ascii.h diff --cc include/grub/script_sh.h index 7721edd96,7d6129243..50c21bd88 --- a/include/grub/script_sh.h +++ b/include/grub/script_sh.h @@@ -345,9 -344,8 +350,8 @@@ grub_script_function_t grub_script_func struct grub_script *cmd); void grub_script_function_remove (const char *name); grub_script_function_t grub_script_function_find (char *functionname); - int grub_script_function_iterate (int (*iterate) (grub_script_function_t)); -int grub_script_function_call (grub_script_function_t func, - int argc, char **args); +grub_err_t grub_script_function_call (grub_script_function_t func, + int argc, char **args); char ** grub_script_execute_arglist_to_argv (struct grub_script_arglist *arglist, int *count); diff --cc script/function.c index 82c753bcd,810c65233..47b236652 --- a/script/function.c +++ b/script/function.c @@@ -103,15 -103,12 +103,3 @@@ grub_script_function_find (char *functi return func; } -- --int - grub_script_function_iterate (int (*iterate) (grub_script_function_t)) -grub_script_function_call (grub_script_function_t func, - int argc __attribute__((unused)), - char **args __attribute__((unused))) --{ - grub_script_function_t func; - - for (func = grub_script_function_list; func; func = func->next) - if (iterate (func)) - return 1; - - return 0; - /* XXX: Arguments are not supported yet. */ - return grub_script_execute (func->func); --} diff --cc tests/grub_script_expansion.in index 80f0a6afa,000000000..1ec58e3a9 mode 100644,000000..100644 --- a/tests/grub_script_expansion.in +++ b/tests/grub_script_expansion.in @@@ -1,35 -1,0 +1,35 @@@ +#! /bin/bash -e + +# Run GRUB script in a Qemu instance +# Copyright (C) 2010 Free Software Foundation, Inc. +# +# GRUB is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# GRUB is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with GRUB. If not, see . + +disks=`echo ls | @builddir@/grub-shell` - other=`echo echo '*' | @builddir@/grub-shell` ++other=`echo echo \\* | @builddir@/grub-shell` +for d in $disks; do + if ! echo "$other" | grep "$d" >/dev/null; then + echo "$d missing from * expansion" >&2 + exit 1 + fi +done + +other=`echo echo '(*)' | @builddir@/grub-shell` +for d in $disks; do + if ! echo "$other" | grep "$d" >/dev/null; then + echo "$d missing from (*) expansion" >&2 + exit 1 + fi +done +