After deleting this boot option, call Var_ChangeBootOrder to\r
make sure BootOrder is in valid state.\r
\r
-\r
- @param VOID EDES_TODO: Add parameter description\r
-\r
@retval EFI_SUCCESS If all boot load option EFI Variables corresponding to \r
BM_LOAD_CONTEXT marked for deletion is deleted\r
@return Others If failed to update the "BootOrder" variable after deletion. \r
scratch by content from BootOptionMenu is needed.\r
\r
\r
- @param VOID\r
+ \r
\r
@retval EFI_SUCCESS The boot order is updated successfully.\r
@return EFI_STATUS other than EFI_SUCCESS if failed to\r
//\r
if (BootOrderList != NULL) {\r
EfiLibDeleteVariable (L"BootOrder", &gEfiGlobalVariableGuid);\r
- SafeFreePool (BootOrderList);\r
+ FreePool (BootOrderList);\r
BootOrderList = NULL;\r
}\r
//\r
After deleting this Driver option, call Var_ChangeDriverOrder to\r
make sure DriverOrder is in valid state.\r
\r
-\r
- @param VOID\r
-\r
@retval EFI_SUCCESS Load Option is successfully updated.\r
@return Other value than EFI_SUCCESS if failed to update "Driver Order" EFI\r
Variable.\r
rebuild DriverOrder from scratch by content from DriverOptionMenu is\r
needed.\r
\r
-\r
- @param VOID\r
-\r
@retval EFI_SUCCESS The driver order is updated successfully.\r
@return EFI_STATUS other than EFI_SUCCESS if failed to\r
Set the "DriverOrder" EFI Variable.\r
//\r
if (DriverOrderList != NULL) {\r
EfiLibDeleteVariable (L"DriverOrder", &gEfiGlobalVariableGuid);\r
- SafeFreePool (DriverOrderList);\r
+ FreePool (DriverOrderList);\r
DriverOrderList = NULL;\r
}\r
\r
based on the new BaudRate, Data Bits, parity and Stop Bits\r
set.\r
\r
- @param VOID\r
-\r
- @return VOID\r
-\r
**/\r
VOID\r
Var_UpdateAllConsoleOption (\r
ConDevicePath = EfiLibGetVariable (ConsoleName, &gEfiGlobalVariableGuid);\r
if (ConDevicePath != NULL) {\r
EfiLibDeleteVariable (ConsoleName, &gEfiGlobalVariableGuid);\r
- SafeFreePool (ConDevicePath);\r
+ FreePool (ConDevicePath);\r
ConDevicePath = NULL;\r
};\r
\r
This function delete and build multi-instance device path ConIn\r
console device.\r
\r
-\r
- @param VOID\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
This function delete and build multi-instance device path ConOut\r
console device.\r
\r
-\r
- @param VOID\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
This function delete and build multi-instance device path ErrOut\r
console device.\r
\r
-\r
- @param VOID\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
@param HiiHandle The HII handle associated with the BMM formset.\r
@param DescriptionData The description of this driver option.\r
@param OptionalData The optional load option.\r
- @param ForceReconnect EDES_TODO: Add parameter description\r
+ @param ForceReconnect If to force reconnect.\r
\r
@retval EFI_OUT_OF_RESOURCES If not enought memory to complete the operation.\r
@retval EFI_SUCCESS If function completes successfully.\r
NewDriverOrderList\r
);\r
ASSERT_EFI_ERROR (Status);\r
- SafeFreePool (DriverOrderList);\r
+ if (DriverOrderList != NULL) {\r
+ FreePool (DriverOrderList);\r
+ }\r
DriverOrderList = NULL;\r
- SafeFreePool (NewDriverOrderList);\r
- NewDriverOrderList = NULL;\r
+ FreePool (NewDriverOrderList);\r
InsertTailList (&DriverOptionMenu.Head, &NewMenuEntry->Link);\r
DriverOptionMenu.MenuNumber++;\r
\r
@retval EFI_SUCCESS If function completes successfully.\r
\r
**/\r
-\r
EFI_STATUS\r
Var_UpdateBootOption (\r
IN BMM_CALLBACK_DATA *CallbackData,\r
\r
if (BootOrderList != NULL) {\r
EfiLibDeleteVariable (L"BootOrder", &gEfiGlobalVariableGuid);\r
+ FreePool (BootOrderList);\r
}\r
\r
Status = gRT->SetVariable (\r
);\r
ASSERT_EFI_ERROR (Status);\r
\r
- SafeFreePool (BootOrderList);\r
- BootOrderList = NULL;\r
- SafeFreePool (NewBootOrderList);\r
+ FreePool (NewBootOrderList);\r
NewBootOrderList = NULL;\r
InsertTailList (&BootOptionMenu.Head, &NewMenuEntry->Link);\r
BootOptionMenu.MenuNumber++;\r
//\r
if (BootOrderList != NULL) {\r
EfiLibDeleteVariable (L"BootOrder", &gEfiGlobalVariableGuid);\r
+ FreePool (BootOrderList);\r
}\r
\r
for (Index = 0; Index < BootOptionMenu.MenuNumber; Index++) {\r
BootOrderListSize,\r
NewBootOrderList\r
);\r
- SafeFreePool (BootOrderList);\r
- SafeFreePool (NewBootOrderList);\r
+ FreePool (NewBootOrderList);\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
//\r
if (DriverOrderList != NULL) {\r
EfiLibDeleteVariable (L"DriverOrder", &gEfiGlobalVariableGuid);\r
+ FreePool (DriverOrderList);\r
}\r
\r
for (Index = 0; Index < DriverOrderListSize; Index++) {\r
return Status;\r
}\r
\r
- SafeFreePool (DriverOrderList);\r
-\r
BOpt_FreeMenu (&DriverOptionMenu);\r
BOpt_GetDriverOptions (CallbackData);\r
return EFI_SUCCESS;\r
}\r
\r
if (VarData >= VarData + VarSize) {\r
- SafeFreePool (OriginalPtr);\r
+ FreePool (OriginalPtr);\r
return EFI_NOT_FOUND;\r
}\r
\r
NewOrder = (UINT16 *) AllocateZeroPool (DevOrder->Length - sizeof (UINT16));\r
if (NULL == NewOrder) {\r
- SafeFreePool (VarData);\r
+ FreePool (VarData);\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
NewOrder,\r
DevOrder->Length - sizeof (UINT16)\r
);\r
- SafeFreePool (NewOrder);\r
+ FreePool (NewOrder);\r
\r
Status = gRT->SetVariable (\r
VAR_LEGACY_DEV_ORDER,\r
OriginalPtr\r
);\r
\r
- SafeFreePool (OriginalPtr);\r
+ FreePool (OriginalPtr);\r
\r
//\r
// Update Optional Data of Boot####\r
StrSize (LegacyDeviceContext->Description)\r
);\r
\r
- UnicodeToAscii (DescString, StrSize (DescString), DescAsciiString);\r
+ UnicodeStrToAsciiStr((CONST CHAR16*)&DescString, (CHAR8 *)&DescAsciiString);\r
\r
NewOptionSize = sizeof (UINT32) + sizeof (UINT16) + StrSize (DescString) +\r
sizeof (BBS_BBS_DEVICE_PATH);\r
NewOptionPtr\r
);\r
\r
- SafeFreePool (NewOptionPtr);\r
- SafeFreePool (BootOptionVar);\r
+ FreePool (NewOptionPtr);\r
+ FreePool (BootOptionVar);\r
}\r
\r
BOpt_GetBootOptions (CallbackData);\r
}\r
\r
Status = gRT->SetVariable (\r
- VarConOutMode,\r
+ VAR_CON_OUT_MODE,\r
&gEfiGenericPlatformVariableGuid,\r
EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE,\r
sizeof (CONSOLE_OUT_MODE),\r