]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.c
Update to support to produce Component Name and & Component Name 2 protocol based...
[mirror_edk2.git] / Nt32Pkg / WinNtBusDriverDxe / WinNtBusDriver.c
index edcd9eb96dd3f7e3b2ed2e89d9107345dcb3822e..932f7edb67def00e968a404768816a5114cecefe 100644 (file)
@@ -175,14 +175,13 @@ InitializeWinNtBusDriver(
   //\r
   // Install driver model protocol(s).\r
   //\r
-  Status = EfiLibInstallAllDriverProtocols (\r
+  Status = EfiLibInstallDriverBindingComponentName2 (\r
              ImageHandle,\r
              SystemTable,\r
              &gWinNtBusDriverBinding,\r
              ImageHandle,\r
              &gWinNtBusDriverComponentName,\r
-             NULL,\r
-             NULL\r
+             &gWinNtBusDriverComponentName2\r
              );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
@@ -401,12 +400,21 @@ Returns:
     WinNtBusDevice->Signature           = WIN_NT_BUS_DEVICE_SIGNATURE;\r
     WinNtBusDevice->ControllerNameTable = NULL;\r
 \r
-    AddUnicodeString (\r
+    AddUnicodeString2 (\r
       "eng",\r
       gWinNtBusDriverComponentName.SupportedLanguages,\r
       &WinNtBusDevice->ControllerNameTable,\r
-      L"Windows Bus Controller"\r
+      L"Windows Bus Controller",\r
+      TRUE\r
       );\r
+    AddUnicodeString2 (\r
+      "en",\r
+      gWinNtBusDriverComponentName2.SupportedLanguages,\r
+      &WinNtBusDevice->ControllerNameTable,\r
+      L"Windows Bus Controller",\r
+      FALSE\r
+      );\r
+\r
 \r
     Status = gBS->InstallMultipleProtocolInterfaces (\r
                     &ControllerHandle,\r
@@ -516,12 +524,21 @@ Returns:
           return EFI_OUT_OF_RESOURCES;\r
         }\r
 \r
-        AddUnicodeString (\r
+        AddUnicodeString2 (\r
           "eng",\r
           gWinNtBusDriverComponentName.SupportedLanguages,\r
           &WinNtDevice->ControllerNameTable,\r
-          ComponentName\r
+          ComponentName,\r
+          TRUE\r
           );\r
+        AddUnicodeString2 (\r
+          "en",\r
+          gWinNtBusDriverComponentName2.SupportedLanguages,\r
+          &WinNtDevice->ControllerNameTable,\r
+          ComponentName,\r
+          FALSE\r
+          );\r
+\r
 \r
         WinNtDevice->WinNtIo.TypeGuid       = mPcdEnvironment[Index].DevicePathGuid;\r
         WinNtDevice->WinNtIo.InstanceNumber = Count;\r