From 651aeac67248c798c8c22dfd04580d8961cf09d0 Mon Sep 17 00:00:00 2001 From: Zhang Lubo Date: Thu, 24 Mar 2016 16:59:22 +0800 Subject: [PATCH] NetworkPkg:Fix Http boot download issue. When http boot download the second time without return out of the boot manager, the DHCP process will start twice with the same Boot file uri and print the information twice which we not expected. This is caused by wrong logic of handling the device path of the boot file when loading it. Cc: Fu Siyuan Cc: Ye Ting Cc: Wu Jiaxin Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo Reviewed-by: Fu Siyuan --- NetworkPkg/HttpBootDxe/HttpBootImpl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.c b/NetworkPkg/HttpBootDxe/HttpBootImpl.c index 3adb08d9f6..c4a3e707fb 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootImpl.c +++ b/NetworkPkg/HttpBootDxe/HttpBootImpl.c @@ -431,7 +431,7 @@ HttpBootDxeLoadFile ( // 2. The required boot FilePath is different with the one we produced in the device path // protocol. // - if ((UsingIpv6 != Private->UsingIpv6) || !IsDevicePathEnd(FilePath)) { + if ((UsingIpv6 != Private->UsingIpv6) || ((Private->FilePathUri != NULL) && (AsciiStrCmp (Private->BootFileUri, Private->FilePathUri) != 0))) { Status = HttpBootStop (Private); if (!EFI_ERROR (Status)) { Status = HttpBootStart (Private, UsingIpv6, FilePath); -- 2.39.2