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

@ -296,14 +296,9 @@ BootMaintCallback (
UINT8 *NewLegacyDev; UINT8 *NewLegacyDev;
UINT8 *DisMap; UINT8 *DisMap;
EFI_FORM_ID FormId; EFI_FORM_ID FormId;
Status = EFI_SUCCESS;
if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) { if (Action == EFI_BROWSER_ACTION_CHANGING) {
//
// Do nothing for UEFI OPEN/CLOSE Action
//
return EFI_SUCCESS;
}
if ((Value == NULL) || (ActionRequest == NULL)) { if ((Value == NULL) || (ActionRequest == NULL)) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
@ -636,10 +631,15 @@ BootMaintCallback (
// Pass changed uncommitted data back to Form Browser // Pass changed uncommitted data back to Form Browser
// //
Status = HiiSetBrowserData (&mBootMaintGuid, mBootMaintStorageName, sizeof (BMM_FAKE_NV_DATA), (UINT8 *) CurrentFakeNVMap, NULL); Status = HiiSetBrowserData (&mBootMaintGuid, mBootMaintStorageName, sizeof (BMM_FAKE_NV_DATA), (UINT8 *) CurrentFakeNVMap, NULL);
return Status; return Status;
} }
//
// All other action return unsupported.
//
return EFI_UNSUPPORTED;
}
/** /**
Function handling request to apply changes for BMM pages. Function handling request to apply changes for BMM pages.

View File

@ -1,7 +1,7 @@
/** @file /** @file
File explorer related functions. File explorer related functions.
Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.<BR> Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at which accompanies this distribution. The full text of the license may be found at
@ -249,13 +249,7 @@ FileExplorerCallback (
FILE_EXPLORER_NV_DATA *NvRamMap; FILE_EXPLORER_NV_DATA *NvRamMap;
EFI_STATUS Status; EFI_STATUS Status;
if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) { if (Action == EFI_BROWSER_ACTION_CHANGING) {
//
// Do nothing for UEFI OPEN/CLOSE Action
//
return EFI_SUCCESS;
}
if ((Value == NULL) || (ActionRequest == NULL)) { if ((Value == NULL) || (ActionRequest == NULL)) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
@ -319,3 +313,8 @@ FileExplorerCallback (
return Status; return Status;
} }
//
// All other action return unsupported.
//
return EFI_UNSUPPORTED;
}

View File

@ -99,13 +99,7 @@ BootManagerCallback (
LIST_ENTRY *Link; LIST_ENTRY *Link;
UINT16 KeyCount; UINT16 KeyCount;
if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) { if (Action == EFI_BROWSER_ACTION_CHANGING) {
//
// Do nothing for UEFI OPEN/CLOSE Action
//
return EFI_SUCCESS;
}
if ((Value == NULL) || (ActionRequest == NULL)) { if ((Value == NULL) || (ActionRequest == NULL)) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
@ -142,6 +136,12 @@ BootManagerCallback (
return EFI_SUCCESS; return EFI_SUCCESS;
} }
//
// All other action return unsupported.
//
return EFI_UNSUPPORTED;
}
/** /**
Registers HII packages for the Boot Manger to HII Database. Registers HII packages for the Boot Manger to HII Database.

View File

@ -142,19 +142,12 @@ DeviceManagerCallback (
{ {
UINTN CurIndex; UINTN CurIndex;
if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) { if (Action == EFI_BROWSER_ACTION_CHANGING) {
//
// Do nothing for UEFI OPEN/CLOSE Action
//
return EFI_SUCCESS;
}
if ((Value == NULL) || (ActionRequest == NULL)) { if ((Value == NULL) || (ActionRequest == NULL)) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
gCallbackKey = QuestionId; gCallbackKey = QuestionId;
if ((QuestionId < MAX_KEY_SECTION_LEN + NETWORK_DEVICE_LIST_KEY_OFFSET) && (QuestionId >= NETWORK_DEVICE_LIST_KEY_OFFSET)) { if ((QuestionId < MAX_KEY_SECTION_LEN + NETWORK_DEVICE_LIST_KEY_OFFSET) && (QuestionId >= NETWORK_DEVICE_LIST_KEY_OFFSET)) {
// //
// If user select the mac address, need to record mac address string to support next form show. // If user select the mac address, need to record mac address string to support next form show.
@ -174,6 +167,12 @@ DeviceManagerCallback (
return EFI_SUCCESS; return EFI_SUCCESS;
} }
//
// All other action return unsupported.
//
return EFI_UNSUPPORTED;
}
/** /**
This function registers HII packages to HII database. This function registers HII packages to HII database.
@ -1109,13 +1108,7 @@ DriverHealthCallback (
OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest OUT EFI_BROWSER_ACTION_REQUEST *ActionRequest
) )
{ {
if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) { if (Action == EFI_BROWSER_ACTION_CHANGING) {
//
// Do nothing for UEFI OPEN/CLOSE Action
//
return EFI_SUCCESS;
}
if ((Value == NULL) || (ActionRequest == NULL)) { if ((Value == NULL) || (ActionRequest == NULL)) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
@ -1130,6 +1123,12 @@ DriverHealthCallback (
return EFI_SUCCESS; return EFI_SUCCESS;
} }
//
// All other action return unsupported.
//
return EFI_UNSUPPORTED;
}
/** /**
Collect and display the platform's driver health relative information, allow user to do interactive Collect and display the platform's driver health relative information, allow user to do interactive
operation while the platform is unhealthy. operation while the platform is unhealthy.

View File

@ -174,13 +174,7 @@ FrontPageCallback (
CHAR8 *PlatformSupportedLanguages; CHAR8 *PlatformSupportedLanguages;
CHAR8 *BestLanguage; CHAR8 *BestLanguage;
if ((Action == EFI_BROWSER_ACTION_FORM_OPEN) || (Action == EFI_BROWSER_ACTION_FORM_CLOSE)) { if (Action == EFI_BROWSER_ACTION_CHANGING) {
//
// Do nothing for UEFI OPEN/CLOSE Action
//
return EFI_SUCCESS;
}
if ((Value == NULL) || (ActionRequest == NULL)) { if ((Value == NULL) || (ActionRequest == NULL)) {
return EFI_INVALID_PARAMETER; return EFI_INVALID_PARAMETER;
} }
@ -288,6 +282,12 @@ FrontPageCallback (
return EFI_SUCCESS; return EFI_SUCCESS;
} }
//
// All other action return unsupported.
//
return EFI_UNSUPPORTED;
}
/** /**
Initialize HII information for the FrontPage Initialize HII information for the FrontPage