]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EdkNt32Pkg/Dxe/WinNtThunk/Bus/Console/ConsoleIn.c
1. Perfect libraries MSA files
[mirror_edk2.git] / EdkNt32Pkg / Dxe / WinNtThunk / Bus / Console / ConsoleIn.c
index 3af1ce657034b15821ed437f33eda3de789e6576..a4e2b3fece7114203ae1bbdb3601c412ac5df8e5 100644 (file)
@@ -1,13 +1,13 @@
 /*++\r
 \r
-Copyright (c) 2006, 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
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
+Copyright (c) 2006 - 2007, 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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 Module Name:\r
 \r
@@ -15,15 +15,15 @@ Module Name:
 \r
 Abstract:\r
 \r
-  Console based on Win32 APIs. \r
+  Console based on Win32 APIs.\r
 \r
   This file attaches a SimpleTextIn protocol to a previously open window.\r
-  \r
+\r
   The constructor for this protocol depends on an open window. Currently\r
   the SimpleTextOut protocol creates a window when it's constructor is called.\r
-  Thus this code must run after the constructor for the SimpleTextOut \r
+  Thus this code must run after the constructor for the SimpleTextOut\r
   protocol\r
-  \r
+\r
 --*/\r
 \r
 #include "Console.h"\r
@@ -102,7 +102,7 @@ Returns:
   } else {\r
     return EFI_NOT_READY;\r
   }\r
-  \r
+\r
   //\r
   // Check to see if we should return a scan code in place of Unicode character.\r
   //\r
@@ -280,12 +280,8 @@ Returns:
     goto Done;\r
   }\r
 \r
-  Status = gBS->AllocatePool (\r
-                  EfiBootServicesData,\r
-                  sizeof (INPUT_RECORD) * NtEventCount,\r
-                  &InputRecord\r
-                  );\r
-  if (EFI_ERROR (Status)) {\r
+  InputRecord = AllocatePool (sizeof (INPUT_RECORD) * NtEventCount);\r
+  if (InputRecord == NULL) {\r
     Status = EFI_NOT_READY;\r
     goto Done;\r
   }\r
@@ -315,7 +311,7 @@ Returns:
 \r
 Done:\r
   if (InputRecord != NULL) {\r
-    gBS->FreePool (InputRecord);\r
+    FreePool (InputRecord);\r
   }\r
 \r
   return Status;\r