public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] MdeModulePkg/CapsuleApp: support on-disk with undefined BootOrder
@ 2022-08-31 14:33 Vincent Stehlé
  0 siblings, 0 replies; only message in thread
From: Vincent Stehlé @ 2022-08-31 14:33 UTC (permalink / raw)
  To: devel; +Cc: Vincent Stehlé

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.stehle@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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-31 14:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-31 14:33 [PATCH] MdeModulePkg/CapsuleApp: support on-disk with undefined BootOrder Vincent Stehlé

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