Skip to content

Commit

Permalink
12090 loader.efi: efi_readkey_ex needs to check the key despite the s…
Browse files Browse the repository at this point in the history
…hift status or toggle status

Reviewed by: John Levon <john.levon@joyent.com>
Approved by: Dan McDonald <danmcd@joyent.com>
  • Loading branch information
tsoome committed Dec 18, 2019
1 parent 5947648 commit bf74bfd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion usr/src/boot/Makefile.version
Expand Up @@ -33,4 +33,4 @@ LOADER_VERSION = 1.1
# Use date like formatting here, YYYY.MM.DD.XX, without leading zeroes.
# The version is processed from left to right, the version number can only
# be increased.
BOOT_VERSION = $(LOADER_VERSION)-2019.12.18.1
BOOT_VERSION = $(LOADER_VERSION)-2019.12.18.2
12 changes: 8 additions & 4 deletions usr/src/boot/sys/boot/efi/libefi/efi_console.c
Expand Up @@ -674,11 +674,15 @@ efi_readkey_ex(EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *coninex)
kp->UnicodeChar++;
}
}
if (kp->ScanCode == 0 && kp->UnicodeChar == 0)
return (false);
keybuf_inschar(kp);
return (true);
}
/*
* The shift state and/or toggle state may not be valid,
* but we still can have ScanCode or UnicodeChar.
*/
if (kp->ScanCode == 0 && kp->UnicodeChar == 0)
return (false);
keybuf_inschar(kp);
return (true);
}
return (false);
}
Expand Down

0 comments on commit bf74bfd

Please sign in to comment.