From 04fe914ba53e17745b8ada0dfef3bf0f8d1cb540 Mon Sep 17 00:00:00 2001 From: Ruiyu Ni Date: Wed, 20 Apr 2016 18:09:21 +0800 Subject: [PATCH] OvmfPkg/PlatformBootManagerLib: Use EfiBootManagerRefreshAllBootOption() The patch uses EfiBootManagerRefreshAllBootOption() to collect all boot options and uses SetBootOrderFromQemu exposed by QemuNewBootOrderLib to adjust the boot option order. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni Reviewed-by: Laszlo Ersek --- OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 11 +++-------- OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h | 1 + 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c index 722776b2b5..c13e8f8bfc 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c @@ -14,7 +14,6 @@ #include "BdsPlatform.h" #include -#include // @@ -1389,14 +1388,10 @@ Routine Description: // Process QEMU's -kernel command line option // TryRunningQemuKernel (); - BdsLibEnumerateAllBootOption (BootOptionList); - SetBootOrderFromQemu (BootOptionList); - // - // The BootOrder variable may have changed, reload the in-memory list with - // it. - // - BdsLibBuildOptionFromVar (BootOptionList, L"BootOrder"); + EfiBootManagerRefreshAllBootOption (); + + SetBootOrderFromQemu (NULL); } /** diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h index b14410cc31..4950d3ae11 100644 --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h @@ -47,6 +47,7 @@ Abstract: #include #include #include +#include #include #include