From 0994fe6f81c638f9bba117d1c23bafd0efefd4f9 Mon Sep 17 00:00:00 2001 From: Jaben Carsey Date: Thu, 24 Sep 2015 19:48:58 +0000 Subject: [PATCH] ShellPkg: Update tftp to build with current tip Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jaben Carsey Signed-off-by: Tapan Shah Signed-off-by: Jiaxin Wu Reviewed-by: Qiu Shumin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18541 6f19259b-4bc3-4df7-8a09-765794883524 --- .../Library/UefiShellTftpCommandLib/Tftp.c | 13 ++++++++----- .../UefiShellTftpCommandLib.h | 3 +-- .../UefiShellTftpCommandLib.uni | Bin 8748 -> 8856 bytes 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c b/ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c index d2f7046de0..e596c22723 100644 --- a/ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c +++ b/ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c @@ -2,6 +2,7 @@ The implementation for the 'tftp' Shell command. Copyright (c) 2015, ARM Ltd. All rights reserved.
+ Copyright (c) 2015, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -14,6 +15,8 @@ #include "UefiShellTftpCommandLib.h" +#define EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH 32 + /* Constant strings and definitions related to the message indicating the amount of progress in the dowloading of a TFTP file. @@ -258,7 +261,7 @@ ShellCommandRunTftp ( EFI_HANDLE *Handles; UINTN HandleCount; UINTN NicNumber; - CHAR16 NicName[IP4_NIC_NAME_LENGTH]; + CHAR16 NicName[EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH]; EFI_HANDLE ControllerHandle; EFI_HANDLE Mtftp4ChildHandle; EFI_MTFTP4_PROTOCOL *Mtftp4; @@ -571,7 +574,7 @@ StringToUint16 ( return FALSE; } - *Value = Val; + *Value = (UINT16)Val; return TRUE; } @@ -623,7 +626,7 @@ GetNicName ( UnicodeSPrint ( NicName, - IP4_NIC_NAME_LENGTH, + EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH, SnpMode.IfType == NET_IFTYPE_ETHERNET ? L"eth%d" : L"unk%d" , @@ -944,8 +947,8 @@ CheckPacket ( CHAR16 Progress[TFTP_PROGRESS_MESSAGE_SIZE]; UINT64 NbOfKb; UINTN Index; - UINTN LastStep; - UINTN Step; + UINT64 LastStep; + UINT64 Step; if ((NTOHS (Packet->OpCode)) != EFI_MTFTP4_OPCODE_DATA) { return EFI_SUCCESS; diff --git a/ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.h b/ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.h index a73b86c85b..993aa9e5bd 100644 --- a/ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.h +++ b/ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.h @@ -1,7 +1,7 @@ /** @file header file for NULL named library for 'tftp' Shell command functions. - Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
Copyright (c) 2015, ARM Ltd. All rights reserved.
This program and the accompanying materials @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.uni b/ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.uni index 607a3602d2a3aad30619c0844162e7399c0aba9a..43b8cc5e7cd8726138c600b96b4ebbb1c960824c 100644 GIT binary patch delta 329 zcmZ4EGQ)L(lesB_0)q!bDnmI#4v;JXLIs8ZhD3&BhHM~N#E=5yyE5bf#Z!U20wB(0 zC}v2Vm@Ccf!w|4>p)ZSQ2tyiBx`4r%A)g@^2or(IQzrAWc8Z5ExG{tPjZ**`ha|W8 zAZxWSw;zK)P|}qln89kYqKGi30)rug9#Cn>$vQd-iPA)g_ap#Uh5$56?j!=S+6 z!=MLLrnhmrFN?e%Ln=cFLpe}Q5m1v614MN$Sak|R@#LQ@o!Uk~^#(wFc_?ZX7z}}8 z$zapr>Nn41trlihUnQCxI#jcgmg0z(Q=9mr}0h9rhcuzDT2l*u#X lx+XVpiA+8uDl|Djz5>MNEC#9p`8yS)YLY_U<~9W(CII6DN&o-= -- 2.39.2