Macroify GRUB_TERM_NO_KEY and use grub_checkkey in grub_getkey
This commit is contained in:
parent
df2174dded
commit
9518e2a12b
7 changed files with 39 additions and 47 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue