Sfoglia il codice sorgente

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>
Reviewed-by: Nate DeSimone <nathaniel.l.desimone@intel.com>
Benjamin Doron 2 anni fa
parent
commit
4060974356

+ 1 - 1
Platform/Intel/BoardModulePkg/Library/BoardBdsHookLib/BoardBootOption.c

@@ -453,7 +453,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;