From 3012ce5cf75f938a79c70568595454e27b2f014a Mon Sep 17 00:00:00 2001 From: vanjeff Date: Thu, 17 Jan 2008 05:56:45 +0000 Subject: 1. Fixed bugs in DxeNetLib to meet consistence with network module DriverBinding protocol. 2. Sync bugs in console modules. 3. Sync bugs in PlatDriOverLib. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4571 6f19259b-4bc3-4df7-8a09-765794883524 --- MdeModulePkg/Library/DxeNetLib/DxeNetLib.c | 32 ++++++++-------------------- MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf | 16 ++++++++------ 2 files changed, 18 insertions(+), 30 deletions(-) (limited to 'MdeModulePkg/Library/DxeNetLib') diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c index f65489e7ed..ee8b6797e5 100644 --- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c +++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c @@ -25,6 +25,8 @@ Abstract: #include #include #include +#include +#include #include #include @@ -842,8 +844,7 @@ NetLibDefaultUnload ( UINTN Index; EFI_DRIVER_BINDING_PROTOCOL *DriverBinding; EFI_COMPONENT_NAME_PROTOCOL *ComponentName; - EFI_DRIVER_CONFIGURATION_PROTOCOL *DriverConfiguration; - EFI_DRIVER_DIAGNOSTICS_PROTOCOL *DriverDiagnostics; + EFI_COMPONENT_NAME2_PROTOCOL *ComponentName2; // // Get the list of all the handles in the handle database. @@ -912,30 +913,15 @@ NetLibDefaultUnload ( Status = gBS->HandleProtocol ( DeviceHandleBuffer[Index], - &gEfiDriverConfigurationProtocolGuid, - (VOID **) &DriverConfiguration + &gEfiComponentName2ProtocolGuid, + (VOID **) &ComponentName2 ); - if (!EFI_ERROR (Status)) { gBS->UninstallProtocolInterface ( - ImageHandle, - &gEfiDriverConfigurationProtocolGuid, - DriverConfiguration - ); - } - - Status = gBS->HandleProtocol ( - DeviceHandleBuffer[Index], - &gEfiDriverDiagnosticsProtocolGuid, - (VOID **) &DriverDiagnostics - ); - - if (!EFI_ERROR (Status)) { - gBS->UninstallProtocolInterface ( - ImageHandle, - &gEfiDriverDiagnosticsProtocolGuid, - DriverDiagnostics - ); + ImageHandle, + &gEfiComponentName2ProtocolGuid, + ComponentName2 + ); } } diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf index deb8949924..3ce822d831 100644 --- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf +++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf @@ -44,15 +44,17 @@ [LibraryClasses] - BaseLib - DebugLib - BaseMemoryLib - UefiBootServicesTableLib - UefiRuntimeServicesTableLib - UefiLib - MemoryAllocationLib + BaseLib + DebugLib + BaseMemoryLib + UefiBootServicesTableLib + UefiRuntimeServicesTableLib + UefiLib + MemoryAllocationLib [Protocols] gEfiSimpleNetworkProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiNicIp4ConfigProtocolGuid # PROTOCOL ALWAYS_CONSUMED gEfiDpcProtocolGuid # PROTOCOL ALWAYS_CONSUMED + gEfiComponentNameProtocolGuid # PROTOCOL ALWAYS_CONSUMED + gEfiComponentName2ProtocolGuid # PROTOCOL ALWAYS_CONSUMED \ No newline at end of file -- cgit v1.2.3