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
This commit is contained in:
Brendan Jackman 2014-05-21 05:59:47 +00:00 committed by sfu5
parent a145e28dec
commit 21def103d5
1 changed files with 8 additions and 1 deletions

View File

@ -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;