diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-10-24 17:39:10 +0100 |
---|---|---|
committer | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2016-10-28 13:51:22 +0100 |
commit | 0fe2196f8b8ccf04a4b4b50d739aaa7332ea8b06 (patch) | |
tree | 7aa491334fc9961891abee8427e2682753129ba6 /EmbeddedPkg | |
parent | 5e6676302b6f740dbc3336fa199c05f51a62ee09 (diff) | |
download | edk2-0fe2196f8b8ccf04a4b4b50d739aaa7332ea8b06.zip edk2-0fe2196f8b8ccf04a4b4b50d739aaa7332ea8b06.tar.gz edk2-0fe2196f8b8ccf04a4b4b50d739aaa7332ea8b06.tar.bz2 |
EmbeddedPkg/AndroidFastbootTransportTcpDxe: remove broken hostname handling
The fastboot TCP connection setup routine retrieves a hostname from a
UEFI variable 'hostname' that is scoped under a GUID gEfiHostnameVariableGuid
whose definition is missing from the code. Since the hostname is only printed
and then discarded, let's just drop the whole thing.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
Diffstat (limited to 'EmbeddedPkg')
-rw-r--r-- | EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c | 23 | ||||
-rw-r--r-- | EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcpDxe.inf | 3 |
2 files changed, 0 insertions, 26 deletions
diff --git a/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c b/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c index 8ec78ae..7c008ac 100644 --- a/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c +++ b/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c @@ -27,8 +27,6 @@ #include <Library/UefiDriverEntryPoint.h>
#include <Library/UefiRuntimeServicesTableLib.h>
-#include <Guid/Hostname.h>
-
#define IP4_ADDR_TO_STRING(IpAddr, IpAddrString) UnicodeSPrint ( \
IpAddrString, \
16 * 2, \
@@ -307,9 +305,6 @@ TcpFastbootTransportStart ( EFI_HANDLE *HandleBuffer;
EFI_IP4_MODE_DATA Ip4ModeData;
UINTN NumHandles;
- UINTN HostnameSize = 256;
- CHAR8 Hostname[256];
- CHAR16 HostnameUnicode[256] = L"<no hostname>";
CHAR16 IpAddrString[16];
UINTN Index;
@@ -442,28 +437,10 @@ TcpFastbootTransportStart ( //
IP4_ADDR_TO_STRING (Ip4ModeData.ConfigData.StationAddress, IpAddrString);
- // Look up hostname
- Status = gRT->GetVariable (
- L"Hostname",
- &gEfiHostnameVariableGuid,
- NULL,
- &HostnameSize,
- &Hostname
- );
- if (!EFI_ERROR (Status) && HostnameSize != 0) {
- AsciiStrToUnicodeStr (Hostname, HostnameUnicode);
- }
-
- // Hostname variable is not null-terminated.
- Hostname[HostnameSize] = L'\0';
-
mTextOut->OutputString (mTextOut, L"TCP Fastboot transport configured.");
mTextOut->OutputString (mTextOut, L"\r\nIP address: ");
mTextOut->OutputString (mTextOut ,IpAddrString);
mTextOut->OutputString (mTextOut, L"\r\n");
- mTextOut->OutputString (mTextOut, L"\r\nhostname: ");
- mTextOut->OutputString (mTextOut, HostnameUnicode);
- mTextOut->OutputString (mTextOut, L"\r\n");
//
// Start listening for a connection
diff --git a/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcpDxe.inf b/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcpDxe.inf index 4d77793..89ff556 100644 --- a/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcpDxe.inf +++ b/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcpDxe.inf @@ -47,8 +47,5 @@ MdeModulePkg/MdeModulePkg.dec
EmbeddedPkg/EmbeddedPkg.dec
-[Guids]
- gEfiHostnameVariableGuid
-
[FixedPcd]
gEmbeddedTokenSpaceGuid.PcdAndroidFastbootTcpPort
|