]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Change functional static variable to Global variable. No STATIC modifier is recommend...
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 31 Oct 2008 02:04:40 +0000 (02:04 +0000)
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 31 Oct 2008 02:04:40 +0000 (02:04 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@6313 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/DebugSupportDxe/Ipf/plDebugSupport.c
MdeModulePkg/Universal/Network/PxeBcDxe/Pxe_loadfile.c
MdeModulePkg/Universal/SetupBrowserDxe/Ui.c

index 7b6e75dc4ae02228e9980e5052bcdaae2f6f2168..cf9bcfef01892e2b4543e8ddcb2ee529269c2670 100644 (file)
@@ -1,7 +1,7 @@
 /**@file\r
   IPF specific debug support functions\r
 \r
-Copyright (c) 2006, Intel Corporation                                                         \r
+Copyright (c) 2006 - 2008, Intel Corporation                                                         \r
 All rights reserved. This program and the accompanying materials                          \r
 are licensed and made available under the terms and conditions of the BSD License         \r
 which accompanies this distribution.  The full text of the license may be found at        \r
@@ -17,6 +17,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 //\r
 #include "plDebugSupport.h"\r
 \r
+BOOLEAN  mInHandler = FALSE;\r
+\r
 typedef struct {\r
   UINT64  low;\r
   UINT64  high;\r
@@ -156,26 +158,24 @@ Returns:
   \r
 --*/\r
 {\r
-  STATIC BOOLEAN  InHandler = FALSE;\r
-\r
   DEBUG_CODE_BEGIN ();\r
-    if (InHandler) {\r
+    if (mInHandler) {\r
       DEBUG ((EFI_D_INFO, "ERROR: Re-entered debugger!\n"\r
                                     "       ExceptionType == %X\n"\r
                                     "       Context       == %X\n"\r
                                     "       Context.SystemContextIpf->CrIip  == %X\n"\r
                                     "       Context.SystemContextIpf->CrIpsr == %X\n"\r
-                                    "       InHandler     == %X\n",\r
+                                    "       mInHandler     == %X\n",\r
                                     ExceptionType, \r
                                     Context, \r
                                     Context.SystemContextIpf->CrIip,\r
                                     Context.SystemContextIpf->CrIpsr,\r
-                                    InHandler));\r
+                                    mInHandler));\r
     }\r
   DEBUG_CODE_END ();\r
 \r
-  ASSERT (!InHandler);\r
-  InHandler = TRUE;\r
+  ASSERT (!mInHandler);\r
+  mInHandler = TRUE;\r
   if (IvtEntryTable[ExceptionType].RegisteredCallback != NULL) {\r
     if (ExceptionType != EXCEPT_IPF_EXTERNAL_INTERRUPT) {\r
       IvtEntryTable[ExceptionType].RegisteredCallback (ExceptionType, Context.SystemContextIpf);\r
@@ -186,7 +186,7 @@ Returns:
     ASSERT (0);\r
   }\r
 \r
-  InHandler = FALSE;\r
+  mInHandler = FALSE;\r
 }\r
 \r
 VOID\r
index e2b56097d0030e39c6132ddcca39ad8fb7a2c32a..a15b873bc4c2280e29f14fddbad31b3481d5d245 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
-Copyright (c) 2004 - 2007, Intel Corporation\r
+Copyright (c) 2004 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -39,7 +39,7 @@ typedef union {
   UINT8                     *BytePtr;\r
 } UNION_PTR;\r
 \r
-\r
+UINTN  mPropeller;\r
 \r
 /**\r
   PxeBc callback routine for status updates and aborts.\r
@@ -68,13 +68,11 @@ bc_callback (
   IN EFI_PXE_BASE_CODE_PACKET             * PacketPtr OPTIONAL\r
   )\r
 {\r
-  STATIC UINTN  Propeller;\r
-\r
   EFI_INPUT_KEY Key;\r
   UINTN         Row;\r
   UINTN         Col;\r
 \r
-  Propeller = 0;\r
+  mPropeller = 0;\r
   //\r
   // Resolve Warning 4 unreferenced parameter problem\r
   //\r
@@ -139,10 +137,10 @@ bc_callback (
     Row = gST->ConOut->Mode->CursorRow;\r
     Col = gST->ConOut->Mode->CursorColumn;\r
 \r
-    AsciiPrint ("%c", "/-\\|"[Propeller]);\r
+    AsciiPrint ("%c", "/-\\|"[mPropeller]);\r
     gST->ConOut->SetCursorPosition (gST->ConOut, Col, Row);\r
 \r
-    Propeller = (Propeller + 1) & 3;\r
+    mPropeller = (mPropeller + 1) & 3;\r
   }\r
 \r
   return EFI_PXE_BASE_CODE_CALLBACK_STATUS_CONTINUE;\r
index 390d551386da5bd1c003db49ac04b068f289f585..fc715fea5b65567a543ec1904b08c32a96554b1c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Utility functions for User Interface functions.\r
 \r
-Copyright (c) 2004 - 2007, Intel Corporation\r
+Copyright (c) 2004 - 2008, Intel Corporation\r
 All rights reserved. This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -116,6 +116,8 @@ SCREEN_OPERATION_T0_CONTROL_FLAG  gScreenOperationToControlFlag[] = {
   }\r
 };\r
 \r
+BOOLEAN  mInputError;\r
+\r
 \r
 /**\r
   Set Buffer to Value for Size bytes.\r
@@ -892,7 +894,6 @@ UpdateStatusBar (
   )\r
 {\r
   UINTN           Index;\r
-  STATIC BOOLEAN  InputError;\r
   CHAR16          *NvUpdateMessage;\r
   CHAR16          *InputErrorMessage;\r
 \r
@@ -908,14 +909,14 @@ UpdateStatusBar (
         gScreenDimensions.BottomRow - 1,\r
         InputErrorMessage\r
         );\r
-      InputError = TRUE;\r
+      mInputError = TRUE;\r
     } else {\r
       gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT_HIGHLIGHT);\r
       for (Index = 0; Index < (GetStringWidth (InputErrorMessage) - 2) / 2; Index++) {\r
         PrintAt (gScreenDimensions.LeftColumn + gPromptBlockWidth + Index, gScreenDimensions.BottomRow - 1, L"  ");\r
       }\r
 \r
-      InputError = FALSE;\r
+      mInputError = FALSE;\r
     }\r
     break;\r
 \r
@@ -947,7 +948,7 @@ UpdateStatusBar (
     break;\r
 \r
   case REFRESH_STATUS_BAR:\r
-    if (InputError) {\r
+    if (mInputError) {\r
       UpdateStatusBar (INPUT_ERROR, Flags, TRUE);\r
     }\r
 \r