/** @file\r
Hotkey library functions.\r
\r
-Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
{\r
UINTN Index;\r
UINTN Uint;\r
- \r
+\r
if (!CompareGuid (Guid, &gEfiGlobalVariableGuid) ||\r
(StrSize (Name) != sizeof (L"Key####")) ||\r
(StrnCmp (Name, L"Key", 3) != 0)\r
HotkeyData = &Hotkey->KeyData[Hotkey->WaitingKey];\r
if ((KeyData->Key.ScanCode == HotkeyData->Key.ScanCode) &&\r
(KeyData->Key.UnicodeChar == HotkeyData->Key.UnicodeChar) &&\r
- (((KeyData->KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0) ? \r
+ (((KeyData->KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0) ?\r
(KeyData->KeyState.KeyShiftState == HotkeyData->KeyState.KeyShiftState) : TRUE\r
)\r
) {\r
EFI_STATUS Status;\r
EFI_BOOT_MANAGER_KEY_OPTION KeyOption;\r
VA_LIST Args;\r
- \r
+\r
if (mBmContinueKeyOption != NULL) {\r
return EFI_ALREADY_STARTED;\r
}\r
\r
/**\r
Stop the hotkey processing.\r
- \r
+\r
@param Event Event pointer related to hotkey service.\r
@param Context Context pass to this function.\r
**/\r
/**\r
Start the hot key service so that the key press can trigger the boot option.\r
\r
- @param HotkeyTriggered Return the waitable event and it will be signaled \r
+ @param HotkeyTriggered Return the waitable event and it will be signaled\r
when a valid hot key is pressed.\r
\r
@retval EFI_SUCCESS The hot key service is started.\r
EFI_EVENT Event;\r
UINT32 *BootOptionSupport;\r
\r
- Status = GetEfiGlobalVariable2 (EFI_BOOT_OPTION_SUPPORT_VARIABLE_NAME, (VOID **) &BootOptionSupport, NULL);\r
- ASSERT (BootOptionSupport != NULL);\r
-\r
- if ((*BootOptionSupport & EFI_BOOT_OPTION_SUPPORT_KEY) != 0) {\r
- mBmHotkeySupportCount = ((*BootOptionSupport & EFI_BOOT_OPTION_SUPPORT_COUNT) >> LowBitSet32 (EFI_BOOT_OPTION_SUPPORT_COUNT));\r
+ GetEfiGlobalVariable2 (EFI_BOOT_OPTION_SUPPORT_VARIABLE_NAME, (VOID **) &BootOptionSupport, NULL);\r
+ if (BootOptionSupport != NULL) {\r
+ if ((*BootOptionSupport & EFI_BOOT_OPTION_SUPPORT_KEY) != 0) {\r
+ mBmHotkeySupportCount = ((*BootOptionSupport & EFI_BOOT_OPTION_SUPPORT_COUNT) >> LowBitSet32 (EFI_BOOT_OPTION_SUPPORT_COUNT));\r
+ }\r
+ FreePool (BootOptionSupport);\r
}\r
- FreePool (BootOptionSupport);\r
\r
if (mBmHotkeySupportCount == 0) {\r
DEBUG ((EFI_D_INFO, "Bds: BootOptionSupport NV variable forbids starting the hotkey service.\n"));\r