public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] Features/Intel/Debugging: Fix build error when use Xcode
@ 2020-06-22  7:32 Tan, Ming
  2020-06-22  7:41 ` [edk2-devel] " Dong, Eric
  0 siblings, 1 reply; 2+ messages in thread
From: Tan, Ming @ 2020-06-22  7:32 UTC (permalink / raw)
  To: devel; +Cc: Eric Dong, Liming Gao

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2822

When use Xcode, it will report following compile error:
  duplicate symbol _mRscHandlerProtocol in:

So in the Features/Intel/Debugging/,
change the global variable name in the following files
  RuntimeDxeBeepStatusCodeHandlerLib.c
  RuntimeDxePostCodeStatusCodeHandlerLib.c

Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Ming Tan <ming.tan@intel.com>
---
 .../RuntimeDxeBeepStatusCodeHandlerLib.c      | 20 +++++++++----------
 .../RuntimeDxePostCodeStatusCodeHandlerLib.c  | 20 +++++++++----------
 2 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.c b/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.c
index 631e2eecae..0bdc3f4575 100644
--- a/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.c
+++ b/Features/Intel/Debugging/BeepDebugFeaturePkg/Library/BeepStatusCodeHandlerLib/RuntimeDxeBeepStatusCodeHandlerLib.c
@@ -17,9 +17,9 @@
 #include <Library/BeepMapLib.h>
 #include <Library/BeepLib.h>
 
-EFI_RSC_HANDLER_PROTOCOL  *mRscHandlerProtocol       = NULL;
-EFI_EVENT                 mExitBootServicesEvent     = NULL;
-BOOLEAN                   mRegistered                = FALSE;
+EFI_RSC_HANDLER_PROTOCOL  *mBeepRscHandlerProtocol       = NULL;
+EFI_EVENT                 mBeepExitBootServicesEvent     = NULL;
+BOOLEAN                   mBeepRegistered                = FALSE;
 
 /**
   Convert status code value to the times of beep.
@@ -79,8 +79,8 @@ UnregisterBeepBootTimeHandlers (
   IN VOID             *Context
   )
 {
-  if (mRegistered) {
-    mRscHandlerProtocol->Unregister (BeepStatusCodeReportWorker);
+  if (mBeepRegistered) {
+    mBeepRscHandlerProtocol->Unregister (BeepStatusCodeReportWorker);
   }
 }
 
@@ -105,13 +105,13 @@ RegisterBeepBootTimeHandlers (
   Status = gBS->LocateProtocol (
                   &gEfiRscHandlerProtocolGuid,
                   NULL,
-                  (VOID **) &mRscHandlerProtocol
+                  (VOID **) &mBeepRscHandlerProtocol
                   );
   ASSERT_EFI_ERROR (Status);
 
-  mRscHandlerProtocol->Register (BeepStatusCodeReportWorker, TPL_HIGH_LEVEL);
+  mBeepRscHandlerProtocol->Register (BeepStatusCodeReportWorker, TPL_HIGH_LEVEL);
   ASSERT_EFI_ERROR (Status);
-  mRegistered = TRUE;
+  mBeepRegistered = TRUE;
 
   Status = gBS->CreateEventEx (
                   EVT_NOTIFY_SIGNAL,
@@ -119,7 +119,7 @@ RegisterBeepBootTimeHandlers (
                   UnregisterBeepBootTimeHandlers,
                   NULL,
                   &gEfiEventExitBootServicesGuid,
-                  &mExitBootServicesEvent
+                  &mBeepExitBootServicesEvent
                   );
   ASSERT_EFI_ERROR (Status);
 }
@@ -154,7 +154,7 @@ RuntimeDxeBeepStatusCodeHandlerLibConstructor (
   Status = gBS->LocateProtocol (
                   &gEfiRscHandlerProtocolGuid,
                   NULL,
-                  (VOID **) &mRscHandlerProtocol
+                  (VOID **) &mBeepRscHandlerProtocol
                   );
 
   if (!EFI_ERROR (Status)) {
diff --git a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.c b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.c
index 59b531fe7c..65fd555cc0 100644
--- a/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.c
+++ b/Features/Intel/Debugging/PostCodeDebugFeaturePkg/Library/PostCodeStatusCodeHandlerLib/RuntimeDxePostCodeStatusCodeHandlerLib.c
@@ -18,9 +18,9 @@
 #include <Library/PostCodeMapLib.h>
 #include <Library/PostCodeLib.h>
 
-EFI_RSC_HANDLER_PROTOCOL  *mRscHandlerProtocol       = NULL;
-EFI_EVENT                 mExitBootServicesEvent     = NULL;
-BOOLEAN                   mRegisted                  = FALSE;
+EFI_RSC_HANDLER_PROTOCOL  *mPostCodeRscHandlerProtocol       = NULL;
+EFI_EVENT                 mPostCodeExitBootServicesEvent     = NULL;
+BOOLEAN                   mPostCodeRegisted                  = FALSE;
 
 /**
   Convert status code value and write data to post code.
@@ -81,8 +81,8 @@ UnregisterPostCodeBootTimeHandlers (
   IN VOID             *Context
   )
 {
-  if (mRegisted) {
-    mRscHandlerProtocol->Unregister (PostCodeStatusCodeReportWorker);
+  if (mPostCodeRegisted) {
+    mPostCodeRscHandlerProtocol->Unregister (PostCodeStatusCodeReportWorker);
   }
 }
 
@@ -109,13 +109,13 @@ RegisterPostCodeBootTimeHandlers (
   Status = gBS->LocateProtocol (
                   &gEfiRscHandlerProtocolGuid,
                   NULL,
-                  (VOID **) &mRscHandlerProtocol
+                  (VOID **) &mPostCodeRscHandlerProtocol
                   );
   ASSERT_EFI_ERROR (Status);
 
-  mRscHandlerProtocol->Register (PostCodeStatusCodeReportWorker, TPL_HIGH_LEVEL);
+  mPostCodeRscHandlerProtocol->Register (PostCodeStatusCodeReportWorker, TPL_HIGH_LEVEL);
   ASSERT_EFI_ERROR (Status);
-  mRegisted = TRUE;
+  mPostCodeRegisted = TRUE;
 
   Status = gBS->CreateEventEx (
                   EVT_NOTIFY_SIGNAL,
@@ -123,7 +123,7 @@ RegisterPostCodeBootTimeHandlers (
                   UnregisterPostCodeBootTimeHandlers,
                   NULL,
                   &gEfiEventExitBootServicesGuid,
-                  &mExitBootServicesEvent
+                  &mPostCodeExitBootServicesEvent
                   );
   ASSERT_EFI_ERROR (Status);
 }
@@ -158,7 +158,7 @@ RuntimeDxePostCodeStatusCodeHandlerLibConstructor (
   Status = gBS->LocateProtocol (
                   &gEfiRscHandlerProtocolGuid,
                   NULL,
-                  (VOID **) &mRscHandlerProtocol
+                  (VOID **) &mPostCodeRscHandlerProtocol
                   );
 
   if (!EFI_ERROR (Status)) {
-- 
2.24.0.windows.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-22  7:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-22  7:32 [PATCH] Features/Intel/Debugging: Fix build error when use Xcode Tan, Ming
2020-06-22  7:41 ` [edk2-devel] " Dong, Eric

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox