Fix the wrong checking for UnixSerialIo
[mirror_edk2.git] / EdkNt32Pkg / Dxe / WinNtThunk / Bus / SerialIo / ComponentName.c
index 2b7cb92..d22f030 100644 (file)
@@ -17,14 +17,14 @@ Abstract:
 \r
 --*/\r
 \r
-#include "UnixSerialIo.h"\r
+#include "WinNtSerialIo.h"\r
 \r
 //\r
 // EFI Component Name Functions\r
 //\r
 EFI_STATUS\r
 EFIAPI\r
-UnixSerialIoComponentNameGetDriverName (\r
+WinNtSerialIoComponentNameGetDriverName (\r
   IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
   IN  CHAR8                        *Language,\r
   OUT CHAR16                       **DriverName\r
@@ -32,7 +32,7 @@ UnixSerialIoComponentNameGetDriverName (
 \r
 EFI_STATUS\r
 EFIAPI\r
-UnixSerialIoComponentNameGetControllerName (\r
+WinNtSerialIoComponentNameGetControllerName (\r
   IN  EFI_COMPONENT_NAME_PROTOCOL                     *This,\r
   IN  EFI_HANDLE                                      ControllerHandle,\r
   IN  EFI_HANDLE                                      ChildHandle        OPTIONAL,\r
@@ -43,20 +43,20 @@ UnixSerialIoComponentNameGetControllerName (
 //\r
 // EFI Component Name Protocol\r
 //\r
-EFI_COMPONENT_NAME_PROTOCOL     gUnixSerialIoComponentName = {\r
-  UnixSerialIoComponentNameGetDriverName,\r
-  UnixSerialIoComponentNameGetControllerName,\r
+EFI_COMPONENT_NAME_PROTOCOL     gWinNtSerialIoComponentName = {\r
+  WinNtSerialIoComponentNameGetDriverName,\r
+  WinNtSerialIoComponentNameGetControllerName,\r
   "eng"\r
 };\r
 \r
-static EFI_UNICODE_STRING_TABLE mUnixSerialIoDriverNameTable[] = {\r
-  { "eng", L"Unix Serial I/O Driver" },\r
+static EFI_UNICODE_STRING_TABLE mWinNtSerialIoDriverNameTable[] = {\r
+  { "eng", L"Windows Serial I/O Driver" },\r
   { NULL , NULL }\r
 };\r
 \r
 EFI_STATUS\r
 EFIAPI\r
-UnixSerialIoComponentNameGetDriverName (\r
+WinNtSerialIoComponentNameGetDriverName (\r
   IN  EFI_COMPONENT_NAME_PROTOCOL  *This,\r
   IN  CHAR8                        *Language,\r
   OUT CHAR16                       **DriverName\r
@@ -90,15 +90,15 @@ UnixSerialIoComponentNameGetDriverName (
 {\r
   return LookupUnicodeString (\r
           Language,\r
-          gUnixSerialIoComponentName.SupportedLanguages,\r
-          mUnixSerialIoDriverNameTable,\r
+          gWinNtSerialIoComponentName.SupportedLanguages,\r
+          mWinNtSerialIoDriverNameTable,\r
           DriverName\r
           );\r
 }\r
 \r
 EFI_STATUS\r
 EFIAPI\r
-UnixSerialIoComponentNameGetControllerName (\r
+WinNtSerialIoComponentNameGetControllerName (\r
   IN  EFI_COMPONENT_NAME_PROTOCOL                     *This,\r
   IN  EFI_HANDLE                                      ControllerHandle,\r
   IN  EFI_HANDLE                                      ChildHandle        OPTIONAL,\r
@@ -152,15 +152,15 @@ UnixSerialIoComponentNameGetControllerName (
 {\r
   EFI_STATUS                    Status;\r
   EFI_SERIAL_IO_PROTOCOL        *SerialIo;\r
-  UNIX_SERIAL_IO_PRIVATE_DATA *Private;\r
+  WIN_NT_SERIAL_IO_PRIVATE_DATA *Private;\r
 \r
   //\r
   // Make sure this driver is currently managing ControllHandle\r
   //\r
   Status = EfiTestManagedDevice (\r
              ControllerHandle,\r
-             gUnixSerialIoDriverBinding.DriverBindingHandle,\r
-             &gEfiUnixIoProtocolGuid\r
+             gWinNtSerialIoDriverBinding.DriverBindingHandle,\r
+             &gEfiWinNtIoProtocolGuid\r
              );\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
@@ -176,7 +176,7 @@ UnixSerialIoComponentNameGetControllerName (
   Status = EfiTestChildHandle (\r
              ControllerHandle,\r
              ChildHandle,\r
-             &gEfiUnixIoProtocolGuid\r
+             &gEfiWinNtIoProtocolGuid\r
              );\r
   if (EFI_ERROR (Status)) {\r
     return Status;\r
@@ -188,8 +188,8 @@ UnixSerialIoComponentNameGetControllerName (
   Status = gBS->OpenProtocol (\r
                   ChildHandle,\r
                   &gEfiSerialIoProtocolGuid,\r
-                  (VOID**)&SerialIo,\r
-                  gUnixSerialIoDriverBinding.DriverBindingHandle,\r
+                  &SerialIo,\r
+                  gWinNtSerialIoDriverBinding.DriverBindingHandle,\r
                   ChildHandle,\r
                   EFI_OPEN_PROTOCOL_GET_PROTOCOL\r
                   );\r
@@ -197,11 +197,11 @@ UnixSerialIoComponentNameGetControllerName (
     return EFI_UNSUPPORTED;\r
   }\r
 \r
-  Private = UNIX_SERIAL_IO_PRIVATE_DATA_FROM_THIS (SerialIo);\r
+  Private = WIN_NT_SERIAL_IO_PRIVATE_DATA_FROM_THIS (SerialIo);\r
 \r
   return LookupUnicodeString (\r
           Language,\r
-          gUnixSerialIoComponentName.SupportedLanguages,\r
+          gWinNtSerialIoComponentName.SupportedLanguages,\r
           Private->ControllerNameTable,\r
           ControllerName\r
           );\r