From e1107a76ad3b4859b953e3bde0e8f2dd3520a610 Mon Sep 17 00:00:00 2001 From: qhuang8 Date: Sat, 29 Sep 2007 11:20:23 +0000 Subject: Update to support to produce Component Name and & Component Name 2 protocol based on Feature flag PcdComponentNameDisable & PcdComponentName2Disable. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@3989 6f19259b-4bc3-4df7-8a09-765794883524 --- Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.c | 31 +++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.c') diff --git a/Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.c b/Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.c index edcd9eb96d..932f7edb67 100644 --- a/Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.c +++ b/Nt32Pkg/WinNtBusDriverDxe/WinNtBusDriver.c @@ -175,14 +175,13 @@ InitializeWinNtBusDriver( // // Install driver model protocol(s). // - Status = EfiLibInstallAllDriverProtocols ( + Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, &gWinNtBusDriverBinding, ImageHandle, &gWinNtBusDriverComponentName, - NULL, - NULL + &gWinNtBusDriverComponentName2 ); ASSERT_EFI_ERROR (Status); @@ -401,12 +400,21 @@ Returns: WinNtBusDevice->Signature = WIN_NT_BUS_DEVICE_SIGNATURE; WinNtBusDevice->ControllerNameTable = NULL; - AddUnicodeString ( + AddUnicodeString2 ( "eng", gWinNtBusDriverComponentName.SupportedLanguages, &WinNtBusDevice->ControllerNameTable, - L"Windows Bus Controller" + L"Windows Bus Controller", + TRUE ); + AddUnicodeString2 ( + "en", + gWinNtBusDriverComponentName2.SupportedLanguages, + &WinNtBusDevice->ControllerNameTable, + L"Windows Bus Controller", + FALSE + ); + Status = gBS->InstallMultipleProtocolInterfaces ( &ControllerHandle, @@ -516,12 +524,21 @@ Returns: return EFI_OUT_OF_RESOURCES; } - AddUnicodeString ( + AddUnicodeString2 ( "eng", gWinNtBusDriverComponentName.SupportedLanguages, &WinNtDevice->ControllerNameTable, - ComponentName + ComponentName, + TRUE ); + AddUnicodeString2 ( + "en", + gWinNtBusDriverComponentName2.SupportedLanguages, + &WinNtDevice->ControllerNameTable, + ComponentName, + FALSE + ); + WinNtDevice->WinNtIo.TypeGuid = mPcdEnvironment[Index].DevicePathGuid; WinNtDevice->WinNtIo.InstanceNumber = Count; -- cgit v1.2.3