* [edk2-platforms][PATCH v1] BoardModulePkg/BoardBdsHookLib: Fix mSetupOptionNumber check
@ 2021-08-28 19:42 Benjamin Doron
2021-08-29 1:27 ` [edk2-devel] " Nate DeSimone
2021-08-29 1:32 ` Nate DeSimone
0 siblings, 2 replies; 3+ messages in thread
From: Benjamin Doron @ 2021-08-28 19:42 UTC (permalink / raw)
To: devel; +Cc: Eric Dong, Liming Gao, Nate DeSimone
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [edk2-platforms][PATCH v1] BoardModulePkg/BoardBdsHookLib: Fix mSetupOptionNumber check
2021-08-28 19:42 [edk2-platforms][PATCH v1] BoardModulePkg/BoardBdsHookLib: Fix mSetupOptionNumber check Benjamin Doron
@ 2021-08-29 1:27 ` Nate DeSimone
2021-08-29 1:32 ` Nate DeSimone
1 sibling, 0 replies; 3+ messages in thread
From: Nate DeSimone @ 2021-08-29 1:27 UTC (permalink / raw)
To: devel@edk2.groups.io, benjamin.doron00@gmail.com; +Cc: Dong, Eric, Liming Gao
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] -=-=-=-=-=-=
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [edk2-devel] [edk2-platforms][PATCH v1] BoardModulePkg/BoardBdsHookLib: Fix mSetupOptionNumber check
2021-08-28 19:42 [edk2-platforms][PATCH v1] BoardModulePkg/BoardBdsHookLib: Fix mSetupOptionNumber check Benjamin Doron
2021-08-29 1:27 ` [edk2-devel] " Nate DeSimone
@ 2021-08-29 1:32 ` Nate DeSimone
1 sibling, 0 replies; 3+ messages in thread
From: Nate DeSimone @ 2021-08-29 1:32 UTC (permalink / raw)
To: devel@edk2.groups.io, benjamin.doron00@gmail.com; +Cc: Dong, Eric, Liming Gao
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] -=-=-=-=-=-=
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-08-29 1:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-28 19:42 [edk2-platforms][PATCH v1] BoardModulePkg/BoardBdsHookLib: Fix mSetupOptionNumber check Benjamin Doron
2021-08-29 1:27 ` [edk2-devel] " Nate DeSimone
2021-08-29 1:32 ` Nate DeSimone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox