mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-27 04:09:41 +00:00
Only fix up powerpc key repeat on IEEE1275 machines. Fixes powerpc-emu
compilation.
This commit is contained in:
parent
262c94c0e7
commit
e3a69c7dc5
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -1,6 +1,8 @@
|
||||
grub2 (2.00-4) UNRELEASED; urgency=low
|
||||
|
||||
* Fix platform postinsts to handle new core.img location.
|
||||
* Only fix up powerpc key repeat on IEEE1275 machines. Fixes powerpc-emu
|
||||
compilation.
|
||||
|
||||
-- Colin Watson <cjwatson@debian.org> Fri, 14 Sep 2012 10:28:00 +0100
|
||||
|
||||
|
52
debian/patches/fix_powerpc_emu.patch
vendored
Normal file
52
debian/patches/fix_powerpc_emu.patch
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
Description: Only fix up powerpc key repeat on IEEE1275 machines.
|
||||
Fixes powerpc-emu compilation.
|
||||
Author: Colin Watson <cjwatson@ubuntu.com>
|
||||
Origin: upstream, http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/4580
|
||||
Forwarded: not-needed
|
||||
Applied-Upstream: http://bazaar.launchpad.net/~vcs-imports/grub/grub2-bzr/revision/4580
|
||||
Last-Update: 2012-09-14
|
||||
|
||||
Index: b/grub-core/term/terminfo.c
|
||||
===================================================================
|
||||
--- a/grub-core/term/terminfo.c
|
||||
+++ b/grub-core/term/terminfo.c
|
||||
@@ -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_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 @@
|
||||
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: b/include/grub/terminfo.h
|
||||
===================================================================
|
||||
--- a/include/grub/terminfo.h
|
||||
+++ b/include/grub/terminfo.h
|
||||
@@ -32,7 +32,7 @@
|
||||
{
|
||||
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
|
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -16,3 +16,4 @@ restore_mkdevicemap.patch
|
||||
efi_mmap_size.patch
|
||||
gettext_quiet.patch
|
||||
mkconfig_mid_upgrade.patch
|
||||
fix_powerpc_emu.patch
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user