]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c
Cleaned up EFI Console Variable usage
[mirror_edk2.git] / MdeModulePkg / Universal / Console / ConPlatformDxe / ConPlatform.c
index d86ea4766fd9894a1d432dafb6358446fcd69dac..1a32cb301605d9d5f44b0ecfaf5b7ded7c84efdb 100644 (file)
@@ -17,40 +17,8 @@ Abstract:
 \r
 --*/\r
 \r
 \r
 --*/\r
 \r
-#include <Uefi.h>\r
-\r
-#include "ConPlatform.h"\r
-\r
-\r
-//\r
-// The protocols, PPI and GUID defintions for this module\r
-//\r
-#include <Protocol/SimpleTextOut.h>\r
-#include <Guid/GlobalVariable.h>\r
-#include <Guid/ConsoleInDevice.h>\r
-#include <Protocol/DevicePath.h>\r
-#include <Protocol/SimpleTextIn.h>\r
-#include <Guid/HotPlugDevice.h>\r
-#include <Guid/StandardErrorDevice.h>\r
-#include <Guid/ConsoleOutDevice.h>\r
-//\r
-// The Library classes this module consumes\r
-//\r
-#include <Library/DebugLib.h>\r
-#include <Library/UefiDriverEntryPoint.h>\r
-#include <Library/UefiLib.h>\r
-#include <Library/BaseMemoryLib.h>\r
-#include <Library/UefiBootServicesTableLib.h>\r
-#include <Library/UefiRuntimeServicesTableLib.h>\r
-#include <Library/DevicePathLib.h>\r
-#include <Library/MemoryAllocationLib.h>\r
-//\r
-// Driver Binding Externs\r
-//\r
-extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding;\r
-extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;\r
-extern EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextOutDriverBinding;\r
-extern EFI_COMPONENT_NAME_PROTOCOL gConPlatformComponentName;\r
+#include <ConPlatform.h>\r
+\r
 \r
 EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding = {\r
   ConPlatformTextInDriverBindingSupported,\r
 \r
 EFI_DRIVER_BINDING_PROTOCOL gConPlatformTextInDriverBinding = {\r
   ConPlatformTextInDriverBindingSupported,\r
@@ -311,7 +279,7 @@ Returns:
     // Append the device path to the ConInDev environment variable\r
     //\r
     ConPlatformUpdateDeviceVariable (\r
     // Append the device path to the ConInDev environment variable\r
     //\r
     ConPlatformUpdateDeviceVariable (\r
-      VarConsoleInpDev,\r
+      L"ConInDev",\r
       DevicePath,\r
       APPEND\r
       );\r
       DevicePath,\r
       APPEND\r
       );\r
@@ -321,7 +289,7 @@ Returns:
     // then install EfiConsoleInDeviceGuid onto ControllerHandle\r
     //\r
     Status = ConPlatformUpdateDeviceVariable (\r
     // then install EfiConsoleInDeviceGuid onto ControllerHandle\r
     //\r
     Status = ConPlatformUpdateDeviceVariable (\r
-              VarConsoleInp,\r
+              L"ConIn",\r
               DevicePath,\r
               CHECK\r
               );\r
               DevicePath,\r
               CHECK\r
               );\r
@@ -419,7 +387,7 @@ Returns:
     // Append the device path to the ConOutDev environment variable\r
     //\r
     ConPlatformUpdateDeviceVariable (\r
     // Append the device path to the ConOutDev environment variable\r
     //\r
     ConPlatformUpdateDeviceVariable (\r
-      VarConsoleOutDev,\r
+      L"ConOutDev",\r
       DevicePath,\r
       APPEND\r
       );\r
       DevicePath,\r
       APPEND\r
       );\r
@@ -427,7 +395,7 @@ Returns:
     // Append the device path to the StdErrDev environment variable\r
     //\r
     ConPlatformUpdateDeviceVariable (\r
     // Append the device path to the StdErrDev environment variable\r
     //\r
     ConPlatformUpdateDeviceVariable (\r
-      VarErrorOutDev,\r
+      L"ErrOutDev",\r
       DevicePath,\r
       APPEND\r
       );\r
       DevicePath,\r
       APPEND\r
       );\r
@@ -437,7 +405,7 @@ Returns:
     // then install EfiConsoleOutDeviceGuid onto ControllerHandle\r
     //\r
     Status = ConPlatformUpdateDeviceVariable (\r
     // then install EfiConsoleOutDeviceGuid onto ControllerHandle\r
     //\r
     Status = ConPlatformUpdateDeviceVariable (\r
-              VarConsoleOut,\r
+              L"ConOut",\r
               DevicePath,\r
               CHECK\r
               );\r
               DevicePath,\r
               CHECK\r
               );\r
@@ -528,7 +496,7 @@ Returns:
       // Remove DevicePath from ConInDev\r
       //\r
       ConPlatformUpdateDeviceVariable (\r
       // Remove DevicePath from ConInDev\r
       //\r
       ConPlatformUpdateDeviceVariable (\r
-        VarConsoleInpDev,\r
+        L"ConInDev",\r
         DevicePath,\r
         DELETE\r
         );\r
         DevicePath,\r
         DELETE\r
         );\r
@@ -601,12 +569,12 @@ Returns:
       // Remove DevicePath from ConOutDev, and StdErrDev\r
       //\r
       ConPlatformUpdateDeviceVariable (\r
       // Remove DevicePath from ConOutDev, and StdErrDev\r
       //\r
       ConPlatformUpdateDeviceVariable (\r
-        VarConsoleOutDev,\r
+        L"ConOutDev",\r
         DevicePath,\r
         DELETE\r
         );\r
       ConPlatformUpdateDeviceVariable (\r
         DevicePath,\r
         DELETE\r
         );\r
       ConPlatformUpdateDeviceVariable (\r
-        VarErrorOutDev,\r
+        L"ErrOutDev",\r
         DevicePath,\r
         DELETE\r
         );\r
         DevicePath,\r
         DELETE\r
         );\r