From 3dca01d7e3b7f798d3d38dd3e52c8e90fd952bc6 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Mon, 30 Aug 2010 01:09:28 +0200 Subject: [PATCH 1/6] * grub-core/term/i386/vga_common.c (grub_console_setcolorstate): Mask out the bit 0x80 since it has other meaning that specifiing color. --- ChangeLog | 5 +++++ grub-core/term/i386/vga_common.c | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4d5d6653a..9e84cc88b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-08-30 Vladimir Serbinenko + + * grub-core/term/i386/vga_common.c (grub_console_setcolorstate): + Mask out the bit 0x80 since it has other meaning that specifiing color. + 2010-08-29 Vladimir Serbinenko New relocator. Allows for more kernel support and more straightforward diff --git a/grub-core/term/i386/vga_common.c b/grub-core/term/i386/vga_common.c index 02fb5c02d..0c217697b 100644 --- a/grub-core/term/i386/vga_common.c +++ b/grub-core/term/i386/vga_common.c @@ -34,13 +34,13 @@ grub_console_setcolorstate (struct grub_term_output *term, { switch (state) { case GRUB_TERM_COLOR_STANDARD: - grub_console_cur_color = GRUB_TERM_DEFAULT_STANDARD_COLOR; + grub_console_cur_color = GRUB_TERM_DEFAULT_STANDARD_COLOR & 0x7f; break; case GRUB_TERM_COLOR_NORMAL: - grub_console_cur_color = term->normal_color; + grub_console_cur_color = term->normal_color & 0x7f; break; case GRUB_TERM_COLOR_HIGHLIGHT: - grub_console_cur_color = term->highlight_color; + grub_console_cur_color = term->highlight_color & 0x7f; break; default: break; From 9a9de209a2302aae260285531675e21762a62b32 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Mon, 30 Aug 2010 01:11:12 +0200 Subject: [PATCH 2/6] * grub-core/normal/term.c (print_more): Return to normal and not to standard state after printing "---MORE---". --- ChangeLog | 5 +++++ grub-core/normal/term.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9e84cc88b..b59a69569 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-08-30 Vladimir Serbinenko + + * grub-core/normal/term.c (print_more): Return to normal and not + to standard state after printing "---MORE---". + 2010-08-30 Vladimir Serbinenko * grub-core/term/i386/vga_common.c (grub_console_setcolorstate): diff --git a/grub-core/normal/term.c b/grub-core/normal/term.c index 02850ef4e..b55c0f06a 100644 --- a/grub-core/normal/term.c +++ b/grub-core/normal/term.c @@ -86,7 +86,7 @@ print_more (void) { grub_print_ucs4 (unicode_str, unicode_last_position, 0, 0, term); } - grub_setcolorstate (GRUB_TERM_COLOR_STANDARD); + grub_setcolorstate (GRUB_TERM_COLOR_NORMAL); grub_free (unicode_str); From f21db0332f801a8c027e5d775358a8611164a77d Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Mon, 30 Aug 2010 01:12:37 +0200 Subject: [PATCH 3/6] * grub-core/normal/color.c (grub_env_write_color_normal): Fix a warning. (grub_env_write_color_highlight): Likewise. --- ChangeLog | 5 +++++ grub-core/normal/color.c | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b59a69569..1f7bbfa6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-08-30 Vladimir Serbinenko + + * grub-core/normal/color.c (grub_env_write_color_normal): Fix a warning. + (grub_env_write_color_highlight): Likewise. + 2010-08-30 Vladimir Serbinenko * grub-core/normal/term.c (print_more): Return to normal and not diff --git a/grub-core/normal/color.c b/grub-core/normal/color.c index a16d1c2f9..2e6c80b94 100644 --- a/grub-core/normal/color.c +++ b/grub-core/normal/color.c @@ -125,10 +125,11 @@ set_colors (void) /* Replace default `normal' colors with the ones specified by user (if any). */ char * -grub_env_write_color_normal (struct grub_env_var *var, const char *val) +grub_env_write_color_normal (struct grub_env_var *var __attribute__ ((unused)), + const char *val) { if (grub_parse_color_name_pair (&color_normal, val)) - return 0; + return NULL; set_colors (); @@ -137,10 +138,11 @@ grub_env_write_color_normal (struct grub_env_var *var, const char *val) /* Replace default `highlight' colors with the ones specified by user (if any). */ char * -grub_env_write_color_highlight (struct grub_env_var *var, const char *val) +grub_env_write_color_highlight (struct grub_env_var *var __attribute__ ((unused)), + const char *val) { if (grub_parse_color_name_pair (&color_highlight, val)) - return 0; + return NULL; set_colors (); From 8920a08d8794d4f3c6d6a529461a70ac5e1809a5 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Mon, 30 Aug 2010 01:14:07 +0200 Subject: [PATCH 4/6] * grub-core/normal/menu.c (grub_wait_after_message): Add a 10 second timeout to avoid indefinite boot stalling. --- ChangeLog | 5 +++++ grub-core/normal/menu.c | 13 ++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 1f7bbfa6c..095cec7f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-08-30 Vladimir Serbinenko + + * grub-core/normal/menu.c (grub_wait_after_message): Add a 10 second + timeout to avoid indefinite boot stalling. + 2010-08-30 Vladimir Serbinenko * grub-core/normal/color.c (grub_env_write_color_normal): Fix a warning. diff --git a/grub-core/normal/menu.c b/grub-core/normal/menu.c index b57990b0d..cc84ce38c 100644 --- a/grub-core/normal/menu.c +++ b/grub-core/normal/menu.c @@ -43,9 +43,20 @@ grub_err_t (*grub_gfxmenu_try_hook) (int entry, grub_menu_t menu, void grub_wait_after_message (void) { + grub_uint64_t endtime; grub_xputs ("\n"); grub_printf_ (N_("Press any key to continue...")); - (void) grub_getkey (); + grub_refresh (); + + endtime = grub_get_time_ms () + 10000; + + while (grub_get_time_ms () < endtime) + if (grub_checkkey () >= 0) + { + grub_getkey (); + break; + } + grub_xputs ("\n"); } From b4c1aae0f172c77599b284ebe1b301376c01d903 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Mon, 30 Aug 2010 01:56:35 +0200 Subject: [PATCH 5/6] * docs/grub.texi (Network): Fix reference to pxe_blksize. --- ChangeLog | 4 ++++ docs/grub.texi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 095cec7f7..eb4c8a51b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2010-08-30 Vladimir Serbinenko + + * docs/grub.texi (Network): Fix reference to pxe_blksize. + 2010-08-30 Vladimir Serbinenko * grub-core/normal/menu.c (grub_wait_after_message): Add a 10 second diff --git a/docs/grub.texi b/docs/grub.texi index 4c96f254f..18dc39389 100644 --- a/docs/grub.texi +++ b/docs/grub.texi @@ -1436,7 +1436,7 @@ The boot file name provided by DHCP. Read-only. The name of the DHCP server responsible for these boot parameters. Read-only. -@item net_pxe_blksize +@item pxe_blksize The PXE transfer block size. Read-write, defaults to 512. @item pxe_default_server From e176a764eeaa321278a359a4d72781919a46614a Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Mon, 30 Aug 2010 02:01:59 +0200 Subject: [PATCH 6/6] Add missing Reported by --- ChangeLog | 1 + 1 file changed, 1 insertion(+) diff --git a/ChangeLog b/ChangeLog index eb4c8a51b..1a0085d9a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,7 @@ 2010-08-30 Vladimir Serbinenko * docs/grub.texi (Network): Fix reference to pxe_blksize. + Reported by: Ian Turner 2010-08-30 Vladimir Serbinenko