]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FmpDevicePkg/FmpDxe/FmpDxe.c
FmpDevicePkg/FmpDxe: Add PcdFmpDeviceStorageAccessEnable
[mirror_edk2.git] / FmpDevicePkg / FmpDxe / FmpDxe.c
index a53ded73807277cd5a4887125b8968bddcececba..3ca9d3526ad3ff91e4220af8fe55a32dab2f9530 100644 (file)
@@ -541,6 +541,10 @@ GetTheImage (
   FIRMWARE_MANAGEMENT_PRIVATE_DATA  *Private;\r
   UINTN                             Size;\r
 \r
+  if (!FeaturePcdGet (PcdFmpDeviceStorageAccessEnable)) {\r
+    return EFI_UNSUPPORTED;\r
+  }\r
+\r
   Status = EFI_SUCCESS;\r
 \r
   //\r
@@ -715,6 +719,10 @@ CheckTheImage (
   FmpHeaderSize    = 0;\r
   AllHeaderSize    = 0;\r
 \r
+  if (!FeaturePcdGet (PcdFmpDeviceStorageAccessEnable)) {\r
+    return EFI_UNSUPPORTED;\r
+  }\r
+\r
   //\r
   // Retrieve the private context structure\r
   //\r
@@ -970,6 +978,10 @@ SetTheImage (
   IncommingFwVersion = 0;\r
   LastAttemptStatus  = LAST_ATTEMPT_STATUS_ERROR_UNSUCCESSFUL;\r
 \r
+  if (!FeaturePcdGet (PcdFmpDeviceStorageAccessEnable)) {\r
+    return EFI_UNSUPPORTED;\r
+  }\r
+\r
   //\r
   // Retrieve the private context structure\r
   //\r