@retval EFI_INVALID_PARAMETER KeyData is NULL or HelpString is NULL on register.\r
@retval EFI_NOT_FOUND KeyData is not found to be unregistered.\r
@retval EFI_UNSUPPORTED Key represents a printable character. It is conflicted with Browser.\r
+ @retval EFI_ALREADY_STARTED Key already been registered for one hot key.\r
**/\r
EFI_STATUS\r
EFIAPI\r
return EFI_NOT_FOUND;\r
}\r
}\r
- \r
+\r
+ if (HotKey != NULL) {\r
+ return EFI_ALREADY_STARTED;\r
+ }\r
+\r
//\r
- // Register HotKey into List.\r
+ // Create new Key, and add it into List.\r
//\r
- if (HotKey == NULL) {\r
- //\r
- // Create new Key, and add it into List.\r
- //\r
- HotKey = AllocateZeroPool (sizeof (BROWSER_HOT_KEY));\r
- ASSERT (HotKey != NULL);\r
- HotKey->Signature = BROWSER_HOT_KEY_SIGNATURE;\r
- HotKey->KeyData = AllocateCopyPool (sizeof (EFI_INPUT_KEY), KeyData);\r
- InsertTailList (&gBrowserHotKeyList, &HotKey->Link);\r
- }\r
+ HotKey = AllocateZeroPool (sizeof (BROWSER_HOT_KEY));\r
+ ASSERT (HotKey != NULL);\r
+ HotKey->Signature = BROWSER_HOT_KEY_SIGNATURE;\r
+ HotKey->KeyData = AllocateCopyPool (sizeof (EFI_INPUT_KEY), KeyData);\r
+ InsertTailList (&gBrowserHotKeyList, &HotKey->Link);\r
\r
//\r
// Fill HotKey information.\r