MdeModulePkg/UefiBootManager: Remove 'UEFI' description prefix

This commit is contained in:
Tim Crawford
2020-02-12 10:03:31 -07:00
parent ecaa4a790a
commit 67c4655bea

View File

@ -15,7 +15,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#define PRODUCT_IDENTIFICATION_LENGTH 16 #define PRODUCT_IDENTIFICATION_LENGTH 16
CONST UINT16 mBmUsbLangId = 0x0409; // English CONST UINT16 mBmUsbLangId = 0x0409; // English
CHAR16 mBmUefiPrefix[] = L"UEFI "; //CHAR16 mBmUefiPrefix[] = L"UEFI ";
LIST_ENTRY mPlatformBootDescriptionHandlers = INITIALIZE_LIST_HEAD_VARIABLE (mPlatformBootDescriptionHandlers); LIST_ENTRY mPlatformBootDescriptionHandlers = INITIALIZE_LIST_HEAD_VARIABLE (mPlatformBootDescriptionHandlers);
@ -785,10 +785,12 @@ BmGetBootDescription (
// Avoid description confusion between UEFI & Legacy boot option by adding "UEFI " prefix // Avoid description confusion between UEFI & Legacy boot option by adding "UEFI " prefix
// ONLY for core provided boot description handler. // ONLY for core provided boot description handler.
// //
Temp = AllocatePool (StrSize (DefaultDescription) + sizeof (mBmUefiPrefix)); //Temp = AllocatePool (StrSize (DefaultDescription) + sizeof (mBmUefiPrefix));
Temp = AllocatePool (StrSize (DefaultDescription));
ASSERT (Temp != NULL); ASSERT (Temp != NULL);
StrCpyS (Temp, (StrSize (DefaultDescription) + sizeof (mBmUefiPrefix)) / sizeof (CHAR16), mBmUefiPrefix); //StrCpyS (Temp, (StrSize (DefaultDescription) + sizeof (mBmUefiPrefix)) / sizeof (CHAR16), mBmUefiPrefix);
StrCatS (Temp, (StrSize (DefaultDescription) + sizeof (mBmUefiPrefix)) / sizeof (CHAR16), DefaultDescription); //StrCatS (Temp, (StrSize (DefaultDescription) + sizeof (mBmUefiPrefix)) / sizeof (CHAR16), DefaultDescription);
StrCpyS (Temp, StrSize (DefaultDescription) / sizeof (CHAR16), DefaultDescription);
FreePool (DefaultDescription); FreePool (DefaultDescription);
DefaultDescription = Temp; DefaultDescription = Temp;
break; break;