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
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);
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);
--}
--- /dev/null
- other=`echo echo '*' | @builddir@/grub-shell`
+#! /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 <http://www.gnu.org/licenses/>.
+
+disks=`echo ls | @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
+