* grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set

GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN on mac.
	* grub-core/term/ieee1275/console.c (grub_console_init_lately): Use
	ieee1275-nocursor if GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN is set.
	* grub-core/term/terminfo.c (grub_terminfo_set_current): Add new type
	ieee1275-nocursor.
	* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New value
	GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-09-18 11:52:19 +02:00
parent 4e09245441
commit 7ddffdadea
5 changed files with 29 additions and 5 deletions

View file

@ -1,3 +1,14 @@
2012-09-18 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Set
GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN on mac.
* grub-core/term/ieee1275/console.c (grub_console_init_lately): Use
ieee1275-nocursor if GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN is set.
* grub-core/term/terminfo.c (grub_terminfo_set_current): Add new type
ieee1275-nocursor.
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New value
GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN.
2012-09-18 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/loader/i386/linux.c (grub_cmd_linux): Fix incorrect

View file

@ -117,6 +117,7 @@ grub_ieee1275_find_options (void)
grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_BROKEN_ADDRESS_CELLS);
grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX);
grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_VIRT_TO_REAL_BROKEN);
grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN);
break;
}
}

View file

@ -247,9 +247,10 @@ grub_console_init_lately (void)
if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_NO_ANSI))
type = "dumb";
else if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN))
type = "ieee1275-nocursor";
else
type = "ieee1275";
grub_terminfo_init ();
grub_terminfo_output_register (&grub_console_term_output, type);
}

View file

@ -143,7 +143,8 @@ grub_terminfo_set_current (struct grub_term_output *term,
return grub_errno;
}
if (grub_strcmp ("ieee1275", str) == 0)
if (grub_strcmp ("ieee1275", str) == 0
|| grub_strcmp ("ieee1275-nocursor", str) == 0)
{
data->name = grub_strdup ("ieee1275");
data->gotoxy = grub_strdup ("\e[%i%p1%d;%p2%dH");
@ -153,8 +154,16 @@ grub_terminfo_set_current (struct grub_term_output *term,
data->cls = grub_strdup (" \e[2J");
data->reverse_video_on = grub_strdup ("\e[7m");
data->reverse_video_off = grub_strdup ("\e[m");
data->cursor_on = grub_strdup ("\e[?25h");
data->cursor_off = grub_strdup ("\e[?25l");
if (grub_strcmp ("ieee1275", str) == 0)
{
data->cursor_on = grub_strdup ("\e[?25h");
data->cursor_off = grub_strdup ("\e[?25l");
}
else
{
data->cursor_on = 0;
data->cursor_off = 0;
}
data->setcolor = grub_strdup ("\e[3%p1%dm\e[4%p2%dm");
return grub_errno;
}

View file

@ -123,7 +123,9 @@ enum grub_ieee1275_flag
GRUB_IEEE1275_FLAG_VIRT_TO_REAL_BROKEN,
GRUB_IEEE1275_FLAG_BROKEN_REPEAT
GRUB_IEEE1275_FLAG_BROKEN_REPEAT,
GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN,
};
extern int EXPORT_FUNC(grub_ieee1275_test_flag) (enum grub_ieee1275_flag flag);