/** @file\r
The functions for Boot Maintainence Main menu.\r
\r
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
}\r
\r
if (QuestionId == KEY_VALUE_SAVE_AND_EXIT_BOOT) {\r
+ CleanUselessBeforeSubmit (Private);\r
CurrentFakeNVMap->BootOptionChanged = FALSE;\r
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT;\r
} else if (QuestionId == KEY_VALUE_SAVE_AND_EXIT_DRIVER) {\r
+ CleanUselessBeforeSubmit (Private);\r
CurrentFakeNVMap->DriverOptionChanged = FALSE;\r
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT;\r
} else if (QuestionId == KEY_VALUE_NO_SAVE_AND_EXIT_DRIVER) {\r
case KEY_VALUE_SAVE_AND_EXIT:\r
case KEY_VALUE_NO_SAVE_AND_EXIT:\r
if (QuestionId == KEY_VALUE_SAVE_AND_EXIT) {\r
+ CleanUselessBeforeSubmit (Private);\r
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT;\r
} else if (QuestionId == KEY_VALUE_NO_SAVE_AND_EXIT) {\r
DiscardChangeHandler (Private, CurrentFakeNVMap);\r
}\r
}\r
\r
+/**\r
+ This function is to clean some useless data before submit changes.\r
+\r
+ @param Private The BMM context data.\r
+\r
+**/\r
+VOID\r
+CleanUselessBeforeSubmit (\r
+ IN BMM_CALLBACK_DATA *Private\r
+ )\r
+{\r
+ UINT16 Index;\r
+ if (Private->BmmPreviousPageId != FORM_BOOT_DEL_ID) {\r
+ for (Index = 0; Index < BootOptionMenu.MenuNumber; Index++) {\r
+ if (Private->BmmFakeNvData.BootOptionDel[Index] && !Private->BmmFakeNvData.BootOptionDelMark[Index]) {\r
+ Private->BmmFakeNvData.BootOptionDel[Index] = FALSE;\r
+ Private->BmmOldFakeNVData.BootOptionDel[Index] = FALSE;\r
+ }\r
+ }\r
+ }\r
+ if (Private->BmmPreviousPageId != FORM_DRV_DEL_ID) {\r
+ for (Index = 0; Index < DriverOptionMenu.MenuNumber; Index++) {\r
+ if (Private->BmmFakeNvData.DriverOptionDel[Index] && !Private->BmmFakeNvData.DriverOptionDelMark[Index]) {\r
+ Private->BmmFakeNvData.DriverOptionDel[Index] = FALSE;\r
+ Private->BmmOldFakeNVData.DriverOptionDel[Index] = FALSE;\r
+ }\r
+ }\r
+ }\r
+}\r
+\r
/**\r
\r
Update the menus in the BMM page.\r
/** @file\r
Header file for boot maintenance module.\r
\r
-Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
IN BMM_FAKE_NV_DATA *CurrentFakeNVMap\r
);\r
\r
+\r
+/**\r
+ This function is to clean some useless data before submit changes.\r
+\r
+ @param Private The BMM context data.\r
+\r
+**/\r
+VOID\r
+CleanUselessBeforeSubmit (\r
+ IN BMM_CALLBACK_DATA *Private\r
+ );\r
+\r
/**\r
Dispatch the display to the next page based on NewPageId.\r
\r