If configfile is relative pathname, extend it with current ($root) so its
interpretation does not change if $root is changed later.
Suggested by Vladimir Serbienko.
Defalut font color on PC console seems to be light-gray; this is
what user also gets in rescue prompt and what is defined as
GRUB_TERM_DEFAULT_NORMAL_COLOR. But normal.mod defaults to white.
This makes unpleasant visual effect as colors are changed after kernel
is booted.
Use the same color eveywhere for consistency and default to light-gray
as this is also what at least Linux kernel is using by default.
Add a new timeout_style environment variable and a corresponding
GRUB_TIMEOUT_STYLE configuration key for grub-mkconfig. This
controls hidden-timeout handling more simply than the previous
arrangements, and pressing any hotkeys associated with menu entries
during the hidden timeout will now boot the corresponding menu entry
immediately.
GRUB_HIDDEN_TIMEOUT=<non-empty> + GRUB_TIMEOUT=<non-zero> now
generates a warning, and if it shows the menu it will do so as if
the second timeout were not present. Other combinations are
translated into reasonable equivalents.
once enabled).
* grub-core/gettext/gettext.c: Encapsulate all static variables in
main_context and secondary_context. All functions updated.
(grub_gettext_translate): Rename to ...
(grub_gettext_translate_real): ... this. Return NULL on failed
translate.
(grub_gettext_translate): Handle secondary context.
(grub_gettext_delete_list): Close file and zero-out the context.
(grub_mofile_open): Don't call grub_gettext_delete_list.
Don't close file.
(grub_gettext_init_ext): Call grub_gettext_init_ext. Skip loading
if locale="" to avoid pointless error message.
(grub_gettext_env_write_lang): Update lang even if load fails.
Handle secondary context.
(grub_gettext_reread_prefix): New function.
(read_main): Likewise.
(read_secondary): Likewise.
(GRUB_MOD_INIT): Handle secondary context. Hook and export variables.
(GRUB_MOD_FINI): Handle secondary context. Don't close file.
* grub-core/normal/main.c (read_lists): Call grub_gettext_reread_prefix.
* include/grub/normal.h (grub_gettext_reread_prefix): New proto.
* grub-core/Makefile.am (moddep.lst): Make dependent on video.lst.
* grub-core/Makefile.core.def (all_video): New module.
* grub-core/genmoddep.awk: Generate dependency of all_video from
video.lst.
* grub-core/lib/fake_module.c: New file.
* grub-core/normal/main.c (features): Add feature_all_video_module.
* util/grub.d/00_header.in: Define locale_dir based on $prefix and
don't do explicit search again.
insmod all_video in load_video if available.
path for fonts ($prefix/fonts).
* grub-core/kern/corecmd.c (grub_core_cmd_insmod): Unify condition
for checking if string is a path.
* grub-core/normal/main.c (features): Add feature_default_font_path.
* util/grub-mkconfig.in: Skip mangling of GRUB_FONT into GRUB_FONT_PATH.
* util/grub.d/00_header.in: Use default directory if possible.
* util/grub-install.in: Install unicode.pf2.
(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.
* grub-core/normal/menu.c (grub_menu_execute_entry): New parameter
auto_boot. All users updated.
Declared static.
Handle chosen and default with submenus.
(grub_menu_execute_with_fallback): Declared static.
Don't notify failure if autobooted. Upper level does it.
(menuentry_eq): New function.
(get_entry_number): Use menuentry_eq.
(show_menu): New parameter "autobooted". All users updated.
(grub_show_menu): Likewise.
* include/grub/normal.h (grub_show_menu): Likewise.
* include/grub/menu.h (grub_menu_execute_entry): Removed.
(grub_menu_execute_with_fallback): Likewise.
* grub-core/commands/menuentry.c (grub_normal_add_menu_entry): New
parameter submenu. All users updated.
* grub-core/normal/main.c (free_menu): Rename to ...
(grub_normal_free_menu): ... this. Made global.
* grub-core/normal/menu.c (grub_menu_execute_entry): Open new context
if requested.
* grub-core/normal/menu_entry.c (screen): New field submenu.
(make_screen): Set submenu.
(run): Open new context if requested.
* include/grub/menu.h (grub_menu_entry): New field submenu.
* include/grub/normal.h (grub_normal_free_menu): New proto.