]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg: Remove UefiBootServicesTableLib dependency from DxePrintLibPrint2Protocol.
authorjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 2 Sep 2011 18:27:56 +0000 (18:27 +0000)
committerjcarsey <jcarsey@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 2 Sep 2011 18:27:56 +0000 (18:27 +0000)
The use of the BootServicesTableLib inside the DxePrintLibPrint2Protocol
allows for potential circular library dependency.

Signed-off-by: jcarsey
Reviewed-by: jljusten
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12273 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Library/DxePrintLibPrint2Protocol/DxePrintLibPrint2Protocol.inf
MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c

index 5195d012738d91e0b369411be9256ba5b2c074d7..5f2d457b9934e64d590c93d5a235c8824fef643e 100644 (file)
   MODULE_TYPE                    = DXE_DRIVER\r
   VERSION_STRING                 = 1.0\r
   LIBRARY_CLASS                  = PrintLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER\r
-\r
   CONSTRUCTOR                    = PrintLibConstructor\r
 \r
-#\r
-# The following information is for reference only and not required by the build tools.\r
-#\r
-#  VALID_ARCHITECTURES           = IA32 X64 IPF EBC\r
-#\r
-\r
 [Sources]\r
   PrintLib.c\r
 \r
-\r
 [Packages]\r
   MdePkg/MdePkg.dec\r
   MdeModulePkg/MdeModulePkg.dec\r
 \r
-\r
 [LibraryClasses]\r
   BaseLib\r
-  UefiBootServicesTableLib\r
   DebugLib\r
 \r
 [Protocols]\r
index 4646f18432ec61d616f93a0e4b77ae9c8bed87d1..671c3332f91e07e73d4df1378f9eb0541e94c21d 100644 (file)
@@ -24,7 +24,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #include <Library/PrintLib.h>\r
 \r
 #include <Library/BaseLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
 #include <Library/DebugLib.h>\r
 \r
 EFI_PRINT2_PROTOCOL  *mPrint2Protocol = NULL;\r
@@ -50,11 +49,11 @@ PrintLibConstructor (
 {\r
   EFI_STATUS                   Status;\r
 \r
-  Status = gBS->LocateProtocol (\r
-                  &gEfiPrint2ProtocolGuid,\r
-                  NULL,\r
-                  (VOID**) &mPrint2Protocol\r
-                  );\r
+  Status = SystemTable->BootServices->LocateProtocol (\r
+                                        &gEfiPrint2ProtocolGuid,\r
+                                        NULL,\r
+                                        (VOID**) &mPrint2Protocol\r
+                                        );\r
   ASSERT_EFI_ERROR (Status);\r
   ASSERT (mPrint2Protocol != NULL);\r
 \r