]> git.proxmox.com Git - mirror_edk2.git/commitdiff
FmpDevicePkg FmpDxe: Return 0 when LSV check is not required
authorStar Zeng <star.zeng@intel.com>
Thu, 19 Jul 2018 10:29:52 +0000 (18:29 +0800)
committerKinney, Michael D <michael.d.kinney@intel.com>
Thu, 2 Aug 2018 21:46:18 +0000 (14:46 -0700)
Current code return 1 when LSV check is not required,
but 1 LSV will make 0 Version capsule image update failed.

0 LSV is valid, this patch updates the code to return 0 when
LSV check is not required
We can see even the DEFAULT_LOWESTSUPPORTEDVERSION is 0.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Michael D Kinney <michael.d.kinney@intel.com>
FmpDevicePkg/FmpDxe/FmpDxe.c

index c0c1383723fb4a53d68d9d9832290927c5f59c6f..091f950b95b23a7a2811b3060748ba04395c023f 100644 (file)
@@ -210,12 +210,15 @@ GetLowestSupportedVersion (
   // Get the LowestSupportedVersion.\r
   //\r
 \r
   // Get the LowestSupportedVersion.\r
   //\r
 \r
-  DeviceLibLowestSupportedVersion = DEFAULT_LOWESTSUPPORTEDVERSION;\r
-  ReturnLsv = PcdGet32 (PcdFmpDeviceBuildTimeLowestSupportedVersion);\r
   if (!IsLowestSupportedVersionCheckRequired ()) {\r
   if (!IsLowestSupportedVersionCheckRequired ()) {\r
-    return 1;\r
+    //\r
+    // Any Version can pass the 0 LowestSupportedVersion check.\r
+    //\r
+    return 0;\r
   }\r
 \r
   }\r
 \r
+  ReturnLsv = PcdGet32 (PcdFmpDeviceBuildTimeLowestSupportedVersion);\r
+\r
   //\r
   // Check the FmpDeviceLib\r
   //\r
   //\r
   // Check the FmpDeviceLib\r
   //\r