kern/term: Make grub_getkeystatus() helper function available everywhere
Move grub_getkeystatushelper() function from grub-core/commands/keystatus.c to grub-core/kern/term.c and export it so that it can be used outside of the keystatus command code too. There's no logic change in this patch. The function definition is moved so it can be called from grub-core/kern/term.c in a subsequent patch. It will be used to determine if a SHIFT key has was held down and use that also to interrupt the countdown, without the need to press a key at the right time. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
30586747f1
commit
5bcdf67642
3 changed files with 19 additions and 18 deletions
|
@ -120,6 +120,24 @@ grub_getkey (void)
|
|||
}
|
||||
}
|
||||
|
||||
int
|
||||
grub_getkeystatus (void)
|
||||
{
|
||||
int status = 0;
|
||||
grub_term_input_t term;
|
||||
|
||||
if (grub_term_poll_usb)
|
||||
grub_term_poll_usb (0);
|
||||
|
||||
FOR_ACTIVE_TERM_INPUTS(term)
|
||||
{
|
||||
if (term->getkeystatus)
|
||||
status |= term->getkeystatus (term);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
void
|
||||
grub_refresh (void)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue