summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorToomas Soome <tsoome@me.com>2019-12-17 10:26:26 +0200
committerToomas Soome <tsoome@me.com>2019-12-18 22:50:05 +0200
commitbf74bfd433cc5106d2fffc63678efb6ba4a3694c (patch)
tree3066d2572c24c18ee0414a7b08ddc4640b7617e9 /usr/src
parent5947648b7f5c085635051e1f7aa083a309542467 (diff)
downloadillumos-joyent-bf74bfd433cc5106d2fffc63678efb6ba4a3694c.tar.gz
12090 loader.efi: efi_readkey_ex needs to check the key despite the shift status or toggle status
Reviewed by: John Levon <john.levon@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/boot/Makefile.version2
-rw-r--r--usr/src/boot/sys/boot/efi/libefi/efi_console.c12
2 files changed, 9 insertions, 5 deletions
diff --git a/usr/src/boot/Makefile.version b/usr/src/boot/Makefile.version
index c85166eca7..707e31612b 100644
--- a/usr/src/boot/Makefile.version
+++ b/usr/src/boot/Makefile.version
@@ -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
diff --git a/usr/src/boot/sys/boot/efi/libefi/efi_console.c b/usr/src/boot/sys/boot/efi/libefi/efi_console.c
index 34c88b6e99..37d07a8802 100644
--- a/usr/src/boot/sys/boot/efi/libefi/efi_console.c
+++ b/usr/src/boot/sys/boot/efi/libefi/efi_console.c
@@ -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);
}