On 04/21/16 08:58, Ruiyu Ni wrote:
> 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 <ruiyu...@intel.com>
> Cc: Jordan Justen <jordan.l.jus...@intel.com>
> Cc: Laszlo Ersek <ler...@redhat.com>
> ---
>  OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c | 11 +++--------
>  OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h |  1 +
>  2 files changed, 4 insertions(+), 8 deletions(-)

Reviewed-by: Laszlo Ersek <ler...@redhat.com>

Thanks!
Laszlo

> diff --git a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c 
> b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
> index dc6bc7f..0284a9a 100644
> --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
> +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c
> @@ -14,7 +14,6 @@
>  
>  #include "BdsPlatform.h"
>  #include <Guid/RootBridgesConnectedEventGroup.h>
> -#include <Library/QemuBootOrderLib.h>
>  
>  
>  //
> @@ -1338,14 +1337,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 2eab29a..ae3c268 100644
> --- a/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h
> +++ b/OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.h
> @@ -47,6 +47,7 @@ Abstract:
>  #include <Library/IoLib.h>
>  #include <Library/NvVarsFileLib.h>
>  #include <Library/QemuFwCfgLib.h>
> +#include <Library/QemuBootOrderLib.h>
>  
>  #include <Protocol/Decompress.h>
>  #include <Protocol/PciIo.h>
> 

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to