X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=NetworkPkg%2FMtftp6Dxe%2FComponentName.c;fp=NetworkPkg%2FMtftp6Dxe%2FComponentName.c;h=48e85e6ff7c1398c72ee9307c4f8bc27aa28d5c1;hp=296be48ec630e0781e27724b448f52ba9c4ff12b;hb=d1050b9dff1cace252aff86630bfdb59dff5f507;hpb=2f88bd3a1296c522317f1c21377876de63de5be7 diff --git a/NetworkPkg/Mtftp6Dxe/ComponentName.c b/NetworkPkg/Mtftp6Dxe/ComponentName.c index 296be48ec6..48e85e6ff7 100644 --- a/NetworkPkg/Mtftp6Dxe/ComponentName.c +++ b/NetworkPkg/Mtftp6Dxe/ComponentName.c @@ -9,7 +9,6 @@ #include "Mtftp6Impl.h" - /** Retrieves a Unicode string that is the user-readable name of the driver. @@ -128,17 +127,17 @@ Mtftp6ComponentNameGetDriverName ( EFI_STATUS EFIAPI Mtftp6ComponentNameGetControllerName ( - 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 // -GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gMtftp6ComponentName = { +GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gMtftp6ComponentName = { Mtftp6ComponentNameGetDriverName, Mtftp6ComponentNameGetControllerName, "eng" @@ -147,13 +146,13 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gMtftp6ComponentNa // // EFI Component Name 2 Protocol // -GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gMtftp6ComponentName2 = { - (EFI_COMPONENT_NAME2_GET_DRIVER_NAME) Mtftp6ComponentNameGetDriverName, - (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) Mtftp6ComponentNameGetControllerName, +GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gMtftp6ComponentName2 = { + (EFI_COMPONENT_NAME2_GET_DRIVER_NAME)Mtftp6ComponentNameGetDriverName, + (EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)Mtftp6ComponentNameGetControllerName, "en" }; -GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mMtftp6DriverNameTable[] = { +GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mMtftp6DriverNameTable[] = { { "eng;en", L"MTFTP6 Network Service Driver" @@ -164,7 +163,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mMtftp6DriverNameT } }; -GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE *gMtftp6ControllerNameTable = NULL; +GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE *gMtftp6ControllerNameTable = NULL; /** Retrieves a Unicode string that is the user-readable name of the driver. @@ -214,12 +213,12 @@ Mtftp6ComponentNameGetDriverName ( ) { return LookupUnicodeString2 ( - Language, - This->SupportedLanguages, - mMtftp6DriverNameTable, - DriverName, - (BOOLEAN)(This == &gMtftp6ComponentName) - ); + Language, + This->SupportedLanguages, + mMtftp6DriverNameTable, + DriverName, + (BOOLEAN)(This == &gMtftp6ComponentName) + ); } /** @@ -234,13 +233,13 @@ Mtftp6ComponentNameGetDriverName ( **/ EFI_STATUS UpdateName ( - IN EFI_MTFTP6_PROTOCOL *Mtftp6 + IN EFI_MTFTP6_PROTOCOL *Mtftp6 ) { - EFI_STATUS Status; - CHAR16 HandleName[128]; - EFI_MTFTP6_MODE_DATA Mtftp6ModeData; - CHAR16 Address[sizeof"ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"]; + EFI_STATUS Status; + CHAR16 HandleName[128]; + EFI_MTFTP6_MODE_DATA Mtftp6ModeData; + CHAR16 Address[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"]; if (Mtftp6 == NULL) { return EFI_INVALID_PARAMETER; @@ -251,11 +250,14 @@ UpdateName ( // Status = Mtftp6->GetModeData (Mtftp6, &Mtftp6ModeData); if (!EFI_ERROR (Status)) { - Status = NetLibIp6ToStr (&Mtftp6ModeData.ConfigData.ServerIp, Address, sizeof(Address)); + Status = NetLibIp6ToStr (&Mtftp6ModeData.ConfigData.ServerIp, Address, sizeof (Address)); if (EFI_ERROR (Status)) { return Status; } - UnicodeSPrint (HandleName, sizeof (HandleName), + + UnicodeSPrint ( + HandleName, + sizeof (HandleName), L"MTFTPv6(ServerIp=%s, InitialServerPort=%d)", Address, Mtftp6ModeData.ConfigData.InitialServerPort @@ -289,7 +291,6 @@ UpdateName ( ); } - /** Retrieves a Unicode string that is the user-readable name of the controller that is being managed by a driver. @@ -361,15 +362,15 @@ UpdateName ( EFI_STATUS EFIAPI Mtftp6ComponentNameGetControllerName ( - 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_MTFTP6_PROTOCOL *Mtftp6; + EFI_STATUS Status; + EFI_MTFTP6_PROTOCOL *Mtftp6; // // Only provide names for child handles. @@ -421,4 +422,3 @@ Mtftp6ComponentNameGetControllerName ( (BOOLEAN)(This == &gMtftp6ComponentName) ); } -