public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [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

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