summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/BdsDxe/BootMaint
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/BdsDxe/BootMaint')
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c2
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c4
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c20
-rw-r--r--MdeModulePkg/Universal/BdsDxe/BootMaint/Variable.c39
4 files changed, 29 insertions, 36 deletions
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c
index b9ffa05..0fc187a 100644
--- a/MdeModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c
+++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/ConsoleOption.c
@@ -18,7 +18,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Function creates a device path data structure that identically matches the
device path passed in.
-
@param DevPath A pointer to a device path data structure.
@return The new copy of DevPath is created to identically match the input.
@@ -33,7 +32,6 @@ DevicePathInstanceDup (
/**
Update Com Ports attributes from DevicePath
-
@param DevicePath DevicePath that contains Com ports
@retval EFI_SUCCESS The update is successful.
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c
index 8a946d3..8253ded 100644
--- a/MdeModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c
+++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/FileExplorer.c
@@ -232,7 +232,7 @@ UpdateFileExplorer (
@retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.
@retval EFI_DEVICE_ERROR The variable could not be saved.
@retval EFI_UNSUPPORTED The specified Action is not supported by the callback.
-
+ @retval EFI_INVALID_PARAMETER If paramter Value or ActionRequest is NULL.
**/
EFI_STATUS
EFIAPI
@@ -259,7 +259,7 @@ FileExplorerCallback (
*ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE;
//
- // Retrive uncommitted data from Form Browser
+ // Retrieve uncommitted data from Form Browser
//
NvRamMap = &Private->FeFakeNvData;
BufferSize = sizeof (FILE_EXPLORER_NV_DATA);
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
index 2ffb1ff..486f2fd 100644
--- a/MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
+++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c
@@ -114,11 +114,9 @@ UpdatePageEnd (
}
/**
- Clean up the dynamic opcode at label and form specified by
- both LabelId.
+ Clean up the dynamic opcode at label and form specified by both LabelId.
- @param LabelId It is both the Form ID and Label ID for
- opcode deletion.
+ @param LabelId It is both the Form ID and Label ID for opcode deletion.
@param CallbackData The BMM context data.
**/
@@ -150,7 +148,7 @@ CleanUpPage (
of the file to be boot from.
@retval EFI_SUCCESS The function completed successfull.
- @return Other value if the boot from the file fails.
+ @return Other value if the boot from the file fails.
**/
EFI_STATUS
@@ -163,7 +161,7 @@ BootThisFile (
CHAR16 *ExitData;
BDS_COMMON_OPTION *Option;
- Status = gBS->AllocatePool (EfiBootServicesData, sizeof (BDS_COMMON_OPTION), (VOID **) &Option);
+ Option = (BDS_COMMON_OPTION *) AllocatePool (sizeof (BDS_COMMON_OPTION));
Option->Description = FileContext->FileName;
Option->DevicePath = FileContext->DevicePath;
Option->LoadOptionsSize = 0;
@@ -562,7 +560,7 @@ UpdateOrderPage (
/**
Create the dynamic page to allow user to set
- the "BootNext" vaule.
+ the "BootNext" value.
@param CallbackData The BMM context data.
@@ -633,8 +631,7 @@ UpdateBootNextPage (
}
/**
- Create the dynamic page to allow user to set
- the "TimeOut" vaule.
+ Create the dynamic page to allow user to set the "TimeOut" value.
@param CallbackData The BMM context data.
@@ -673,7 +670,7 @@ UpdateTimeOutPage (
}
/**
- Refresh the text mode page
+ Refresh the text mode page.
@param CallbackData The BMM context data.
@@ -778,8 +775,7 @@ UpdateConModePage (
}
/**
- Create the dynamic page which allows user to
- set the property such as Baud Rate, Data Bits,
+ Create the dynamic page which allows user to set the property such as Baud Rate, Data Bits,
Parity, Stop Bits, Terminal Type.
@param CallbackData The BMM context data.
diff --git a/MdeModulePkg/Universal/BdsDxe/BootMaint/Variable.c b/MdeModulePkg/Universal/BdsDxe/BootMaint/Variable.c
index 8576e41..55af813 100644
--- a/MdeModulePkg/Universal/BdsDxe/BootMaint/Variable.c
+++ b/MdeModulePkg/Universal/BdsDxe/BootMaint/Variable.c
@@ -20,7 +20,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
make sure BootOrder is in valid state.
@retval EFI_SUCCESS If all boot load option EFI Variables corresponding to
- BM_LOAD_CONTEXT marked for deletion is deleted
+ BM_LOAD_CONTEXT marked for deletion is deleted.
+ @retval EFI_NOT_FOUND If can not find the boot option want to be deleted.
@return Others If failed to update the "BootOrder" variable after deletion.
**/
@@ -176,7 +177,8 @@ Var_ChangeBootOrder (
After deleting this Driver option, call Var_ChangeDriverOrder to
make sure DriverOrder is in valid state.
- @retval EFI_SUCCESS Load Option is successfully updated.
+ @retval EFI_SUCCESS Load Option is successfully updated.
+ @retval EFI_NOT_FOUND Fail to find the driver option want to be deleted.
@return Other value than EFI_SUCCESS if failed to update "Driver Order" EFI
Variable.
@@ -476,8 +478,7 @@ Var_UpdateConsoleOption (
console device.
@retval EFI_SUCCESS The function complete successfully.
- @return The EFI variable can be saved. See gRT->SetVariable
- for detail return information.
+ @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.
**/
EFI_STATUS
Var_UpdateConsoleInpOption (
@@ -492,8 +493,7 @@ Var_UpdateConsoleInpOption (
console device.
@retval EFI_SUCCESS The function complete successfully.
- @return The EFI variable can be saved. See gRT->SetVariable
- for detail return information.
+ @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.
**/
EFI_STATUS
Var_UpdateConsoleOutOption (
@@ -508,8 +508,7 @@ Var_UpdateConsoleOutOption (
console device.
@retval EFI_SUCCESS The function complete successfully.
- @return The EFI variable can be saved. See gRT->SetVariable
- for detail return information.
+ @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.
**/
EFI_STATUS
Var_UpdateErrorOutOption (
@@ -586,6 +585,7 @@ Var_UpdateDriverOption (
NewMenuEntry = BOpt_CreateMenuEntry (BM_LOAD_CONTEXT_SELECT);
if (NULL == NewMenuEntry) {
+ FreePool (Buffer);
return EFI_OUT_OF_RESOURCES;
}
@@ -1007,10 +1007,9 @@ Var_UpdateBootOrder (
@param CallbackData The BMM context data.
- @retval EFI_SUCCESS The function complete successfully.
- @retval EFI_SUCCESS Not enough memory to complete the function.
- @return The EFI variable can be saved. See gRT->SetVariable
- for detail return information.
+ @retval EFI_SUCCESS The function complete successfully.
+ @retval EFI_OUT_OF_RESOURCES Not enough memory to complete the function.
+ @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.
**/
EFI_STATUS
@@ -1076,9 +1075,9 @@ Var_UpdateDriverOrder (
@param CallbackData The context data for BMM.
- @return EFI_SUCCESS The function completed successfully.
- @retval EFI_NOT_FOUND If L"LegacyDevOrder" and EfiLegacyDevOrderGuid EFI Variable can be found.
-
+ @return EFI_SUCCESS The function completed successfully.
+ @retval EFI_NOT_FOUND If L"LegacyDevOrder" and EfiLegacyDevOrderGuid EFI Variable can be found.
+ @retval EFI_OUT_OF_RESOURCES Fail to allocate memory resource
**/
EFI_STATUS
Var_UpdateBBSOption (
@@ -1169,7 +1168,7 @@ Var_UpdateBBSOption (
&VarSize
);
- if (NULL == VarData) {
+ if (VarData == NULL) {
return EFI_NOT_FOUND;
}
@@ -1192,7 +1191,7 @@ Var_UpdateBBSOption (
}
NewOrder = (UINT16 *) AllocateZeroPool (DevOrder->Length - sizeof (UINT16));
- if (NULL == NewOrder) {
+ if (NewOrder == NULL) {
FreePool (VarData);
return EFI_OUT_OF_RESOURCES;
}
@@ -1243,7 +1242,7 @@ Var_UpdateBBSOption (
//
BootOptionVar = GetLegacyBootOptionVar (CallbackData->BbsType, &Index, &OptionSize);
- if (NULL != BootOptionVar) {
+ if (BootOptionVar != NULL) {
CopyMem (
DescString,
LegacyDeviceContext->Description,
@@ -1263,7 +1262,7 @@ Var_UpdateBBSOption (
Attribute = (UINT32 *) Ptr;
*Attribute |= LOAD_OPTION_ACTIVE;
- if (0xFF == LegacyDev[0]) {
+ if (LegacyDev[0] == 0xFF) {
//
// Disable this legacy boot option
//
@@ -1276,7 +1275,7 @@ Var_UpdateBBSOption (
Ptr += StrSize ((CHAR16 *) Ptr);
NewOptionPtr = AllocateZeroPool (NewOptionSize);
- if (NULL == NewOptionPtr) {
+ if (NewOptionPtr == NULL) {
return EFI_OUT_OF_RESOURCES;
}