efi_loader: efi_dp_find_obj() add protocol check

Let function efi_dp_find_obj() additionally check if a given protocol is
installed on the handle relating to the device-path.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
This commit is contained in:
Heinrich Schuchardt 2022-03-19 06:35:43 +01:00
parent c409593d08
commit e46ef1db9e
5 changed files with 20 additions and 10 deletions

View file

@ -302,7 +302,7 @@ efi_fs_from_path(struct efi_device_path *full_path)
efi_free_pool(file_path);
/* Get the EFI object for the partition */
efiobj = efi_dp_find_obj(device_path, NULL);
efiobj = efi_dp_find_obj(device_path, NULL, NULL);
efi_free_pool(device_path);
if (!efiobj)
return NULL;