From: Li, Walon Date: Fri, 19 Feb 2021 09:39:32 +0000 (+0800) Subject: MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder X-Git-Tag: edk2-stable202102~9 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=7f34681c488aee2563eaa2afcc6a2c8aa7c5b912;p=mirror_edk2.git MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3135 When Boot Menu does not exist in the BootOrder, BmRegisterBootManagerMenu will create one into list. However, it should be put at the "end" of BootOrder instead of "start" of BootOrder. Replace 0 by -1 to adjust order of load options. Signed-off-by: Walon Li Reviewed-by: Liming Gao --- diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c index aff620ad52..6cc34d29c0 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c @@ -3,7 +3,7 @@ Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. Copyright (c) 2011 - 2020, Intel Corporation. All rights reserved.
-(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
+(C) Copyright 2015-2021 Hewlett Packard Enterprise Development LP
SPDX-License-Identifier: BSD-2-Clause-Patent **/ @@ -2505,7 +2505,7 @@ BmRegisterBootManagerMenu ( EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount); ); - return EfiBootManagerAddLoadOptionVariable (BootOption, 0); + return EfiBootManagerAddLoadOptionVariable (BootOption, (UINTN) -1); } /**