ShellPkg: Update tftp to build with current tip
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
This commit is contained in:
@ -2,6 +2,7 @@
|
|||||||
The implementation for the 'tftp' Shell command.
|
The implementation for the 'tftp' Shell command.
|
||||||
|
|
||||||
Copyright (c) 2015, ARM Ltd. All rights reserved.<BR>
|
Copyright (c) 2015, ARM Ltd. All rights reserved.<BR>
|
||||||
|
Copyright (c) 2015, Intel Corporation. All rights reserved. <BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
are licensed and made available under the terms and conditions of the BSD License
|
are licensed and made available under the terms and conditions of the BSD License
|
||||||
@ -14,6 +15,8 @@
|
|||||||
|
|
||||||
#include "UefiShellTftpCommandLib.h"
|
#include "UefiShellTftpCommandLib.h"
|
||||||
|
|
||||||
|
#define EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH 32
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Constant strings and definitions related to the message indicating the amount of
|
Constant strings and definitions related to the message indicating the amount of
|
||||||
progress in the dowloading of a TFTP file.
|
progress in the dowloading of a TFTP file.
|
||||||
@ -258,7 +261,7 @@ ShellCommandRunTftp (
|
|||||||
EFI_HANDLE *Handles;
|
EFI_HANDLE *Handles;
|
||||||
UINTN HandleCount;
|
UINTN HandleCount;
|
||||||
UINTN NicNumber;
|
UINTN NicNumber;
|
||||||
CHAR16 NicName[IP4_NIC_NAME_LENGTH];
|
CHAR16 NicName[EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH];
|
||||||
EFI_HANDLE ControllerHandle;
|
EFI_HANDLE ControllerHandle;
|
||||||
EFI_HANDLE Mtftp4ChildHandle;
|
EFI_HANDLE Mtftp4ChildHandle;
|
||||||
EFI_MTFTP4_PROTOCOL *Mtftp4;
|
EFI_MTFTP4_PROTOCOL *Mtftp4;
|
||||||
@ -571,7 +574,7 @@ StringToUint16 (
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
*Value = Val;
|
*Value = (UINT16)Val;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -623,7 +626,7 @@ GetNicName (
|
|||||||
|
|
||||||
UnicodeSPrint (
|
UnicodeSPrint (
|
||||||
NicName,
|
NicName,
|
||||||
IP4_NIC_NAME_LENGTH,
|
EFI_IP4_CONFIG2_INTERFACE_INFO_NAME_LENGTH,
|
||||||
SnpMode.IfType == NET_IFTYPE_ETHERNET ?
|
SnpMode.IfType == NET_IFTYPE_ETHERNET ?
|
||||||
L"eth%d" :
|
L"eth%d" :
|
||||||
L"unk%d" ,
|
L"unk%d" ,
|
||||||
@ -944,8 +947,8 @@ CheckPacket (
|
|||||||
CHAR16 Progress[TFTP_PROGRESS_MESSAGE_SIZE];
|
CHAR16 Progress[TFTP_PROGRESS_MESSAGE_SIZE];
|
||||||
UINT64 NbOfKb;
|
UINT64 NbOfKb;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
UINTN LastStep;
|
UINT64 LastStep;
|
||||||
UINTN Step;
|
UINT64 Step;
|
||||||
|
|
||||||
if ((NTOHS (Packet->OpCode)) != EFI_MTFTP4_OPCODE_DATA) {
|
if ((NTOHS (Packet->OpCode)) != EFI_MTFTP4_OPCODE_DATA) {
|
||||||
return EFI_SUCCESS;
|
return EFI_SUCCESS;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/** @file
|
/** @file
|
||||||
header file for NULL named library for 'tftp' Shell command functions.
|
header file for NULL named library for 'tftp' Shell command functions.
|
||||||
|
|
||||||
Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved. <BR>
|
Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved. <BR>
|
||||||
Copyright (c) 2015, ARM Ltd. All rights reserved.<BR>
|
Copyright (c) 2015, ARM Ltd. All rights reserved.<BR>
|
||||||
|
|
||||||
This program and the accompanying materials
|
This program and the accompanying materials
|
||||||
@ -21,7 +21,6 @@
|
|||||||
#include <ShellBase.h>
|
#include <ShellBase.h>
|
||||||
|
|
||||||
#include <Guid/ShellLibHiiGuid.h>
|
#include <Guid/ShellLibHiiGuid.h>
|
||||||
#include <Guid/NicIp4ConfigNvData.h>
|
|
||||||
|
|
||||||
#include <Protocol/ServiceBinding.h>
|
#include <Protocol/ServiceBinding.h>
|
||||||
#include <Protocol/Mtftp4.h>
|
#include <Protocol/Mtftp4.h>
|
||||||
|
Binary file not shown.
Reference in New Issue
Block a user