MdeModulePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
The functions for Boot Maintainence Main menu.
|
||||
|
||||
Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2004 - 2018, 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
|
||||
@@ -61,7 +61,7 @@ HII_VENDOR_DEVICE_PATH mBmmHiiVendorDevicePath = {
|
||||
{
|
||||
END_DEVICE_PATH_TYPE,
|
||||
END_ENTIRE_DEVICE_PATH_SUBTYPE,
|
||||
{
|
||||
{
|
||||
(UINT8) (END_DEVICE_PATH_LENGTH),
|
||||
(UINT8) ((END_DEVICE_PATH_LENGTH) >> 8)
|
||||
}
|
||||
@@ -118,9 +118,9 @@ CustomizeMenus (
|
||||
|
||||
/**
|
||||
This function will change video resolution and text mode
|
||||
according to defined setup mode or defined boot mode
|
||||
according to defined setup mode or defined boot mode
|
||||
|
||||
@param IsSetupMode Indicate mode is changed to setup mode or boot mode.
|
||||
@param IsSetupMode Indicate mode is changed to setup mode or boot mode.
|
||||
|
||||
@retval EFI_SUCCESS Mode is changed successfully.
|
||||
@retval Others Mode failed to be changed.
|
||||
@@ -147,13 +147,13 @@ BmmSetConsoleMode (
|
||||
EFI_STATUS Status;
|
||||
UINTN Index;
|
||||
UINTN CurrentColumn;
|
||||
UINTN CurrentRow;
|
||||
UINTN CurrentRow;
|
||||
|
||||
MaxGopMode = 0;
|
||||
MaxTextMode = 0;
|
||||
|
||||
//
|
||||
// Get current video resolution and text mode
|
||||
// Get current video resolution and text mode
|
||||
//
|
||||
Status = gBS->HandleProtocol (
|
||||
gST->ConsoleOutHandle,
|
||||
@@ -171,7 +171,7 @@ BmmSetConsoleMode (
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
SimpleTextOut = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
if ((GraphicsOutput == NULL) || (SimpleTextOut == NULL)) {
|
||||
return EFI_UNSUPPORTED;
|
||||
@@ -192,12 +192,12 @@ BmmSetConsoleMode (
|
||||
NewHorizontalResolution = mBmmBootHorizontalResolution;
|
||||
NewVerticalResolution = mBmmBootVerticalResolution;
|
||||
NewColumns = mBmmBootTextModeColumn;
|
||||
NewRows = mBmmBootTextModeRow;
|
||||
NewRows = mBmmBootTextModeRow;
|
||||
}
|
||||
|
||||
if (GraphicsOutput != NULL) {
|
||||
MaxGopMode = GraphicsOutput->Mode->MaxMode;
|
||||
}
|
||||
}
|
||||
|
||||
if (SimpleTextOut != NULL) {
|
||||
MaxTextMode = SimpleTextOut->Mode->MaxMode;
|
||||
@@ -743,7 +743,7 @@ BootMaintExtractConfig (
|
||||
|
||||
@param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL.
|
||||
@param[in] Configuration A null-terminated Unicode string in
|
||||
<ConfigString> format.
|
||||
<ConfigString> format.
|
||||
@param[out] Progress A pointer to a string filled in with the
|
||||
offset of the most recent '&' before the
|
||||
first failing name / value pair (or the
|
||||
@@ -753,7 +753,7 @@ BootMaintExtractConfig (
|
||||
successful.
|
||||
|
||||
@retval EFI_SUCCESS The results have been distributed or are
|
||||
awaiting distribution.
|
||||
awaiting distribution.
|
||||
@retval EFI_OUT_OF_RESOURCES Not enough memory to store the
|
||||
parts of the results that must be
|
||||
stored awaiting possible future
|
||||
@@ -802,15 +802,15 @@ BootMaintRouteConfig (
|
||||
}
|
||||
|
||||
Status = gBS->LocateProtocol (
|
||||
&gEfiHiiConfigRoutingProtocolGuid,
|
||||
NULL,
|
||||
&gEfiHiiConfigRoutingProtocolGuid,
|
||||
NULL,
|
||||
(VOID **)&ConfigRouting
|
||||
);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
|
||||
Private = BMM_CALLBACK_DATA_FROM_THIS (This);
|
||||
Private = BMM_CALLBACK_DATA_FROM_THIS (This);
|
||||
//
|
||||
// Get Buffer Storage data from EFI variable
|
||||
//
|
||||
@@ -828,15 +828,15 @@ BootMaintRouteConfig (
|
||||
&BufferSize,
|
||||
Progress
|
||||
);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
//
|
||||
// Compare new and old BMM configuration data and only do action for modified item to
|
||||
// Compare new and old BMM configuration data and only do action for modified item to
|
||||
// avoid setting unnecessary non-volatile variable
|
||||
//
|
||||
|
||||
//
|
||||
// Check data which located in BMM main page and save the settings if need
|
||||
//
|
||||
//
|
||||
if (CompareMem (&NewBmmData->BootNext, &OldBmmData->BootNext, sizeof (NewBmmData->BootNext)) != 0) {
|
||||
Status = Var_UpdateBootNext (Private);
|
||||
if (EFI_ERROR (Status)) {
|
||||
@@ -847,10 +847,10 @@ BootMaintRouteConfig (
|
||||
|
||||
//
|
||||
// Check data which located in Boot Options Menu and save the settings if need
|
||||
//
|
||||
if (CompareMem (NewBmmData->BootOptionDel, OldBmmData->BootOptionDel, sizeof (NewBmmData->BootOptionDel)) != 0) {
|
||||
for (Index = 0;
|
||||
((Index < BootOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->BootOptionDel) / sizeof (NewBmmData->BootOptionDel[0]))));
|
||||
//
|
||||
if (CompareMem (NewBmmData->BootOptionDel, OldBmmData->BootOptionDel, sizeof (NewBmmData->BootOptionDel)) != 0) {
|
||||
for (Index = 0;
|
||||
((Index < BootOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->BootOptionDel) / sizeof (NewBmmData->BootOptionDel[0]))));
|
||||
Index ++) {
|
||||
NewMenuEntry = BOpt_GetMenuEntry (&BootOptionMenu, Index);
|
||||
NewLoadContext = (BM_LOAD_CONTEXT *) NewMenuEntry->VariableContext;
|
||||
@@ -891,10 +891,10 @@ BootMaintRouteConfig (
|
||||
|
||||
//
|
||||
// Check data which located in Driver Options Menu and save the settings if need
|
||||
//
|
||||
if (CompareMem (NewBmmData->DriverOptionDel, OldBmmData->DriverOptionDel, sizeof (NewBmmData->DriverOptionDel)) != 0) {
|
||||
for (Index = 0;
|
||||
((Index < DriverOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->DriverOptionDel) / sizeof (NewBmmData->DriverOptionDel[0]))));
|
||||
//
|
||||
if (CompareMem (NewBmmData->DriverOptionDel, OldBmmData->DriverOptionDel, sizeof (NewBmmData->DriverOptionDel)) != 0) {
|
||||
for (Index = 0;
|
||||
((Index < DriverOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->DriverOptionDel) / sizeof (NewBmmData->DriverOptionDel[0]))));
|
||||
Index++) {
|
||||
NewMenuEntry = BOpt_GetMenuEntry (&DriverOptionMenu, Index);
|
||||
NewLoadContext = (BM_LOAD_CONTEXT *) NewMenuEntry->VariableContext;
|
||||
@@ -909,7 +909,7 @@ BootMaintRouteConfig (
|
||||
}
|
||||
}
|
||||
|
||||
if (CompareMem (NewBmmData->DriverOptionOrder, OldBmmData->DriverOptionOrder, sizeof (NewBmmData->DriverOptionOrder)) != 0) {
|
||||
if (CompareMem (NewBmmData->DriverOptionOrder, OldBmmData->DriverOptionOrder, sizeof (NewBmmData->DriverOptionOrder)) != 0) {
|
||||
Status = Var_UpdateDriverOrder (Private);
|
||||
if (EFI_ERROR (Status)) {
|
||||
Offset = OFFSET_OF (BMM_FAKE_NV_DATA, DriverOptionOrder);
|
||||
@@ -1128,14 +1128,14 @@ BootMaintCallback (
|
||||
if (Value == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
UpdatePageId (Private, QuestionId);
|
||||
|
||||
if (QuestionId < FILE_OPTION_OFFSET) {
|
||||
if (QuestionId < CONFIG_OPTION_OFFSET) {
|
||||
switch (QuestionId) {
|
||||
case FORM_BOOT_ADD_ID:
|
||||
// Leave BMM and enter FileExplorer.
|
||||
// Leave BMM and enter FileExplorer.
|
||||
ChooseFile (NULL, L".efi", CreateBootOptionFromFile, &File);
|
||||
break;
|
||||
|
||||
@@ -1213,7 +1213,7 @@ BootMaintCallback (
|
||||
if ((Value == NULL) || (ActionRequest == NULL)) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
|
||||
if (QuestionId == KEY_VALUE_SAVE_AND_EXIT_BOOT) {
|
||||
CleanUselessBeforeSubmit (Private);
|
||||
CurrentFakeNVMap->BootOptionChanged = FALSE;
|
||||
@@ -1247,7 +1247,7 @@ BootMaintCallback (
|
||||
CurrentFakeNVMap->BootOptionChanged = TRUE;
|
||||
} else if (QuestionId == KEY_VALUE_DRIVER_DESCRIPTION || QuestionId == KEY_VALUE_DRIVER_OPTION) {
|
||||
CurrentFakeNVMap->DriverOptionChanged = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if ((QuestionId >= BOOT_OPTION_DEL_QUESTION_ID) && (QuestionId < BOOT_OPTION_DEL_QUESTION_ID + MAX_MENU_NUMBER)) {
|
||||
if (Value->b){
|
||||
@@ -1718,7 +1718,7 @@ BootMaintenanceManagerUiLibConstructor (
|
||||
|
||||
CreateUpdateData();
|
||||
//
|
||||
// Update boot maintenance manager page
|
||||
// Update boot maintenance manager page
|
||||
//
|
||||
InitializeBmmConfig(mBmmCallbackInfo);
|
||||
|
||||
|
Reference in New Issue
Block a user