diff --git a/NetworkPkg/HttpBootDxe/HttpBootClient.c b/NetworkPkg/HttpBootDxe/HttpBootClient.c index b93e63bb2f..1d1e47008d 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootClient.c +++ b/NetworkPkg/HttpBootDxe/HttpBootClient.c @@ -474,6 +474,7 @@ HttpBootDhcp6ExtractUriInfo ( Status = HttpBootDns (Private, HostNameStr, &IpAddr); FreePool (HostNameStr); if (EFI_ERROR (Status)) { + AsciiPrint ("\n Error: Could not retrieve the host address from DNS server.\n"); goto Error; } } diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.c b/NetworkPkg/HttpBootDxe/HttpBootImpl.c index 16c1207bf8..a0fd934ec4 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootImpl.c +++ b/NetworkPkg/HttpBootDxe/HttpBootImpl.c @@ -1,7 +1,7 @@ /** @file The implementation of EFI_LOAD_FILE_PROTOCOL for UEFI HTTP boot. -Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. @@ -331,7 +331,7 @@ HttpBootLoadFile ( // Status = HttpBootDiscoverBootInfo (Private); if (EFI_ERROR (Status)) { - AsciiPrint ("\n Error: Could not discover the boot information for DHCP server.\n"); + AsciiPrint ("\n Error: Could not retrieve NBP file size from HTTP server.\n"); goto ON_EXIT; } } @@ -400,22 +400,25 @@ HttpBootLoadFile ( ON_EXIT: HttpBootUninstallCallback (Private); - - if (Status == EFI_ACCESS_DENIED) { - AsciiPrint ("\n Error: Could not establish connection with HTTP server.\n"); - } else if (Status == EFI_BUFFER_TOO_SMALL && Buffer != NULL) { - AsciiPrint ("\n Error: Buffer size is smaller than the requested file.\n"); - } else if (Status == EFI_OUT_OF_RESOURCES) { - AsciiPrint ("\n Error: Could not allocate I/O buffers.\n"); - } else if (Status == EFI_DEVICE_ERROR) { - AsciiPrint ("\n Error: Network device error.\n"); - } else if (Status == EFI_TIMEOUT) { - AsciiPrint ("\n Error: Server response timeout.\n"); - } else if (Status == EFI_ABORTED) { - AsciiPrint ("\n Error: Remote boot cancelled.\n"); - } else if (Status != EFI_BUFFER_TOO_SMALL) { - AsciiPrint ("\n Error: Unexpected network error.\n"); + + if (EFI_ERROR (Status)) { + if (Status == EFI_ACCESS_DENIED) { + AsciiPrint ("\n Error: Could not establish connection with HTTP server.\n"); + } else if (Status == EFI_BUFFER_TOO_SMALL && Buffer != NULL) { + AsciiPrint ("\n Error: Buffer size is smaller than the requested file.\n"); + } else if (Status == EFI_OUT_OF_RESOURCES) { + AsciiPrint ("\n Error: Could not allocate I/O buffers.\n"); + } else if (Status == EFI_DEVICE_ERROR) { + AsciiPrint ("\n Error: Network device error.\n"); + } else if (Status == EFI_TIMEOUT) { + AsciiPrint ("\n Error: Server response timeout.\n"); + } else if (Status == EFI_ABORTED) { + AsciiPrint ("\n Error: Remote boot cancelled.\n"); + } else if (Status != EFI_BUFFER_TOO_SMALL) { + AsciiPrint ("\n Error: Unexpected network error.\n"); + } } + return Status; }