summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-05-20 01:33:42 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-05-20 01:33:42 +0000
commitd88f86f154ddbe39355fcf0aca03438f219b2660 (patch)
treef5443c8c2c011d77eddb53d28a13125f52ae331c /IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c
parentd664f8a25c2966326a5e153516395dd1925be806 (diff)
downloadedk2-platforms-d88f86f154ddbe39355fcf0aca03438f219b2660.tar.xz
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
Diffstat (limited to 'IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c')
-rw-r--r--IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c117
1 files changed, 58 insertions, 59 deletions
diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c
index 34b9f956ba..e078a722d8 100644
--- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c
+++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c
@@ -1,7 +1,7 @@
/** @file
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
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
@@ -249,73 +249,72 @@ FileExplorerCallback (
FILE_EXPLORER_NV_DATA *NvRamMap;
EFI_STATUS Status;
- 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;
+ }
+
+ Status = EFI_SUCCESS;
+ Private = FE_CALLBACK_DATA_FROM_THIS (This);
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
+
//
- // Do nothing for UEFI OPEN/CLOSE Action
+ // Retrieve uncommitted data from Form Browser
//
- return EFI_SUCCESS;
- }
+ NvRamMap = &Private->FeFakeNvData;
+ HiiGetBrowserData (&mFileExplorerGuid, mFileExplorerStorageName, sizeof (FILE_EXPLORER_NV_DATA), (UINT8 *) NvRamMap);
- if ((Value == NULL) || (ActionRequest == NULL)) {
- return EFI_INVALID_PARAMETER;
- }
-
- Status = EFI_SUCCESS;
- Private = FE_CALLBACK_DATA_FROM_THIS (This);
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
+ if (QuestionId == KEY_VALUE_SAVE_AND_EXIT_BOOT || QuestionId == KEY_VALUE_SAVE_AND_EXIT_DRIVER) {
+ //
+ // Apply changes and exit formset
+ //
+ if (FileExplorerStateAddBootOption == Private->FeCurrentState) {
+ Status = Var_UpdateBootOption (Private, NvRamMap);
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
- //
- // Retrieve uncommitted data from Form Browser
- //
- NvRamMap = &Private->FeFakeNvData;
- HiiGetBrowserData (&mFileExplorerGuid, mFileExplorerStorageName, sizeof (FILE_EXPLORER_NV_DATA), (UINT8 *) NvRamMap);
+ BOpt_GetBootOptions (Private);
+ CreateMenuStringToken (Private, Private->FeHiiHandle, &BootOptionMenu);
+ } else if (FileExplorerStateAddDriverOptionState == Private->FeCurrentState) {
+ Status = Var_UpdateDriverOption (
+ Private,
+ Private->FeHiiHandle,
+ NvRamMap->DescriptionData,
+ NvRamMap->OptionalData,
+ NvRamMap->ForceReconnect
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
- if (QuestionId == KEY_VALUE_SAVE_AND_EXIT_BOOT || QuestionId == KEY_VALUE_SAVE_AND_EXIT_DRIVER) {
- //
- // Apply changes and exit formset
- //
- if (FileExplorerStateAddBootOption == Private->FeCurrentState) {
- Status = Var_UpdateBootOption (Private, NvRamMap);
- if (EFI_ERROR (Status)) {
- return Status;
+ BOpt_GetDriverOptions (Private);
+ CreateMenuStringToken (Private, Private->FeHiiHandle, &DriverOptionMenu);
}
- BOpt_GetBootOptions (Private);
- CreateMenuStringToken (Private, Private->FeHiiHandle, &BootOptionMenu);
- } else if (FileExplorerStateAddDriverOptionState == Private->FeCurrentState) {
- Status = Var_UpdateDriverOption (
- Private,
- Private->FeHiiHandle,
- NvRamMap->DescriptionData,
- NvRamMap->OptionalData,
- NvRamMap->ForceReconnect
- );
- if (EFI_ERROR (Status)) {
- return Status;
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
+ } else if (QuestionId == KEY_VALUE_NO_SAVE_AND_EXIT_BOOT || QuestionId == KEY_VALUE_NO_SAVE_AND_EXIT_DRIVER) {
+ //
+ // Discard changes and exit formset
+ //
+ NvRamMap->OptionalData[0] = 0x0000;
+ NvRamMap->DescriptionData[0] = 0x0000;
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
+ } else if (QuestionId < FILE_OPTION_OFFSET) {
+ //
+ // Exit File Explorer formset
+ //
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
+ } else {
+ if (UpdateFileExplorer (Private, QuestionId)) {
+ *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
}
-
- BOpt_GetDriverOptions (Private);
- CreateMenuStringToken (Private, Private->FeHiiHandle, &DriverOptionMenu);
}
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
- } else if (QuestionId == KEY_VALUE_NO_SAVE_AND_EXIT_BOOT || QuestionId == KEY_VALUE_NO_SAVE_AND_EXIT_DRIVER) {
- //
- // Discard changes and exit formset
- //
- NvRamMap->OptionalData[0] = 0x0000;
- NvRamMap->DescriptionData[0] = 0x0000;
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
- } else if (QuestionId < FILE_OPTION_OFFSET) {
- //
- // Exit File Explorer formset
- //
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
- } else {
- if (UpdateFileExplorer (Private, QuestionId)) {
- *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT;
- }
+ return Status;
}
-
- return Status;
+ //
+ // All other action return unsupported.
+ //
+ return EFI_UNSUPPORTED;
}