summaryrefslogtreecommitdiff
path: root/NetworkPkg/Udp4Dxe/ComponentName.c
diff options
context:
space:
mode:
Diffstat (limited to 'NetworkPkg/Udp4Dxe/ComponentName.c')
-rw-r--r--NetworkPkg/Udp4Dxe/ComponentName.c52
1 files changed, 25 insertions, 27 deletions
diff --git a/NetworkPkg/Udp4Dxe/ComponentName.c b/NetworkPkg/Udp4Dxe/ComponentName.c
index 41bd834..29e66e7 100644
--- a/NetworkPkg/Udp4Dxe/ComponentName.c
+++ b/NetworkPkg/Udp4Dxe/ComponentName.c
@@ -5,12 +5,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
**/
-
#include "Udp4Impl.h"
//
// EFI Component Name Functions
//
+
/**
Retrieves a Unicode string that is the user readable name of the driver.
@@ -58,7 +58,6 @@ UdpComponentNameGetDriverName (
OUT CHAR16 **DriverName
);
-
/**
Retrieves a Unicode string that is the user readable name of the controller
that is being managed by a driver.
@@ -130,14 +129,13 @@ UdpComponentNameGetDriverName (
EFI_STATUS
EFIAPI
UdpComponentNameGetControllerName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE ChildHandle OPTIONAL,
- IN CHAR8 *Language,
- OUT CHAR16 **ControllerName
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN CHAR8 *Language,
+ OUT CHAR16 **ControllerName
);
-
//
// EFI Component Name Protocol
//
@@ -150,14 +148,13 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gUdp4ComponentName =
//
// EFI Component Name 2 Protocol
//
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gUdp4ComponentName2 = {
- (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) UdpComponentNameGetDriverName,
- (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) UdpComponentNameGetControllerName,
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gUdp4ComponentName2 = {
+ (EFI_COMPONENT_NAME2_GET_DRIVER_NAME)UdpComponentNameGetDriverName,
+ (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)UdpComponentNameGetControllerName,
"en"
};
-
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUdpDriverNameTable[] = {
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUdpDriverNameTable[] = {
{
"eng;en",
L"UDP Network Service Driver"
@@ -168,7 +165,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUdpDriverNameTable[] = {
}
};
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE *gUdpControllerNameTable = NULL;
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE *gUdpControllerNameTable = NULL;
/**
Retrieves a Unicode string that is the user readable name of the driver.
@@ -238,12 +235,12 @@ UdpComponentNameGetDriverName (
**/
EFI_STATUS
UpdateName (
- EFI_UDP4_PROTOCOL *Udp4
+ EFI_UDP4_PROTOCOL *Udp4
)
{
- EFI_STATUS Status;
- CHAR16 HandleName[64];
- EFI_UDP4_CONFIG_DATA Udp4ConfigData;
+ EFI_STATUS Status;
+ CHAR16 HandleName[64];
+ EFI_UDP4_CONFIG_DATA Udp4ConfigData;
if (Udp4 == NULL) {
return EFI_INVALID_PARAMETER;
@@ -255,7 +252,9 @@ UpdateName (
//
Status = Udp4->GetModeData (Udp4, &Udp4ConfigData, NULL, NULL, NULL);
if (!EFI_ERROR (Status)) {
- UnicodeSPrint (HandleName, sizeof (HandleName),
+ UnicodeSPrint (
+ HandleName,
+ sizeof (HandleName),
L"UDPv4 (SrcPort=%d, DestPort=%d)",
Udp4ConfigData.StationPort,
Udp4ConfigData.RemotePort
@@ -366,15 +365,15 @@ UpdateName (
EFI_STATUS
EFIAPI
UdpComponentNameGetControllerName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE ChildHandle OPTIONAL,
- IN CHAR8 *Language,
- OUT CHAR16 **ControllerName
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN CHAR8 *Language,
+ OUT CHAR16 **ControllerName
)
{
- EFI_STATUS Status;
- EFI_UDP4_PROTOCOL *Udp4;
+ EFI_STATUS Status;
+ EFI_UDP4_PROTOCOL *Udp4;
//
// Only provide names for child handles.
@@ -426,4 +425,3 @@ UdpComponentNameGetControllerName (
(BOOLEAN)(This == &gUdp4ComponentName)
);
}
-