make sure BootOrder is in valid state.\r
\r
@retval EFI_SUCCESS If all boot load option EFI Variables corresponding to \r
- BM_LOAD_CONTEXT marked for deletion is deleted\r
+ BM_LOAD_CONTEXT marked for deletion is deleted.\r
+ @retval EFI_NOT_FOUND If can not find the boot option want to be deleted.\r
@return Others If failed to update the "BootOrder" variable after deletion. \r
\r
**/\r
After deleting this Driver option, call Var_ChangeDriverOrder to\r
make sure DriverOrder is in valid state.\r
\r
- @retval EFI_SUCCESS Load Option is successfully updated.\r
+ @retval EFI_SUCCESS Load Option is successfully updated.\r
+ @retval EFI_NOT_FOUND Fail to find the driver option want to be deleted.\r
@return Other value than EFI_SUCCESS if failed to update "Driver Order" EFI\r
Variable.\r
\r
console device.\r
\r
@retval EFI_SUCCESS The function complete successfully.\r
- @return The EFI variable can be saved. See gRT->SetVariable \r
- for detail return information.\r
+ @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.\r
**/\r
EFI_STATUS\r
Var_UpdateConsoleInpOption (\r
console device.\r
\r
@retval EFI_SUCCESS The function complete successfully.\r
- @return The EFI variable can be saved. See gRT->SetVariable \r
- for detail return information.\r
+ @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.\r
**/\r
EFI_STATUS\r
Var_UpdateConsoleOutOption (\r
console device.\r
\r
@retval EFI_SUCCESS The function complete successfully.\r
- @return The EFI variable can be saved. See gRT->SetVariable \r
- for detail return information.\r
+ @return The EFI variable can not be saved. See gRT->SetVariable for detail return information. \r
**/\r
EFI_STATUS\r
Var_UpdateErrorOutOption (\r
\r
NewMenuEntry = BOpt_CreateMenuEntry (BM_LOAD_CONTEXT_SELECT);\r
if (NULL == NewMenuEntry) {\r
+ FreePool (Buffer);\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
\r
@param CallbackData The BMM context data.\r
\r
- @retval EFI_SUCCESS The function complete successfully.\r
- @retval EFI_SUCCESS Not enough memory to complete the function.\r
- @return The EFI variable can be saved. See gRT->SetVariable \r
- for detail return information.\r
+ @retval EFI_SUCCESS The function complete successfully.\r
+ @retval EFI_OUT_OF_RESOURCES Not enough memory to complete the function.\r
+ @return The EFI variable can not be saved. See gRT->SetVariable for detail return information.\r
\r
**/\r
EFI_STATUS\r
\r
@param CallbackData The context data for BMM.\r
\r
- @return EFI_SUCCESS The function completed successfully.\r
- @retval EFI_NOT_FOUND If L"LegacyDevOrder" and EfiLegacyDevOrderGuid EFI Variable can be found.\r
-\r
+ @return EFI_SUCCESS The function completed successfully.\r
+ @retval EFI_NOT_FOUND If L"LegacyDevOrder" and EfiLegacyDevOrderGuid EFI Variable can be found.\r
+ @retval EFI_OUT_OF_RESOURCES Fail to allocate memory resource\r
**/\r
EFI_STATUS\r
Var_UpdateBBSOption (\r
&VarSize\r
);\r
\r
- if (NULL == VarData) {\r
+ if (VarData == NULL) {\r
return EFI_NOT_FOUND;\r
}\r
\r
}\r
\r
NewOrder = (UINT16 *) AllocateZeroPool (DevOrder->Length - sizeof (UINT16));\r
- if (NULL == NewOrder) {\r
+ if (NewOrder == NULL) {\r
FreePool (VarData);\r
return EFI_OUT_OF_RESOURCES;\r
}\r
//\r
BootOptionVar = GetLegacyBootOptionVar (CallbackData->BbsType, &Index, &OptionSize);\r
\r
- if (NULL != BootOptionVar) {\r
+ if (BootOptionVar != NULL) {\r
CopyMem (\r
DescString,\r
LegacyDeviceContext->Description,\r
\r
Attribute = (UINT32 *) Ptr;\r
*Attribute |= LOAD_OPTION_ACTIVE;\r
- if (0xFF == LegacyDev[0]) {\r
+ if (LegacyDev[0] == 0xFF) {\r
//\r
// Disable this legacy boot option\r
//\r
Ptr += StrSize ((CHAR16 *) Ptr);\r
\r
NewOptionPtr = AllocateZeroPool (NewOptionSize);\r
- if (NULL == NewOptionPtr) {\r
+ if (NewOptionPtr == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r