Make 'make check' work on emu.
This commit is contained in:
parent
db99fbe83f
commit
a6393224c4
16 changed files with 82 additions and 49 deletions
|
@ -179,7 +179,7 @@ grub_cmd_parttool (grub_command_t cmd __attribute__ ((unused)),
|
|||
}
|
||||
|
||||
/* Load modules. */
|
||||
if (! grub_no_autoload)
|
||||
if (! grub_no_modules)
|
||||
{
|
||||
const char *prefix;
|
||||
prefix = grub_env_get ("prefix");
|
||||
|
|
|
@ -59,7 +59,7 @@ EOF
|
|||
| grep -v '^#' \
|
||||
| sed -n \
|
||||
-e '/EXPORT_FUNC *([a-zA-Z0-9_]*)/{s/.*EXPORT_FUNC *(\([a-zA-Z0-9_]*\)).*/ {"\1", \1, 1},/;p;}' \
|
||||
-e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/ {"\1", \&\1, 0},/;p;}' \
|
||||
-e '/EXPORT_VAR *([a-zA-Z0-9_]*)/{s/.*EXPORT_VAR *(\([a-zA-Z0-9_]*\)).*/ {"\1", (void *) \&\1, 0},/;p;}' \
|
||||
| sort -u
|
||||
|
||||
cat <<EOF
|
||||
|
|
|
@ -718,6 +718,9 @@ grub_dl_load (const char *name)
|
|||
if (mod)
|
||||
return mod;
|
||||
|
||||
if (grub_no_modules)
|
||||
return 0;
|
||||
|
||||
if (! grub_dl_dir) {
|
||||
grub_error (GRUB_ERR_FILE_NOT_FOUND, N_("variable `%s' isn't set"), "prefix");
|
||||
return 0;
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include <grub/emu/misc.h>
|
||||
#include <grub/disk.h>
|
||||
|
||||
const int grub_no_modules = 1;
|
||||
|
||||
void
|
||||
grub_register_exported_symbols (void)
|
||||
{
|
||||
|
@ -44,12 +46,6 @@ grub_arch_dl_relocate_symbols (grub_dl_t mod, void *ehdr)
|
|||
return GRUB_ERR_BAD_MODULE;
|
||||
}
|
||||
|
||||
void
|
||||
grub_emu_init (void)
|
||||
{
|
||||
grub_no_autoload = 1;
|
||||
}
|
||||
|
||||
#if defined (__ia64__) || defined (__powerpc__)
|
||||
void grub_arch_dl_get_tramp_got_size (const void *ehdr __attribute__ ((unused)),
|
||||
grub_size_t *tramp, grub_size_t *got)
|
||||
|
@ -66,7 +62,3 @@ grub_arch_dl_init_linker (void)
|
|||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
grub_emu_post_init (void)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
#error "No target cpu type is defined"
|
||||
#endif
|
||||
|
||||
const int grub_no_modules = 0;
|
||||
|
||||
/* grub-emu-lite supports dynamic module loading, so it won't have any
|
||||
embedded modules. */
|
||||
void
|
||||
|
@ -34,14 +36,3 @@ grub_fini_all (void)
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
grub_emu_init (void)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void
|
||||
grub_emu_post_init (void)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -55,8 +55,6 @@ static jmp_buf main_env;
|
|||
/* Store the prefix specified by an argument. */
|
||||
static char *root_dev = NULL, *dir = NULL;
|
||||
|
||||
int grub_no_autoload;
|
||||
|
||||
grub_addr_t grub_modbase = 0;
|
||||
|
||||
void
|
||||
|
@ -171,7 +169,6 @@ void grub_hostfs_init (void);
|
|||
void grub_hostfs_fini (void);
|
||||
void grub_host_init (void);
|
||||
void grub_host_fini (void);
|
||||
void grub_emu_init (void);
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
|
@ -208,7 +205,6 @@ main (int argc, char *argv[])
|
|||
}
|
||||
|
||||
signal (SIGINT, SIG_IGN);
|
||||
grub_emu_init ();
|
||||
grub_console_init ();
|
||||
grub_host_init ();
|
||||
|
||||
|
@ -219,8 +215,6 @@ main (int argc, char *argv[])
|
|||
|
||||
grub_hostfs_init ();
|
||||
|
||||
grub_emu_post_init ();
|
||||
|
||||
/* Make sure that there is a root device. */
|
||||
if (! root_dev)
|
||||
root_dev = grub_strdup ("host");
|
||||
|
|
|
@ -263,7 +263,7 @@ grub_normal_init_page (struct grub_term_output *term)
|
|||
static void
|
||||
read_lists (const char *val)
|
||||
{
|
||||
if (! grub_no_autoload)
|
||||
if (! grub_no_modules)
|
||||
{
|
||||
read_command_list (val);
|
||||
read_fs_list (val);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue