REF:https://bugzilla.tianocore.org/show_bug.cgi?id=4038

When BootOrder is not defined, CapsuleApp.efi will not find a file system
to store the capsule for on-disk update because GetUpdateFileSystem() will
fail.

BootOrder is an EFI Global Variable, which default state is firmware vendor
specific. It is possible for BootOrder to not be defined as mentioned in
the UEFI Specification in chapter 3.4.3, "Boot Option Variables Default
Boot Behavior".

Relax the check to allow that case.

Signed-off-by: Vincent Stehlé <vincent.ste...@arm.com>
---


Hi,

This has passed CI with pull request 
https://github.com/tianocore/edk2/pull/3263.

Best regards,
Vincent.


 MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c 
b/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c
index 5ce5a50f7b..f04de00f65 100644
--- a/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c
+++ b/MdeModulePkg/Application/CapsuleApp/CapsuleOnDisk.c
@@ -456,10 +456,7 @@ GetUpdateFileSystem (
   // 2. Get EFI system partition form boot options.

   //

   BootOptionBuffer = EfiBootManagerGetLoadOptions (&BootOptionCount, 
LoadOptionTypeBoot);

-  if ((BootOptionBuffer == NULL) ||

-      ((BootOptionCount == 0) && (Map == NULL))

-      )

-  {

+  if ((BootOptionBuffer != NULL) && (BootOptionCount == 0) && (Map == NULL)) {

     return EFI_NOT_FOUND;

   }

 

-- 
2.35.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#93011): https://edk2.groups.io/g/devel/message/93011
Mute This Topic: https://groups.io/mt/93376313/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to