]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg: Update tftp to build with current tip
authorJaben Carsey <jaben.carsey@intel.com>
Thu, 24 Sep 2015 19:48:58 +0000 (19:48 +0000)
committerjcarsey <jcarsey@Edk2>
Thu, 24 Sep 2015 19:48:58 +0000 (19:48 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jaben Carsey <jaben.carsey@intel.com>
Signed-off-by: Tapan Shah <tapandshah@hpe.com>
Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18541 6f19259b-4bc3-4df7-8a09-765794883524

ShellPkg/Library/UefiShellTftpCommandLib/Tftp.c
ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.h
ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.uni

index d2f7046de037cdcaacce7a7265f4cbd2ca4e3e0d..e596c227239a6f65d0f00319f980fcabb3d5d387 100644 (file)
@@ -2,6 +2,7 @@
   The implementation for the 'tftp' Shell command.\r
 \r
   Copyright (c) 2015, ARM Ltd. All rights reserved.<BR>\r
   The implementation for the 'tftp' Shell command.\r
 \r
   Copyright (c) 2015, ARM Ltd. All rights reserved.<BR>\r
+  Copyright (c) 2015, Intel Corporation. All rights reserved. <BR>\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
 \r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
@@ -14,6 +15,8 @@
 \r
 #include "UefiShellTftpCommandLib.h"\r
 \r
 \r
 #include "UefiShellTftpCommandLib.h"\r
 \r
+#define EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH 32\r
+\r
 /*\r
    Constant strings and definitions related to the message indicating the amount of\r
    progress in the dowloading of a TFTP file.\r
 /*\r
    Constant strings and definitions related to the message indicating the amount of\r
    progress in the dowloading of a TFTP file.\r
@@ -258,7 +261,7 @@ ShellCommandRunTftp (
   EFI_HANDLE              *Handles;\r
   UINTN                   HandleCount;\r
   UINTN                   NicNumber;\r
   EFI_HANDLE              *Handles;\r
   UINTN                   HandleCount;\r
   UINTN                   NicNumber;\r
-  CHAR16                  NicName[IP4_NIC_NAME_LENGTH];\r
+  CHAR16                  NicName[EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH];\r
   EFI_HANDLE              ControllerHandle;\r
   EFI_HANDLE              Mtftp4ChildHandle;\r
   EFI_MTFTP4_PROTOCOL     *Mtftp4;\r
   EFI_HANDLE              ControllerHandle;\r
   EFI_HANDLE              Mtftp4ChildHandle;\r
   EFI_MTFTP4_PROTOCOL     *Mtftp4;\r
@@ -571,7 +574,7 @@ StringToUint16 (
     return FALSE;\r
   }\r
 \r
     return FALSE;\r
   }\r
 \r
-  *Value = Val;\r
+  *Value = (UINT16)Val;\r
   return TRUE;\r
 }\r
 \r
   return TRUE;\r
 }\r
 \r
@@ -623,7 +626,7 @@ GetNicName (
 \r
   UnicodeSPrint (\r
     NicName,\r
 \r
   UnicodeSPrint (\r
     NicName,\r
-    IP4_NIC_NAME_LENGTH,\r
+    EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH,\r
     SnpMode.IfType == NET_IFTYPE_ETHERNET ?\r
     L"eth%d" :\r
     L"unk%d" ,\r
     SnpMode.IfType == NET_IFTYPE_ETHERNET ?\r
     L"eth%d" :\r
     L"unk%d" ,\r
@@ -944,8 +947,8 @@ CheckPacket (
   CHAR16            Progress[TFTP_PROGRESS_MESSAGE_SIZE];\r
   UINT64            NbOfKb;\r
   UINTN             Index;\r
   CHAR16            Progress[TFTP_PROGRESS_MESSAGE_SIZE];\r
   UINT64            NbOfKb;\r
   UINTN             Index;\r
-  UINT            LastStep;\r
-  UINT            Step;\r
+  UINT64            LastStep;\r
+  UINT64            Step;\r
 \r
   if ((NTOHS (Packet->OpCode)) != EFI_MTFTP4_OPCODE_DATA) {\r
     return EFI_SUCCESS;\r
 \r
   if ((NTOHS (Packet->OpCode)) != EFI_MTFTP4_OPCODE_DATA) {\r
     return EFI_SUCCESS;\r
index a73b86c85b12e0aa1b612f1402fefad18c3ee190..993aa9e5bdf4cef660b80d6e1030113847cb7412 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   header file for NULL named library for 'tftp' Shell command functions.\r
 \r
 /** @file\r
   header file for NULL named library for 'tftp' Shell command functions.\r
 \r
-  Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved. <BR>\r
+  Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. <BR>\r
   Copyright (c) 2015, ARM Ltd. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
   Copyright (c) 2015, ARM Ltd. All rights reserved.<BR>\r
 \r
   This program and the accompanying materials\r
@@ -21,7 +21,6 @@
 #include <ShellBase.h>\r
 \r
 #include <Guid/ShellLibHiiGuid.h>\r
 #include <ShellBase.h>\r
 \r
 #include <Guid/ShellLibHiiGuid.h>\r
-#include <Guid/NicIp4ConfigNvData.h>\r
 \r
 #include <Protocol/ServiceBinding.h>\r
 #include <Protocol/Mtftp4.h>\r
 \r
 #include <Protocol/ServiceBinding.h>\r
 #include <Protocol/Mtftp4.h>\r
index 607a3602d2a3aad30619c0844162e7399c0aba9a..43b8cc5e7cd8726138c600b96b4ebbb1c960824c 100644 (file)
Binary files a/ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.uni and b/ShellPkg/Library/UefiShellTftpCommandLib/UefiShellTftpCommandLib.uni differ