Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
If CreateFvBootOption() fails, RegisterFvBootOption() will return
LoadOptionNumberUnassigned, which is non-zero. Therefore, correct the
check when attempting to register hotkeys, to be able to detect if UiApp
is not present.
Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Nate DeSimone <nathaniel.l.desimone@intel.com>
Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com>
---
Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c
index a07abb214913..1fd0de3961cc 100644
--- a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c
+++ b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c
@@ -440,7 +440,7 @@ RegisterStaticHotkey (
//
// [F2]/[F7]
//
- if (mSetupOptionNumber) {
+ if (mSetupOptionNumber != LoadOptionNumberUnassigned) {
F2.Key.ScanCode = SCAN_F2;
F2.Key.UnicodeChar = CHAR_NULL;
F2.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID;
--
2.31.1
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#79914): https://edk2.groups.io/g/devel/message/79914
Mute This Topic: https://groups.io/mt/85215635/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com> -----Original Message----- From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Benjamin Doron Sent: Saturday, August 28, 2021 12:42 PM To: devel@edk2.groups.io Cc: Dong, Eric <eric.dong@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com> Subject: [edk2-devel] [edk2-platforms][PATCH v1] BoardModulePkg/BoardBdsHookLib: Fix mSetupOptionNumber check If CreateFvBootOption() fails, RegisterFvBootOption() will return LoadOptionNumberUnassigned, which is non-zero. Therefore, correct the check when attempting to register hotkeys, to be able to detect if UiApp is not present. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com> --- Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c index a07abb214913..1fd0de3961cc 100644 --- a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c +++ b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOpt +++ ion.c @@ -440,7 +440,7 @@ RegisterStaticHotkey ( // // [F2]/[F7] //- if (mSetupOptionNumber) {+ if (mSetupOptionNumber != LoadOptionNumberUnassigned) { F2.Key.ScanCode = SCAN_F2; F2.Key.UnicodeChar = CHAR_NULL; F2.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID;-- 2.31.1 -=-=-=-=-=-= Groups.io Links: You receive all messages sent to this group. View/Reply Online (#79914): https://edk2.groups.io/g/devel/message/79914 Mute This Topic: https://groups.io/mt/85215635/1767664 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [nathaniel.l.desimone@intel.com] -=-=-=-=-=-= -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#79921): https://edk2.groups.io/g/devel/message/79921 Mute This Topic: https://groups.io/mt/85215635/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
Pushed: https://github.com/tianocore/edk2-platforms/commit/4060974 -----Original Message----- From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Benjamin Doron Sent: Saturday, August 28, 2021 12:42 PM To: devel@edk2.groups.io Cc: Dong, Eric <eric.dong@intel.com>; Liming Gao <gaoliming@byosoft.com.cn>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com> Subject: [edk2-devel] [edk2-platforms][PATCH v1] BoardModulePkg/BoardBdsHookLib: Fix mSetupOptionNumber check If CreateFvBootOption() fails, RegisterFvBootOption() will return LoadOptionNumberUnassigned, which is non-zero. Therefore, correct the check when attempting to register hotkeys, to be able to detect if UiApp is not present. Cc: Eric Dong <eric.dong@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com> --- Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c index a07abb214913..1fd0de3961cc 100644 --- a/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c +++ b/Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOpt +++ ion.c @@ -440,7 +440,7 @@ RegisterStaticHotkey ( // // [F2]/[F7] //- if (mSetupOptionNumber) {+ if (mSetupOptionNumber != LoadOptionNumberUnassigned) { F2.Key.ScanCode = SCAN_F2; F2.Key.UnicodeChar = CHAR_NULL; F2.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID;-- 2.31.1 -=-=-=-=-=-= Groups.io Links: You receive all messages sent to this group. View/Reply Online (#79914): https://edk2.groups.io/g/devel/message/79914 Mute This Topic: https://groups.io/mt/85215635/1767664 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [nathaniel.l.desimone@intel.com] -=-=-=-=-=-= -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#79923): https://edk2.groups.io/g/devel/message/79923 Mute This Topic: https://groups.io/mt/85215635/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=-=-=-=-=-=-=-=-=-=-=-
© 2016 - 2024 Red Hat, Inc.