Merge mainline into for_macros

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-04-09 22:35:32 +02:00
commit 4a55d631d7
113 changed files with 21429 additions and 3110 deletions

View file

@ -51,11 +51,8 @@ autoload_fs_module (void)
/* Read the file fs.lst for auto-loading. */
void
read_fs_list (void)
read_fs_list (const char *prefix)
{
const char *prefix;
prefix = grub_env_get ("prefix");
if (prefix)
{
char *filename;

View file

@ -66,14 +66,12 @@ grub_crypto_spec_free (void)
/* Read the file crypto.lst for auto-loading. */
void
read_crypto_list (void)
read_crypto_list (const char *prefix)
{
const char *prefix;
char *filename;
grub_file_t file;
char *buf = NULL;
prefix = grub_env_get ("prefix");
if (!prefix)
{
grub_errno = GRUB_ERR_NONE;

View file

@ -60,11 +60,8 @@ grub_dyncmd_dispatcher (struct grub_command *cmd,
/* Read the file command.lst for auto-loading. */
void
read_command_list (void)
read_command_list (const char *prefix)
{
const char *prefix;
prefix = grub_env_get ("prefix");
if (prefix)
{
char *filename;

View file

@ -402,14 +402,20 @@ grub_normal_init_page (struct grub_term_output *term)
grub_free (unicode_msg);
}
static char *
read_lists (struct grub_env_var *var __attribute__ ((unused)),
const char *val)
static void
read_lists (const char *val)
{
read_command_list ();
read_fs_list ();
read_crypto_list ();
read_terminal_list ();
read_command_list (val);
read_fs_list (val);
read_crypto_list (val);
read_terminal_list (val);
}
static char *
read_lists_hook (struct grub_env_var *var __attribute__ ((unused)),
const char *val)
{
read_lists (val);
return val ? grub_strdup (val) : NULL;
}
@ -419,9 +425,10 @@ void
grub_normal_execute (const char *config, int nested, int batch)
{
grub_menu_t menu = 0;
const char *prefix = grub_env_get ("prefix");
read_lists (NULL, NULL);
grub_register_variable_hook ("prefix", NULL, read_lists);
read_lists (prefix);
grub_register_variable_hook ("prefix", NULL, read_lists_hook);
grub_command_execute ("parser.grub", 0, 0);
if (config)

View file

@ -176,10 +176,17 @@ print_message (int nested, int edit, struct grub_term_output *term)
if (edit)
{
grub_putcode ('\n', term);
#ifdef GRUB_MACHINE_EFI
grub_print_message_indented (_("Minimum Emacs-like screen editing is \
supported. TAB lists completions. Press F1 to boot, F2=Ctrl-a, F3=Ctrl-e, \
F4 for a command-line or ESC to discard edits and return to the GRUB menu."),
STANDARD_MARGIN, STANDARD_MARGIN, term);
#else
grub_print_message_indented (_("Minimum Emacs-like screen editing is \
supported. TAB lists completions. Press Ctrl-x to boot, Ctrl-c for a \
command-line or ESC to return menu."), STANDARD_MARGIN, STANDARD_MARGIN,
term);
command-line or ESC to discard edits and return to the GRUB menu."),
STANDARD_MARGIN, STANDARD_MARGIN, term);
#endif
}
else
{

View file

@ -167,14 +167,12 @@ grub_terminal_autoload_free (void)
/* Read the file terminal.lst for auto-loading. */
void
read_terminal_list (void)
read_terminal_list (const char *prefix)
{
const char *prefix;
char *filename;
grub_file_t file;
char *buf = NULL;
prefix = grub_env_get ("prefix");
if (!prefix)
{
grub_errno = GRUB_ERR_NONE;