2007-07-22 Robert Millan <rmh@aybabtu.com>
* geninitheader.sh: Process file specified in first parameter rather than hardcoding grub_modules_init.lst. * geninit.sh: Likewise. Also, construct header name dynamicaly rather than hardcoding grub_modules_init.h. * conf/common.rmk: Rename grub_modules_init.[ch] files associated with grub-emu to grub_emu_init.[ch]. Add rules to build analogous grub_probe_init.[ch] and grub_setup_init.[ch]. * conf/powerpc-ieee1275.rmk (grub_emu_DEPENDENCIES): Replace grub_modules_init.h with grub_emu_init.h. (grub_probe_DEPENDENCIES, grub_probe_SOURCES): Add new grub_probe_init.[ch] files. * conf/i386-efi.rmk: Likewise. * conf/i386-pc.rmk: Likewise. (grub_setup_DEPENDENCIES, grub_setup_SOURCES): Add new grub_setup_init.[ch] files. * util/grub-emu.c: Replace grub_modules_init.h with grub_emu_init.h. * util/grub-probe.c: Include grub_probe_init.h. Use grub_init_all() to initialize modules rather than a list of hardcoded functions. * util/i386/pc/grub-setup.c: Include grub_setup_init.h. Use grub_init_all() to initialize modules rather than a list of hardcoded functions.
This commit is contained in:
parent
54cdc1cc1c
commit
daf0f0ba3e
15 changed files with 174 additions and 95 deletions
|
@ -34,6 +34,8 @@
|
|||
#include <grub/util/raid.h>
|
||||
#include <grub/util/lvm.h>
|
||||
|
||||
#include <grub_setup_init.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
@ -658,9 +660,10 @@ main (int argc, char *argv[])
|
|||
|
||||
/* Initialize the emulated biosdisk driver. */
|
||||
grub_util_biosdisk_init (dev_map ? : DEFAULT_DEVICE_MAP);
|
||||
grub_pc_partition_map_init ();
|
||||
grub_gpt_partition_map_init ();
|
||||
|
||||
/* Initialize all modules. */
|
||||
grub_init_all ();
|
||||
|
||||
dest_dev = get_device_name (argv[optind]);
|
||||
if (! dest_dev)
|
||||
{
|
||||
|
@ -678,14 +681,6 @@ main (int argc, char *argv[])
|
|||
|
||||
prefix = grub_get_prefix (dir ? : DEFAULT_DIRECTORY);
|
||||
|
||||
/* Initialize filesystems. */
|
||||
grub_fat_init ();
|
||||
grub_ext2_init ();
|
||||
grub_ufs_init ();
|
||||
grub_minix_init ();
|
||||
grub_hfs_init ();
|
||||
grub_jfs_init ();
|
||||
|
||||
if (root_dev)
|
||||
{
|
||||
char *tmp = get_device_name (root_dev);
|
||||
|
@ -754,15 +749,7 @@ main (int argc, char *argv[])
|
|||
root_dev, dest_dev, must_embed);
|
||||
|
||||
/* Free resources. */
|
||||
grub_ext2_fini ();
|
||||
grub_fat_fini ();
|
||||
grub_ufs_fini ();
|
||||
grub_minix_fini ();
|
||||
grub_hfs_fini ();
|
||||
grub_jfs_fini ();
|
||||
|
||||
grub_gpt_partition_map_fini ();
|
||||
grub_pc_partition_map_fini ();
|
||||
grub_fini_all ();
|
||||
grub_util_biosdisk_fini ();
|
||||
|
||||
free (boot_file);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue