]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiPayloadPkg: Use dummy constructor for PlatformHookLib
authorGuo Dong <guo.dong@intel.com>
Fri, 24 Sep 2021 04:56:16 +0000 (21:56 -0700)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Wed, 29 Sep 2021 05:08:50 +0000 (05:08 +0000)
The Library constructor is only used for library dependency.
So use a dummy function to make it clear instead of using an
actual function.

Cc: Ray Ni <ray.ni@intel.com>
Cc: Maurice Ma <maurice.ma@intel.com>
Cc: Benjamin You <benjamin.you@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Signed-off-by: Guo Dong <guo.dong@intel.com>
UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.c
UefiPayloadPkg/Library/UniversalPayloadPlatformHookLib/PlatformHookLib.inf

index bd433bdbe0c5a80f00323b5ff167907378414902..004fcd8b7ca3beec0a0e3139eb7e9549ba3a3f1b 100644 (file)
 #include <Library/PcdLib.h>\r
 #include <Library/HobLib.h>\r
 \r
+\r
+/** Library Constructor\r
+\r
+  @retval RETURN_SUCCESS  Success.\r
+**/\r
+EFI_STATUS\r
+EFIAPI\r
+PlatformHookSerialPortConstructor (\r
+  VOID\r
+  )\r
+{\r
+  // Nothing to do here. This constructor is added to\r
+  // enable the chain of constructor invocation for\r
+  // dependent libraries.\r
+  return RETURN_SUCCESS;\r
+}\r
+\r
 /**\r
   Performs platform specific initialization required for the CPU to access\r
   the hardware associated with a SerialPortLib instance.  This function does\r
index 2dfd8b1216453e006b6180fb27ac8576e7129a05..7ac6bfa1b1b08480f1f0be52bd63524d6a9995d1 100644 (file)
@@ -14,7 +14,7 @@
   MODULE_TYPE                    = BASE\r
   VERSION_STRING                 = 1.0\r
   LIBRARY_CLASS                  = PlatformHookLib\r
-  CONSTRUCTOR                    = PlatformHookSerialPortInitialize\r
+  CONSTRUCTOR                    = PlatformHookSerialPortConstructor\r
 \r
 [Sources]\r
   PlatformHookLib.c\r