Refine all R9 call back function to return EFI_UNSUPPORTED for all unsupported call back type.

Signed-off-by:  ydong10
Reviewed-by: lgao4


git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11681 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
ydong10
2011-05-20 01:33:42 +00:00
parent d664f8a25c
commit d88f86f154
5 changed files with 544 additions and 546 deletions

View File

@@ -99,47 +99,47 @@ BootManagerCallback (
LIST_ENTRY *Link;
UINT16 KeyCount;
if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) {
if (Action == EFI_BROWSER_ACTION_CHANGING) {
if ((Value == NULL) || (ActionRequest == NULL)) {
return EFI_INVALID_PARAMETER;
}
//
// Do nothing for UEFI OPEN/CLOSE Action
// Initialize the key count
//
KeyCount = 0;
for (Link = GetFirstNode (&mBootOptionsList); !IsNull (&mBootOptionsList, Link); Link = GetNextNode (&mBootOptionsList, Link)) {
Option = CR (Link, BDS_COMMON_OPTION, Link, BDS_LOAD_OPTION_SIGNATURE);
KeyCount++;
gOption = Option;
//
// Is this device the one chosen?
//
if (KeyCount == QuestionId) {
//
// Assigning the returned Key to a global allows the original routine to know what was chosen
//
mKeyInput = QuestionId;
//
// Request to exit SendForm(), so that we could boot the selected option
//
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
break;
}
}
return EFI_SUCCESS;
}
if ((Value == NULL) || (ActionRequest == NULL)) {
return EFI_INVALID_PARAMETER;
}
//
// Initialize the key count
// All other action return unsupported.
//
KeyCount = 0;
for (Link = GetFirstNode (&mBootOptionsList); !IsNull (&mBootOptionsList, Link); Link = GetNextNode (&mBootOptionsList, Link)) {
Option = CR (Link, BDS_COMMON_OPTION, Link, BDS_LOAD_OPTION_SIGNATURE);
KeyCount++;
gOption = Option;
//
// Is this device the one chosen?
//
if (KeyCount == QuestionId) {
//
// Assigning the returned Key to a global allows the original routine to know what was chosen
//
mKeyInput = QuestionId;
//
// Request to exit SendForm(), so that we could boot the selected option
//
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
break;
}
}
return EFI_SUCCESS;
return EFI_UNSUPPORTED;
}
/**