diff options
Diffstat (limited to 'NetworkPkg/TcpDxe/ComponentName.c')
-rw-r--r-- | NetworkPkg/TcpDxe/ComponentName.c | 62 |
1 files changed, 32 insertions, 30 deletions
diff --git a/NetworkPkg/TcpDxe/ComponentName.c b/NetworkPkg/TcpDxe/ComponentName.c index ddc7116e55..7c4575eda5 100644 --- a/NetworkPkg/TcpDxe/ComponentName.c +++ b/NetworkPkg/TcpDxe/ComponentName.c @@ -138,7 +138,7 @@ TcpComponentNameGetControllerName ( ///
/// EFI Component Name Protocol
///
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gTcpComponentName = {
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gTcpComponentName = {
TcpComponentNameGetDriverName,
TcpComponentNameGetControllerName,
"eng"
@@ -147,13 +147,13 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gTcpComponentName ///
/// EFI Component Name 2 Protocol
///
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gTcpComponentName2 = {
- (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) TcpComponentNameGetDriverName,
- (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) TcpComponentNameGetControllerName,
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gTcpComponentName2 = {
+ (EFI_COMPONENT_NAME2_GET_DRIVER_NAME)TcpComponentNameGetDriverName,
+ (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)TcpComponentNameGetControllerName,
"en"
};
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mTcpDriverNameTable[] = {
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mTcpDriverNameTable[] = {
{
"eng;en",
L"TCP Network Service Driver"
@@ -164,7 +164,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mTcpDriverNameTabl }
};
-GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE *gTcpControllerNameTable = NULL;
+GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE *gTcpControllerNameTable = NULL;
/**
Retrieves a Unicode string that is the user-readable name of the driver.
@@ -216,7 +216,7 @@ TcpComponentNameGetDriverName ( This->SupportedLanguages,
mTcpDriverNameTable,
DriverName,
- (BOOLEAN) (This == &gTcpComponentName)
+ (BOOLEAN)(This == &gTcpComponentName)
);
}
@@ -232,12 +232,12 @@ TcpComponentNameGetDriverName ( **/
EFI_STATUS
UpdateTcp4Name (
- IN EFI_TCP4_PROTOCOL *Tcp4
+ IN EFI_TCP4_PROTOCOL *Tcp4
)
{
- EFI_STATUS Status;
- CHAR16 HandleName[80];
- EFI_TCP4_CONFIG_DATA Tcp4ConfigData;
+ EFI_STATUS Status;
+ CHAR16 HandleName[80];
+ EFI_TCP4_CONFIG_DATA Tcp4ConfigData;
if (Tcp4 == NULL) {
return EFI_INVALID_PARAMETER;
@@ -250,7 +250,9 @@ UpdateTcp4Name ( ZeroMem (&Tcp4ConfigData, sizeof (Tcp4ConfigData));
Status = Tcp4->GetModeData (Tcp4, NULL, &Tcp4ConfigData, NULL, NULL, NULL);
if (!EFI_ERROR (Status)) {
- UnicodeSPrint (HandleName, sizeof (HandleName),
+ UnicodeSPrint (
+ HandleName,
+ sizeof (HandleName),
L"TCPv4 (SrcPort=%d, DestPort=%d, ActiveFlag=%s)",
Tcp4ConfigData.AccessPoint.StationPort,
Tcp4ConfigData.AccessPoint.RemotePort,
@@ -303,12 +305,12 @@ UpdateTcp4Name ( **/
EFI_STATUS
UpdateTcp6Name (
- IN EFI_TCP6_PROTOCOL *Tcp6
+ IN EFI_TCP6_PROTOCOL *Tcp6
)
{
- EFI_STATUS Status;
- CHAR16 HandleName[80];
- EFI_TCP6_CONFIG_DATA Tcp6ConfigData;
+ EFI_STATUS Status;
+ CHAR16 HandleName[80];
+ EFI_TCP6_CONFIG_DATA Tcp6ConfigData;
if (Tcp6 == NULL) {
return EFI_INVALID_PARAMETER;
@@ -320,7 +322,9 @@ UpdateTcp6Name ( ZeroMem (&Tcp6ConfigData, sizeof (Tcp6ConfigData));
Status = Tcp6->GetModeData (Tcp6, NULL, &Tcp6ConfigData, NULL, NULL, NULL);
if (!EFI_ERROR (Status)) {
- UnicodeSPrint (HandleName, sizeof (HandleName),
+ UnicodeSPrint (
+ HandleName,
+ sizeof (HandleName),
L"TCPv6(SrcPort=%d, DestPort=%d, ActiveFlag=%d)",
Tcp6ConfigData.AccessPoint.StationPort,
Tcp6ConfigData.AccessPoint.RemotePort,
@@ -332,7 +336,6 @@ UpdateTcp6Name ( return Status;
}
-
if (gTcpControllerNameTable != NULL) {
FreeUnicodeStringTable (gTcpControllerNameTable);
gTcpControllerNameTable = NULL;
@@ -434,9 +437,9 @@ TcpComponentNameGetControllerName ( OUT CHAR16 **ControllerName
)
{
- EFI_STATUS Status;
- EFI_TCP4_PROTOCOL *Tcp4;
- EFI_TCP6_PROTOCOL *Tcp6;
+ EFI_STATUS Status;
+ EFI_TCP4_PROTOCOL *Tcp4;
+ EFI_TCP6_PROTOCOL *Tcp6;
//
// Only provide names for child handles.
@@ -460,7 +463,7 @@ TcpComponentNameGetControllerName ( Status = gBS->OpenProtocol (
ChildHandle,
&gEfiTcp6ProtocolGuid,
- (VOID **)&Tcp6,
+ (VOID **)&Tcp6,
NULL,
NULL,
EFI_OPEN_PROTOCOL_GET_PROTOCOL
@@ -491,13 +494,13 @@ TcpComponentNameGetControllerName ( // Retrieve an instance of a produced protocol from ChildHandle
//
Status = gBS->OpenProtocol (
- ChildHandle,
- &gEfiTcp4ProtocolGuid,
- (VOID **)&Tcp4,
- NULL,
- NULL,
- EFI_OPEN_PROTOCOL_GET_PROTOCOL
- );
+ ChildHandle,
+ &gEfiTcp4ProtocolGuid,
+ (VOID **)&Tcp4,
+ NULL,
+ NULL,
+ EFI_OPEN_PROTOCOL_GET_PROTOCOL
+ );
if (EFI_ERROR (Status)) {
return Status;
}
@@ -519,4 +522,3 @@ TcpComponentNameGetControllerName ( (BOOLEAN)(This == &gTcpComponentName)
);
}
-
|