* normal/autofs.c (read_fs_list): New parameter 'prefix'.

All users updated.
	* normal/crypto.c (read_crypto_list): Likewise.
	* normal/dyncmd.c (read_command_list): Likewise.
	* normal/term.c (read_terminal_list): Likewise.
	* normal/main.c (read_lists): Use explicit prefix.
	(read_lists_hook): Use read_lists.
	(grub_normal_execute): Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-04-09 21:07:24 +02:00
parent 4777971126
commit 027de555e2
7 changed files with 35 additions and 27 deletions

View file

@ -1,3 +1,14 @@
2010-04-09 Vladimir Serbinenko <phcoder@gmail.com>
* normal/autofs.c (read_fs_list): New parameter 'prefix'.
All users updated.
* normal/crypto.c (read_crypto_list): Likewise.
* normal/dyncmd.c (read_command_list): Likewise.
* normal/term.c (read_terminal_list): Likewise.
* normal/main.c (read_lists): Use explicit prefix.
(read_lists_hook): Use read_lists.
(grub_normal_execute): Likewise.
2010-04-09 Vladimir Serbinenko <phcoder@gmail.com>
* util/grub-mkrescue.in: Fix incorrect path in coreboot part.

View file

@ -96,17 +96,17 @@ void read_handler_list (void);
void free_handler_list (void);
/* Defined in `dyncmd.c'. */
void read_command_list (void);
void read_command_list (const char *prefix);
/* Defined in `autofs.c'. */
void read_fs_list (void);
void read_fs_list (const char *prefix);
void grub_context_init (void);
void grub_context_fini (void);
void read_crypto_list (void);
void read_crypto_list (const char *prefix);
void read_terminal_list (void);
void read_terminal_list (const char *prefix);
void grub_set_more (int onoff);

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

@ -434,14 +434,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;
}
@ -451,10 +457,11 @@ 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);
read_lists (prefix);
read_handler_list ();
grub_register_variable_hook ("prefix", NULL, read_lists);
grub_register_variable_hook ("prefix", NULL, read_lists_hook);
grub_command_execute ("parser.grub", 0, 0);
if (config)

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;