* grub-core/term/terminfo.c: Only fix up powerpc key repeat on

IEEE1275 machines.  Fixes powerpc-emu compilation.
* include/grub/terminfo.h: Likewise.
This commit is contained in:
Colin Watson 2012-09-14 11:23:36 +01:00
parent 3bfa763c48
commit dfd39dbdea
3 changed files with 10 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2012-09-14 Colin Watson <cjwatson@ubuntu.com>
* grub-core/term/terminfo.c: Only fix up powerpc key repeat on
IEEE1275 machines. Fixes powerpc-emu compilation.
* include/grub/terminfo.h: Likewise.
2012-09-12 Vladimir Serbinenko <phcoder@gmail.com>
* include/grub/efi/api.h (grub_efi_runtime_services): Make vendor_guid

View file

@ -33,7 +33,7 @@
#include <grub/extcmd.h>
#include <grub/i18n.h>
#include <grub/time.h>
#ifdef __powerpc__
#if defined(__powerpc__) && defined(GRUB_MACHINE_IEEE1275)
#include <grub/ieee1275/ieee1275.h>
#endif
@ -563,7 +563,7 @@ grub_terminfo_getkey (struct grub_term_input *termi)
grub_terminfo_readkey (termi, data->input_buf,
&data->npending, data->readkey);
#ifdef __powerpc__
#if defined(__powerpc__) && defined(GRUB_MACHINE_IEEE1275)
if (data->npending == 1 && data->input_buf[0] == '\e'
&& grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_BROKEN_REPEAT)
&& grub_get_time_ms () - data->last_key_time < 1000
@ -580,7 +580,7 @@ grub_terminfo_getkey (struct grub_term_input *termi)
int ret;
data->npending--;
ret = data->input_buf[0];
#ifdef __powerpc__
#if defined(__powerpc__) && defined(GRUB_MACHINE_IEEE1275)
if (grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_BROKEN_REPEAT))
{
data->last_key = ret;

View file

@ -32,7 +32,7 @@ struct grub_terminfo_input_state
{
int input_buf[GRUB_TERMINFO_READKEY_MAX_LEN];
int npending;
#ifdef __powerpc__
#if defined(__powerpc__) && defined(GRUB_MACHINE_IEEE1275)
int last_key;
grub_uint64_t last_key_time;
#endif