Bug fix for "CapsuleUpdate does not handle memory lost correctly"
authordtang2 <dtang2@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 2 Nov 2006 07:24:49 +0000 (07:24 +0000)
committerdtang2 <dtang2@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 2 Nov 2006 07:24:49 +0000 (07:24 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1886 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Universal/Capsule/RuntimeDxe/CapsuleService.c

index e07cbc8..9f4fe3c 100644 (file)
@@ -75,11 +75,11 @@ Returns:
   //\r
   for (ArrayNumber = 0; ArrayNumber < CapsuleCount; ArrayNumber++) {\r
     CapsuleHeader = CapsuleHeaderArray[ArrayNumber];\r
-    if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) && !(CapsuleHeader->Flags & CAPSULE_FLAGS_PERSIST_ACROSS_RESET)) {\r
+    if ((CapsuleHeader->Flags & (CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE)) == CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) {\r
       return EFI_INVALID_PARAMETER;      \r
     }\r
     if (!CompareGuid (&CapsuleHeader->CapsuleGuid, &mEfiCapsuleHeaderGuid)) {\r
-      if (!(CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE)) {\r
+      if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) {\r
         return EFI_UNSUPPORTED;\r
       }  \r
     }   \r
@@ -206,11 +206,11 @@ Returns:
   //\r
   for (ArrayNumber = 0; ArrayNumber < CapsuleCount; ArrayNumber++) {\r
     CapsuleHeader = CapsuleHeaderArray[ArrayNumber];\r
-    if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) && !(CapsuleHeader->Flags & CAPSULE_FLAGS_PERSIST_ACROSS_RESET)) {\r
+    if ((CapsuleHeader->Flags & (CAPSULE_FLAGS_PERSIST_ACROSS_RESET | CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE)) == CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) {\r
       return EFI_INVALID_PARAMETER;      \r
     }\r
     if (!CompareGuid (&CapsuleHeader->CapsuleGuid, &mEfiCapsuleHeaderGuid)) {\r
-      if (!(CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE)) {\r
+      if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) {\r
         return EFI_UNSUPPORTED;\r
       }\r
     }  \r