]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/kern/i386/pc/startup.S (grub_console_getkey): Fix incorrect
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 6 Oct 2010 17:46:20 +0000 (19:46 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 6 Oct 2010 17:46:20 +0000 (19:46 +0200)
handling of special keys.

ChangeLog
grub-core/kern/i386/pc/startup.S

index 61810897b08d2e88432ab2767030de3c9ce84b12..09b5d5c2973761cf6aff8a74847e78f69b343292 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-09  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/kern/i386/pc/startup.S (grub_console_getkey): Fix incorrect
+       handling of special keys.
+
 2010-10-02  Aleš Nesrsta <starous@volny.cz>
 
        * include/grub/scsi.h (grub_make_scsi_id): Fix incorrect usgae of
index c4abc31b89fb26b9349efa907ca29b027aa24a7c..31bd86c6531565ddbb2065aeb8d591a1a54b705a 100644 (file)
@@ -615,6 +615,7 @@ LOCAL(bypass_table_end):
 
 FUNCTION(grub_console_getkey)
        pushl   %ebp
+       pushl   %edi
 
        call    prot_to_real
        .code16
@@ -644,15 +645,16 @@ FUNCTION(grub_console_getkey)
        jz      1f
 
        andl    %edx, %eax
-       cmp     %eax, 0x20
+       cmpl    $0x20, %eax
        ja      2f
        movl    %edx, %eax
-       leal    LOCAL(bypass_table), %esi
+       leal    LOCAL(bypass_table), %edi
        movl    $((LOCAL(bypass_table_end) - LOCAL(bypass_table)) / 2), %ecx
-       repne cmpsw
+       repne scasw 
        jz      3f
 
-       addl    $('a' - 1 | GRUB_TERM_CTRL), %eax
+       andl    $0xff, %eax
+       addl    $(('a' - 1) | GRUB_TERM_CTRL), %eax
        jmp     2f
 3:
        andl    $0xff, %eax
@@ -661,7 +663,8 @@ FUNCTION(grub_console_getkey)
 1:     movl    %edx, %eax
        shrl    $8, %eax
        orl     $GRUB_TERM_EXTENDED, %eax
-2:     
+2:
+       popl    %edi
        popl    %ebp
        ret