v2: * Simplify the code logic. 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 <[email protected]> Cc: Ye Ting <[email protected]> Cc: Wu Jiaxin <[email protected]> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Zhang Lubo <[email protected]> --- NetworkPkg/HttpBootDxe/HttpBootImpl.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/NetworkPkg/HttpBootDxe/HttpBootImpl.c b/NetworkPkg/HttpBootDxe/HttpBootImpl.c index 3adb08d..451b24d 100644 --- a/NetworkPkg/HttpBootDxe/HttpBootImpl.c +++ b/NetworkPkg/HttpBootDxe/HttpBootImpl.c @@ -428,12 +428,11 @@ HttpBootDxeLoadFile ( // // Restart the HTTP boot driver in 2 cases: // 1. Http boot Driver has already been started but not on the required IP version. // 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); } } -- 1.9.5.msysgit.1 _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

