Commit 20562893 authored by Heinrich Schuchardt's avatar Heinrich Schuchardt 💬

efi_loader: correct device path check

Since commit 226cddbe ("efi_loader: check device path in
InstallMultipleProtocolInterfaces") iPXE fails to access the network.

LocateDevicePath() returns EFI_SUCCESS even if a shorter path is found as a
partial match. It returns the remaining path. So to be sure that we found a
complete match we need to check that the remaining path refers to an end

Provide debug output if a device path has already been installed.

Fixes: 226cddbe ("efi_loader: check device path in
Signed-off-by: Heinrich Schuchardt's avatarHeinrich Schuchardt <>
parent bb2b13d5
......@@ -2360,7 +2360,10 @@ efi_status_t EFIAPI efi_install_multiple_protocol_interfaces
r = EFI_CALL(efi_locate_device_path(protocol, &dp,
if (r == EFI_SUCCESS) {
if (r == EFI_SUCCESS &&
dp->type == DEVICE_PATH_TYPE_END) {
EFI_PRINT("Path %pD already installed\n",
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment