summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrendan Jackman <Brendan.JackMan@arm.com>2014-05-21 05:59:47 +0000
committersfu5 <sfu5@6f19259b-4bc3-4df7-8a09-765794883524>2014-05-21 05:59:47 +0000
commit21def103d55dd7b0fd5562634a21415afbb841e2 (patch)
tree618aed841ca37b3a40c7ee192a5dd19eb012b9b0
parenta145e28decc529bf26981ae57c3fc2ffe0b946f2 (diff)
downloadedk2-platforms-21def103d55dd7b0fd5562634a21415afbb841e2.tar.xz
Add 'file not found' debug message to MTFTP.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Brendan Jackman <Brendan.JackMan@arm.com> Reviewed-By: Olivier Martin <olivier.martin@arm.com> Reviewed-by: Fu, Siyuan <siyuan.fu@intel.com> Reviewed-by: Wu, Jiaxin <jiaxin.wu@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15543 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
index f3a4952360..03b7f28171 100644
--- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
+++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c
@@ -1,7 +1,7 @@
/** @file
Interface routine for Mtftp4.
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -120,6 +120,7 @@ Mtftp4GetInfoCheckPacket (
MTFTP4_GETINFO_STATE *State;
EFI_STATUS Status;
UINT16 OpCode;
+ EFI_MTFTP4_ERROR_HEADER *ErrorHeader;
State = (MTFTP4_GETINFO_STATE *) Token->Context;
OpCode = NTOHS (Packet->OpCode);
@@ -129,6 +130,12 @@ Mtftp4GetInfoCheckPacket (
//
switch (OpCode) {
case EFI_MTFTP4_OPCODE_ERROR:
+ ErrorHeader = (EFI_MTFTP4_ERROR_HEADER *) Packet;
+ if (ErrorHeader->ErrorCode == EFI_MTFTP4_ERRORCODE_FILE_NOT_FOUND) {
+ DEBUG ((EFI_D_ERROR, "TFTP error code 1 (File Not Found)\n"));
+ } else {
+ DEBUG ((EFI_D_ERROR, "TFTP error code %d\n", ErrorHeader->ErrorCode));
+ }
State->Status = EFI_TFTP_ERROR;
break;