* grub-core/fs/fat.c: Include grub/fat.h.
(grub_fat_bpb): Moved to ... * include/grub/fat.h (grub_fat_bpb): ... here. New file. * grub-core/loader/i386/pc/chainloader.c: Include grub/fat.h and grub/ntfs.h. * include/grub/i386/pc/chainloader.h (grub_chainloader_flags_t): Moved from here... * grub-core/loader/i386/pc/chainloader.c (grub_chainloader_flags_t): ... here. * grub-core/loader/i386/pc/chainloader.c (grub_chainloader_patch_bpb): New function. (grub_chainloader_cmd): Patch BPB if --bpb is given. (GRUB_MOD_INIT): Show --bpb. * grub-core/loader/i386/pc/ntldr.c (grub_cmd_ntldr): Patch BPB. * grub-core/normal/main.c (features): New variable. (GRUB_MOD_INIT): Set feature_* variables. * include/grub/i386/pc/chainloader.h (grub_chainloader_patch_bpb): New proto. * include/grub/ntfs.h (grub_ntfs_bpb): New field bios_drive.
This commit is contained in:
commit
1e4b43901a
8 changed files with 199 additions and 59 deletions
|
@ -473,9 +473,14 @@ grub_mini_cmd_clear (struct grub_command *cmd __attribute__ ((unused)),
|
|||
static grub_command_t cmd_clear;
|
||||
|
||||
static void (*grub_xputs_saved) (const char *str);
|
||||
static const char *features[] = {
|
||||
"feature_chainloader_bpb", "feature_ntldr"
|
||||
};
|
||||
|
||||
GRUB_MOD_INIT(normal)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
/* Previously many modules depended on gzio. Be nice to user and load it. */
|
||||
grub_dl_load ("gzio");
|
||||
|
||||
|
@ -517,6 +522,12 @@ GRUB_MOD_INIT(normal)
|
|||
/* Set default color names. */
|
||||
grub_env_set ("color_normal", "white/black");
|
||||
grub_env_set ("color_highlight", "black/white");
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE (features); i++)
|
||||
{
|
||||
grub_env_set (features[i], "y");
|
||||
grub_env_export (features[i]);
|
||||
}
|
||||
}
|
||||
|
||||
GRUB_MOD_FINI(normal)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue