public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder
@ 2021-02-18  3:26 Li, Walon
  2021-02-19  0:58 ` 回复: [edk2-devel] " gaoliming
  0 siblings, 1 reply; 5+ messages in thread
From: Li, Walon @ 2021-02-18  3:26 UTC (permalink / raw)
  To: devel; +Cc: walon.li, sunnywang, lersek, ray.ni, hao.a.wu

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 <walon.li@hpe.com>
---
 MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
index aff620ad52..26d1fb0ea0 100644
--- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
+++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c
@@ -2505,7 +2505,7 @@ BmRegisterBootManagerMenu (
     EfiBootManagerFreeLoadOptions (BootOptions, BootOptionCount);
     );
 
-  return EfiBootManagerAddLoadOptionVariable (BootOption, 0);
+  return EfiBootManagerAddLoadOptionVariable (BootOption, (UINTN) -1));
 }
 
 /**
-- 
2.23.0.windows.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-02-20  5:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-02-18  3:26 [PATCH] MdeModulePkg/UefiBootManagerLib: Put BootMenu at the end of BootOrder Li, Walon
2021-02-19  0:58 ` 回复: [edk2-devel] " gaoliming
2021-02-19  1:33   ` Li, Walon
2021-02-19 15:52     ` Laszlo Ersek
2021-02-20  5:43       ` 回复: " gaoliming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox