X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FNetwork%2FMtftp4Dxe%2FMtftp4Impl.c;h=03b7f28171a3e5befa9049ec1f9b7c97f141d401;hp=f3a49523601be666d1fac39e043a7f0a7b2f6cee;hb=21def103d55dd7b0fd5562634a21415afbb841e2;hpb=a145e28decc529bf26981ae57c3fc2ffe0b946f2 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.
+Copyright (c) 2006 - 2014, 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 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;