From f26f2a7b97df4b88294d5fc585b94c4a1eb81d15 Mon Sep 17 00:00:00 2001 From: yshang1 Date: Mon, 4 Feb 2008 03:36:06 +0000 Subject: Retire the constructor to reduce the possibility of circular library dependency. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4668 6f19259b-4bc3-4df7-8a09-765794883524 --- .../PeiReportStatusCodeLib.inf | 2 -- .../PeiReportStatusCodeLib/ReportStatusCodeLib.c | 28 ++++------------------ 2 files changed, 4 insertions(+), 26 deletions(-) diff --git a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf index aeee6c182e..47507151c2 100644 --- a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf +++ b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf @@ -24,8 +24,6 @@ EDK_RELEASE_VERSION = 0x00020000 EFI_SPECIFICATION_VERSION = 0x00020000 - CONSTRUCTOR = PeiReportStatusCodeLibConstructor - # # The following information is for reference only and not required by the build tools. diff --git a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c index c79d93e643..89224dacd1 100644 --- a/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c +++ b/IntelFrameworkModulePkg/Library/PeiReportStatusCodeLib/ReportStatusCodeLib.c @@ -32,29 +32,6 @@ // #define MAX_EXTENDED_DATA_SIZE 0x200 - -/** - The constructor function initializes the OEM hooked status - code device. - - @param FfsHeader Pointer to FFS header the loaded driver. - @param PeiServices Pointer to the PEI services. - - @return Status of initialization of OEM hook status code - device. - -**/ -EFI_STATUS -EFIAPI -PeiReportStatusCodeLibConstructor ( - IN EFI_PEI_FILE_HANDLE FileHandle, - IN EFI_PEI_SERVICES **PeiServices - ) -{ - return OemHookStatusCodeInitialize (); -} - - /** Internal worker function that reports a status code through the Status Code Protocol @@ -101,7 +78,10 @@ InternalReportStatusCode ( Data ); if (Status == EFI_NOT_AVAILABLE_YET) { - return OemHookStatusCodeReport (Type, Value, Instance, (EFI_GUID *) CallerId, Data); + Status = OemHookStatusCodeInitialize (); + if (!EFI_ERROR (Status)) { + return OemHookStatusCodeReport (Type, Value, Instance, (EFI_GUID *) CallerId, Data); + } } return Status; } -- cgit v1.2.3