Macroify GRUB_TERM_NO_KEY and use grub_checkkey in grub_getkey

This commit is contained in:
Vladimir 'phcoder' Serbinenko committed 2010-08-23 12:53:42 +02:00
1 parent df2174dded
commit 9518e2a12b
7 files changed
+39 -47

No files matched your search

+2 -2
View File
@@ -120,14 +120,14 @@ grub_console_getkey (struct grub_term_input *term __attribute__ ((unused)))
status = efi_call_2 (i->read_key_stroke, i, &key);
if (status != GRUB_EFI_SUCCESS)
return -1;
return GRUB_TERM_NO_KEY;
if (key.scan_code == 0)
return key.unicode_char;
else if (key.scan_code < ARRAY_SIZE (efi_codes))
return efi_codes[key.scan_code];
return -1;
return GRUB_TERM_NO_KEY;
}
static grub_uint16_t