]> git.proxmox.com Git - mirror_edk2.git/blobdiff - FmpDevicePkg/Library/FmpDependencyCheckLibNull/FmpDependencyCheckLibNull.c
FmpDevicePkg: Add Last Attempt Status support to dependency libs
[mirror_edk2.git] / FmpDevicePkg / Library / FmpDependencyCheckLibNull / FmpDependencyCheckLibNull.c
index 55e9af22909d3f57af04cd2ce90a51f462ac33cb..74247957ac4f8fcf9702172698f3365e50ee80c5 100644 (file)
@@ -2,11 +2,13 @@
   Null instance of FmpDependencyCheckLib.\r
 \r
   Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) Microsoft Corporation.<BR>\r
 \r
   SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
 **/\r
 #include <PiDxe.h>\r
+#include <Guid/SystemResourceTable.h>\r
 #include <Library/FmpDependencyCheckLib.h>\r
 \r
 /**\r
   @param[in]  Version            New version.\r
   @param[in]  Dependencies       Fmp dependency.\r
   @param[in]  DependenciesSize   Size, in bytes, of the Fmp dependency.\r
-\r
+  @param[out] LastAttemptStatus  An optional pointer to a UINT32 that holds the\r
+                                 last attempt status to report back to the caller.\r
+                                 This function will set the value to LAST_ATTEMPT_STATUS_SUCCESS\r
+                                 if an error code is not set.\r
   @retval  TRUE    Dependencies are satisfied.\r
   @retval  FALSE   Dependencies are unsatisfied or dependency check fails.\r
 \r
@@ -27,8 +32,13 @@ CheckFmpDependency (
   IN  EFI_GUID                ImageTypeId,\r
   IN  UINT32                  Version,\r
   IN  EFI_FIRMWARE_IMAGE_DEP  *Dependencies,    OPTIONAL\r
-  IN  UINT32                  DependenciesSize\r
+  IN  UINT32                  DependenciesSize,\r
+  OUT UINT32                  *LastAttemptStatus OPTIONAL\r
   )\r
 {\r
+  if (LastAttemptStatus != NULL) {\r
+    *LastAttemptStatus = LAST_ATTEMPT_STATUS_SUCCESS;\r
+  }\r
+\r
   return TRUE;\r
 }\r