summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/BdsDxe/Hotkey.c
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-26 02:22:37 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-12-26 02:22:37 +0000
commit98cf93471dc3c2bf4e277d42a88cf5d5548dc7b9 (patch)
tree670aa11051ee39b5082e144ff69a7e1daa50758e /MdeModulePkg/Universal/BdsDxe/Hotkey.c
parent7557df4df36b29baa1c3b65dba90d415b7896e05 (diff)
downloadedk2-platforms-98cf93471dc3c2bf4e277d42a88cf5d5548dc7b9.tar.xz
Refine function comments for BdsDxe module.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7127 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/BdsDxe/Hotkey.c')
-rw-r--r--MdeModulePkg/Universal/BdsDxe/Hotkey.c23
1 files changed, 6 insertions, 17 deletions
diff --git a/MdeModulePkg/Universal/BdsDxe/Hotkey.c b/MdeModulePkg/Universal/BdsDxe/Hotkey.c
index 96ce6d7238..9efba6d730 100644
--- a/MdeModulePkg/Universal/BdsDxe/Hotkey.c
+++ b/MdeModulePkg/Universal/BdsDxe/Hotkey.c
@@ -23,10 +23,8 @@ VOID *mHotkeyRegistration;
/**
-
Check if the Key Option is valid or not.
-
@param KeyOption The Hot Key Option to be checked.
@retval TRUE The Hot Key Option is valid.
@@ -67,15 +65,14 @@ IsKeyOptionValid (
}
/**
-
Create Key#### for the given hotkey.
-
@param KeyOption The Hot Key Option to be added.
@param KeyOptionNumber The key option number for Key#### (optional).
@retval EFI_SUCCESS Register hotkey successfully.
@retval EFI_INVALID_PARAMETER The hotkey option is invalid.
+ @retval EFI_OUT_OF_RESOURCES Fail to allocate memory resource.
**/
EFI_STATUS
@@ -110,7 +107,6 @@ RegisterHotkey (
//
// check whether HotKey conflict with keys used by Setup Browser
//
-
KeyOrder = BdsLibGetVariableAndSize (
VAR_KEY_ORDER,
&gEfiGlobalVariableGuid,
@@ -187,7 +183,7 @@ RegisterHotkey (
KeyOption
);
if (EFI_ERROR (Status)) {
- gBS->FreePool (KeyOrder);
+ FreePool (KeyOrder);
return Status;
}
@@ -201,6 +197,7 @@ RegisterHotkey (
NewKeyOrder = AllocatePool (KeyOrderSize);
if (NewKeyOrder == NULL) {
+ FreePool (KeyOrder);
return EFI_OUT_OF_RESOURCES;
}
@@ -307,11 +304,10 @@ UnregisterHotkey (
This is the common notification function for HotKeys, it will be registered
with SimpleTextInEx protocol interface - RegisterKeyNotify() of ConIn handle.
-
@param KeyData A pointer to a buffer that is filled in with the keystroke
information for the key that was pressed.
- @retval EFI_SUCCESS KeyData is successfully processed.
+ @retval EFI_SUCCESS KeyData is successfully processed.
**/
EFI_STATUS
@@ -427,10 +423,8 @@ HotkeyCallback (
}
/**
-
Register the common HotKey notify function to given SimpleTextInEx protocol instance.
-
@param SimpleTextInEx Simple Text Input Ex protocol instance
@retval EFI_SUCCESS Register hotkey notification function successfully.
@@ -481,12 +475,9 @@ HotkeyRegisterNotify (
/**
Callback function for SimpleTextInEx protocol install events
-
@param Event the event that is signaled.
@param Context not used here.
- @return VOID
-
**/
VOID
EFIAPI
@@ -528,14 +519,12 @@ HotkeyEvent (
}
/**
-
Insert Key Option to hotkey list.
-
@param KeyOption The Hot Key Option to be added to hotkey list.
- @retval EFI_SUCCESS Add to hotkey list success.
-
+ @retval EFI_SUCCESS Add to hotkey list success.
+ @retval EFI_OUT_OF_RESOURCES Fail to allocate memory resource.
**/
EFI_STATUS
HotkeyInsertList (