1 /** @file
2   Null instance of FmpDependencyCheckLib.
3 
4   Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>
5   Copyright (c) Microsoft Corporation.<BR>
6 
7   SPDX-License-Identifier: BSD-2-Clause-Patent
8 
9 **/
10 #include <PiDxe.h>
11 #include <Guid/SystemResourceTable.h>
12 #include <Library/FmpDependencyCheckLib.h>
13 
14 /**
15   Check dependency for firmware update.
16 
17   @param[in]  ImageTypeId        Image Type Id.
18   @param[in]  Version            New version.
19   @param[in]  Dependencies       Fmp dependency.
20   @param[in]  DependenciesSize   Size, in bytes, of the Fmp dependency.
21   @param[out] LastAttemptStatus  An optional pointer to a UINT32 that holds the
22                                  last attempt status to report back to the caller.
23                                  This function will set the value to LAST_ATTEMPT_STATUS_SUCCESS
24                                  if an error code is not set.
25   @retval  TRUE    Dependencies are satisfied.
26   @retval  FALSE   Dependencies are unsatisfied or dependency check fails.
27 
28 **/
29 BOOLEAN
30 EFIAPI
CheckFmpDependency(IN EFI_GUID ImageTypeId,IN UINT32 Version,IN EFI_FIRMWARE_IMAGE_DEP * Dependencies,OPTIONAL IN UINT32 DependenciesSize,OUT UINT32 * LastAttemptStatus OPTIONAL)31 CheckFmpDependency (
32   IN  EFI_GUID                ImageTypeId,
33   IN  UINT32                  Version,
34   IN  EFI_FIRMWARE_IMAGE_DEP  *Dependencies,    OPTIONAL
35   IN  UINT32                  DependenciesSize,
36   OUT UINT32                  *LastAttemptStatus OPTIONAL
37   )
38 {
39   if (LastAttemptStatus != NULL) {
40     *LastAttemptStatus = LAST_ATTEMPT_STATUS_SUCCESS;
41   }
42 
43   return TRUE;
44 }
45