]> git.proxmox.com Git - grub2.git/commitdiff
* grub-core/term/terminfo.c: Only fix up powerpc key repeat on
authorColin Watson <cjwatson@ubuntu.com>
Fri, 14 Sep 2012 10:23:36 +0000 (11:23 +0100)
committerColin Watson <cjwatson@ubuntu.com>
Fri, 14 Sep 2012 10:23:36 +0000 (11:23 +0100)
IEEE1275 machines.  Fixes powerpc-emu compilation.
* include/grub/terminfo.h: Likewise.

ChangeLog
grub-core/term/terminfo.c
include/grub/terminfo.h

index 527e9d17c47424b1ce3a48a42ee9abad3f2b98d5..941ed9300a49df20f5b771f2b2d00d16dae5f7b0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index e35563f06a761c1efab3f903bdd8f8b4383c84ac..d421e4e40d4db7fc88c9fae65e7ee3b772c69d35 100644 (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;
index c081a92e10f088e7eecfae0d8670eb27566a3d83..20541a9498df6a1eb0f9e584307079a15fcc87b9 100644 (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