MdeModulePkg CapsuleApp: Fix NestedCapsuleHeader->Flags assigned wrong
authorStar Zeng <star.zeng@intel.com>
Tue, 10 Jul 2018 10:12:56 +0000 (18:12 +0800)
committerStar Zeng <star.zeng@intel.com>
Wed, 11 Jul 2018 07:31:05 +0000 (15:31 +0800)
(FwType == ESRT_FW_TYPE_DEVICEFIRMWARE) ? system : device
should be
(FwType == ESRT_FW_TYPE_SYSTEMFIRMWARE) ? system : device

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ming Shao <ming.shao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
MdeModulePkg/Application/CapsuleApp/CapsuleApp.c

index e1e48be..3a1a0a1 100644 (file)
@@ -431,7 +431,7 @@ CreateNestedFmp (
   ZeroMem(NestedCapsuleHeader, NESTED_CAPSULE_HEADER_SIZE);\r
   CopyGuid(&NestedCapsuleHeader->CapsuleGuid, ImageTypeId);\r
   NestedCapsuleHeader->HeaderSize = NESTED_CAPSULE_HEADER_SIZE;\r
-  NestedCapsuleHeader->Flags = (FwType == ESRT_FW_TYPE_DEVICEFIRMWARE) ? SYSTEM_FIRMWARE_FLAG : DEVICE_FIRMWARE_FLAG;\r
+  NestedCapsuleHeader->Flags = (FwType == ESRT_FW_TYPE_SYSTEMFIRMWARE) ? SYSTEM_FIRMWARE_FLAG : DEVICE_FIRMWARE_FLAG;\r
   NestedCapsuleHeader->CapsuleImageSize = (UINT32)FullCapsuleBufferSize;\r
 \r
   CopyMem((UINT8 *)NestedCapsuleHeader + NestedCapsuleHeader->HeaderSize, CapsuleBuffer, FileSize);\r