Cleaned up EFI Console Variable usage
authorAJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 16 Aug 2007 23:32:10 +0000 (23:32 +0000)
committerAJFISH <AJFISH@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 16 Aug 2007 23:32:10 +0000 (23:32 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3666 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c
MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h
MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c
MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h

index 178be23ca52cb583fb6b2b95c53233389ca946a0..1a32cb301605d9d5f44b0ecfaf5b7ded7c84efdb 100644 (file)
@@ -279,7 +279,7 @@ Returns:
     // Append the device path to the ConInDev environment variable\r
     //\r
     ConPlatformUpdateDeviceVariable (\r
-      VarConsoleInpDev,\r
+      L"ConInDev",\r
       DevicePath,\r
       APPEND\r
       );\r
@@ -289,7 +289,7 @@ Returns:
     // then install EfiConsoleInDeviceGuid onto ControllerHandle\r
     //\r
     Status = ConPlatformUpdateDeviceVariable (\r
-              VarConsoleInp,\r
+              L"ConIn",\r
               DevicePath,\r
               CHECK\r
               );\r
@@ -387,7 +387,7 @@ Returns:
     // Append the device path to the ConOutDev environment variable\r
     //\r
     ConPlatformUpdateDeviceVariable (\r
-      VarConsoleOutDev,\r
+      L"ConOutDev",\r
       DevicePath,\r
       APPEND\r
       );\r
@@ -395,7 +395,7 @@ Returns:
     // Append the device path to the StdErrDev environment variable\r
     //\r
     ConPlatformUpdateDeviceVariable (\r
-      VarErrorOutDev,\r
+      L"ErrOutDev",\r
       DevicePath,\r
       APPEND\r
       );\r
@@ -405,7 +405,7 @@ Returns:
     // then install EfiConsoleOutDeviceGuid onto ControllerHandle\r
     //\r
     Status = ConPlatformUpdateDeviceVariable (\r
-              VarConsoleOut,\r
+              L"ConOut",\r
               DevicePath,\r
               CHECK\r
               );\r
@@ -496,7 +496,7 @@ Returns:
       // Remove DevicePath from ConInDev\r
       //\r
       ConPlatformUpdateDeviceVariable (\r
-        VarConsoleInpDev,\r
+        L"ConInDev",\r
         DevicePath,\r
         DELETE\r
         );\r
@@ -569,12 +569,12 @@ Returns:
       // Remove DevicePath from ConOutDev, and StdErrDev\r
       //\r
       ConPlatformUpdateDeviceVariable (\r
-        VarConsoleOutDev,\r
+        L"ConOutDev",\r
         DevicePath,\r
         DELETE\r
         );\r
       ConPlatformUpdateDeviceVariable (\r
-        VarErrorOutDev,\r
+        L"ErrOutDev",\r
         DevicePath,\r
         DELETE\r
         );\r
index f408ede7a4b6d94e379030db0ebca7aa661fd75d..2d79f02a2e91c50cbb2c1fd097ac4dda63ee1d20 100644 (file)
@@ -46,12 +46,6 @@ extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;
 extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding;\r
 extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;\r
 \r
-#define VarConsoleInpDev  L"ConInDev"\r
-#define VarConsoleInp     L"ConIn"\r
-#define VarConsoleOutDev  L"ConOutDev"\r
-#define VarConsoleOut     L"ConOut"\r
-#define VarErrorOutDev    L"ErrOutDev"\r
-#define VarErrorOut       L"ErrOut"\r
 \r
 typedef enum {\r
   CHECK,\r
index 5b8cb8da0b0c3a20e360727ad74b841b2c9055c2..e9096a3db929f18a1962e96874856a791a16747b 100644 (file)
@@ -306,9 +306,9 @@ TerminalDriverBindingStart (
                       EFI_OPEN_PROTOCOL_TEST_PROTOCOL\r
                       );\r
       if (EFI_ERROR (Status)) {\r
-        TerminalUpdateConsoleDevVariable ((CHAR16 *)VarConsoleInpDev, ParentDevicePath);\r
-        TerminalUpdateConsoleDevVariable ((CHAR16 *)VarConsoleOutDev, ParentDevicePath);\r
-        TerminalUpdateConsoleDevVariable ((CHAR16 *)VarErrorOutDev, ParentDevicePath);\r
+        TerminalUpdateConsoleDevVariable (L"ConInDev", ParentDevicePath);\r
+        TerminalUpdateConsoleDevVariable ((L"ConOutDev", ParentDevicePath);\r
+        TerminalUpdateConsoleDevVariable (L"ErrOutDev", ParentDevicePath);\r
       }\r
     }\r
   }\r
@@ -707,9 +707,9 @@ TerminalDriverBindingStop (
       // Remove Parent Device Path from\r
       // the Console Device Environment Variables\r
       //\r
-      TerminalRemoveConsoleDevVariable ((CHAR16 *)VarConsoleInpDev, ParentDevicePath);\r
-      TerminalRemoveConsoleDevVariable ((CHAR16 *)VarConsoleOutDev, ParentDevicePath);\r
-      TerminalRemoveConsoleDevVariable ((CHAR16 *)VarErrorOutDev, ParentDevicePath);\r
+      TerminalRemoveConsoleDevVariable (L"ConInDev", ParentDevicePath);\r
+      TerminalRemoveConsoleDevVariable (L"ConOutDev", ParentDevicePath);\r
+      TerminalRemoveConsoleDevVariable (L"ErrOutDev", ParentDevicePath);\r
 \r
       //\r
       // Uninstall the Terminal Driver's GUID Tag from the Serial controller\r
index c4f5ac19f3006f855d1ce3ac60330ae46f778803..7fa16d7d3897653e4e7143d824981f72f3cf3262 100644 (file)
@@ -146,10 +146,6 @@ typedef struct {
   CHAR8   Ascii;\r
 } UNICODE_TO_CHAR;\r
 \r
-#define VarConsoleInpDev  L"ConInDev"\r
-#define VarConsoleOutDev  L"ConOutDev"\r
-#define VarErrorOutDev    L"ErrOutDev"\r
-\r
 //\r
 // Global Variables\r
 //\r