/** @file\r
Implementation of EFI_COMPONENT_NAME_PROTOCOL and EFI_COMPONENT_NAME2_PROTOCOL protocol.\r
\r
-Copyright (c) 2016, Intel Corporation. All rights reserved.<BR>\r
-This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
///\r
/// Component Name Protocol instance\r
///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
EFI_COMPONENT_NAME_PROTOCOL gDnsComponentName = {\r
DnsComponentNameGetDriverName,\r
DnsComponentNameGetControllerName,\r
///\r
/// Component Name 2 Protocol instance\r
///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
EFI_COMPONENT_NAME2_PROTOCOL gDnsComponentName2 = {\r
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) DnsComponentNameGetDriverName,\r
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) DnsComponentNameGetControllerName,\r
///\r
/// Table of driver names\r
///\r
-GLOBAL_REMOVE_IF_UNREFERENCED \r
+GLOBAL_REMOVE_IF_UNREFERENCED\r
EFI_UNICODE_STRING_TABLE mDnsDriverNameTable[] = {\r
{ "eng;en", (CHAR16 *)L"DNS Network Service Driver" },\r
{ NULL, NULL }\r
\r
@param Dns4 A pointer to the EFI_DNS4_PROTOCOL.\r
\r
- \r
+\r
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.\r
@retval EFI_INVALID_PARAMETER The input parameter is invalid.\r
- \r
+\r
**/\r
EFI_STATUS\r
UpdateDns4Name (\r
if (Dns4 == NULL) {\r
return EFI_INVALID_PARAMETER;\r
}\r
- \r
+\r
//\r
// Format the child name into the string buffer as:\r
// DNSv4 (StationIp=?, LocalPort=?)\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
- \r
+\r
UnicodeSPrint (\r
HandleName,\r
sizeof (HandleName),\r
FreeUnicodeStringTable (gDnsControllerNameTable);\r
gDnsControllerNameTable = NULL;\r
}\r
- \r
+\r
Status = AddUnicodeString2 (\r
"eng",\r
gDnsComponentName.SupportedLanguages,\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
- \r
+\r
return AddUnicodeString2 (\r
"en",\r
gDnsComponentName2.SupportedLanguages,\r
\r
@param Dns6 A pointer to the EFI_DNS6_PROTOCOL.\r
\r
- \r
+\r
@retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully.\r
@retval EFI_INVALID_PARAMETER The input parameter is invalid.\r
- \r
+\r
**/\r
EFI_STATUS\r
UpdateDns6Name (\r
if (Dns6 == NULL) {\r
return EFI_INVALID_PARAMETER;\r
}\r
- \r
+\r
//\r
// Format the child name into the string buffer as:\r
// DNSv6 (StationIp=?, LocalPort=?)\r
}\r
UnicodeSPrint (\r
HandleName,\r
- sizeof (HandleName), \r
+ sizeof (HandleName),\r
L"DNSv6 (StationIp=%s, LocalPort=%d)",\r
Address,\r
ModeData.DnsConfigData.LocalPort\r
FreeUnicodeStringTable (gDnsControllerNameTable);\r
gDnsControllerNameTable = NULL;\r
}\r
- \r
+\r
Status = AddUnicodeString2 (\r
"eng",\r
gDnsComponentName.SupportedLanguages,\r
if (EFI_ERROR (Status)) {\r
return Status;\r
}\r
- \r
+\r
return AddUnicodeString2 (\r
"en",\r
gDnsComponentName2.SupportedLanguages,\r
EFI_STATUS Status;\r
EFI_DNS4_PROTOCOL *Dns4;\r
EFI_DNS6_PROTOCOL *Dns6;\r
- \r
+\r
//\r
// ChildHandle must be NULL for a Device Driver\r
//\r