Refine the save action for the BdsDxe.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>


git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15616 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
Eric Dong
2014-07-04 01:58:48 +00:00
committed by ydong10
parent dda74d6d62
commit 8acb3f7b54
6 changed files with 148 additions and 266 deletions

View File

@@ -263,7 +263,16 @@ UpdateBootDelPage (
}
NewLoadContext->Deleted = FALSE;
//CallbackData->BmmFakeNvData.BootOptionDel[Index] = FALSE;
if (CallbackData->BmmFakeNvData.BootOptionDel[Index] && !CallbackData->BmmFakeNvData.BootOptionDelMark[Index]) {
//
// CallbackData->BmmFakeNvData.BootOptionDel[Index] == TRUE means browser knows this boot option is selected
// CallbackData->BmmFakeNvData.BootOptionDelMark[Index] = FALSE means BDS knows the selected boot option has
// deleted, browser maintains old useless info. So clear this info here, and later update this info to browser
// through HiiSetBrowserData function.
//
CallbackData->BmmFakeNvData.BootOptionDel[Index] = FALSE;
}
HiiCreateCheckBoxOpCode (
mStartOpCodeHandle,
@@ -272,7 +281,7 @@ UpdateBootDelPage (
(UINT16) (BOOT_OPTION_DEL_VAR_OFFSET + Index),
NewMenuEntry->DisplayStringToken,
NewMenuEntry->HelpStringToken,
0,
EFI_IFR_FLAG_CALLBACK,
0,
NULL
);
@@ -343,7 +352,16 @@ UpdateDrvDelPage (
NewLoadContext = (BM_LOAD_CONTEXT *) NewMenuEntry->VariableContext;
NewLoadContext->Deleted = FALSE;
//CallbackData->BmmFakeNvData.DriverOptionDel[Index] = FALSE;
if (CallbackData->BmmFakeNvData.DriverOptionDel[Index] && !CallbackData->BmmFakeNvData.DriverOptionDelMark[Index]) {
//
// CallbackData->BmmFakeNvData.BootOptionDel[Index] == TRUE means browser knows this boot option is selected
// CallbackData->BmmFakeNvData.BootOptionDelMark[Index] = FALSE means BDS knows the selected boot option has
// deleted, browser maintains old useless info. So clear this info here, and later update this info to browser
// through HiiSetBrowserData function.
//
CallbackData->BmmFakeNvData.DriverOptionDel[Index] = FALSE;
}
HiiCreateCheckBoxOpCode (
mStartOpCodeHandle,
@@ -352,7 +370,7 @@ UpdateDrvDelPage (
(UINT16) (DRIVER_OPTION_DEL_VAR_OFFSET + Index),
NewMenuEntry->DisplayStringToken,
NewMenuEntry->HelpStringToken,
0,
EFI_IFR_FLAG_CALLBACK,
0,
NULL
);
@@ -1349,6 +1367,14 @@ UpdatePageId (
UINT16 NewPageId
)
{
//
// For the question don't impact the page update, just ignore it.
//
if (((NewPageId >= BOOT_OPTION_DEL_QUESTION_ID) && (NewPageId < BOOT_OPTION_DEL_QUESTION_ID + MAX_MENU_NUMBER)) ||
((NewPageId >= DRIVER_OPTION_DEL_QUESTION_ID) && (NewPageId < DRIVER_OPTION_DEL_QUESTION_ID + MAX_MENU_NUMBER))) {
return;
}
if ((NewPageId < FILE_OPTION_OFFSET) && (NewPageId >= HANDLE_OPTION_OFFSET)) {
//
// If we select a handle to add driver option, advance to the add handle description page.