From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-x22c.google.com (mail-wm0-x22c.google.com [IPv6:2a00:1450:400c:c09::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 8F1E31A1E3A for ; Mon, 24 Oct 2016 10:42:07 -0700 (PDT) Received: by mail-wm0-x22c.google.com with SMTP id c78so116618147wme.0 for ; Mon, 24 Oct 2016 10:42:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=nFJMsqX8HF2Uz9afFPlbt4ifU5fQ+4A/rPuUY2OZQFQ=; b=TTylmsaYBttluduQk7+DBwc39n9Q6UEStj02DEey1HFxx8uMey6e5ty/bMmmBFMyht R74h6bdvaesYJIoBVm9zMKLJSJrUQNncjFoTiQA7ksCZ63XO8wk9ITbvn++EaCZOelFB SOyz3ws5xS5I/GTAHlIr7hrsdsRVz/7E2KGow= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=nFJMsqX8HF2Uz9afFPlbt4ifU5fQ+4A/rPuUY2OZQFQ=; b=Gy5XuyspxB/POCimMp+giCCA/DTPxWNMqP9mCPGhad2ikMpp99hzCOaZD0Yggwr0oA lEKA5H3dJAc2Gz/CYeaFeDjW0jIIjs3EZlT7V/MW/g8e04pwtE+0Ab9U+TNadPjXcbl0 Iq5Vu5OaWE/NfXy1DT3IOt1n4X5RJSsV+p+QKFw2iP6t95PxF6Xxvms7hugK0tFMkidS Z2B1RsRnRUUBnLM4Q33D3L4rHcgpjj+hEaHz6maIKSl9alZiqdtLU+mMM9irVk4FG/8m 0XaFWib+55gngL0T6vuVRzMS7yQUA+tLsebegbAzoTs0LqRzeZ1NCs6CqXuus/9/CgF/ xa1w== X-Gm-Message-State: ABUngvdkfmn7Ptp6oRZNaHJcB+jd8Gf8+k6NS3i6pckxqdaBG7WxocaSZAeUWgrlsCFQAOzg X-Received: by 10.194.113.234 with SMTP id jb10mr12343682wjb.19.1477330925860; Mon, 24 Oct 2016 10:42:05 -0700 (PDT) Received: from localhost.localdomain ([105.146.229.54]) by smtp.gmail.com with ESMTPSA id 194sm15894873wmj.20.2016.10.24.10.42.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 24 Oct 2016 10:42:05 -0700 (PDT) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, lersek@redhat.com Cc: Ard Biesheuvel Date: Mon, 24 Oct 2016 18:41:39 +0100 Message-Id: <1477330907-13733-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1477330907-13733-1-git-send-email-ard.biesheuvel@linaro.org> References: <1477330907-13733-1-git-send-email-ard.biesheuvel@linaro.org> Subject: [PATCH 1/9] EmbeddedPkg/AndroidFastbootTransportTcpDxe: remove broken hostname handling X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Oct 2016 17:42:08 -0000 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 --- EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c | 23 -------------------- EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcpDxe.inf | 3 --- 2 files changed, 26 deletions(-) diff --git a/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c b/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c index 8ec78aeb534e..7c008ac9722e 100644 --- a/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c +++ b/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcp.c @@ -27,8 +27,6 @@ #include #include -#include - #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""; 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 4d777934e5a4..89ff556b40ca 100644 --- a/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcpDxe.inf +++ b/EmbeddedPkg/Drivers/AndroidFastbootTransportTcpDxe/FastbootTransportTcpDxe.inf @@ -47,8 +47,5 @@ [Packages] MdeModulePkg/MdeModulePkg.dec EmbeddedPkg/EmbeddedPkg.dec -[Guids] - gEfiHostnameVariableGuid - [FixedPcd] gEmbeddedTokenSpaceGuid.PcdAndroidFastbootTcpPort -- 2.7.4