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

@ -1750,7 +1750,7 @@ efi_status_t efi_setup_loaded_image(struct efi_device_path *device_path,
info->system_table = &systab;
if (device_path) {
info->device_handle = efi_dp_find_obj(device_path, NULL);
info->device_handle = efi_dp_find_obj(device_path, NULL, NULL);
dp = efi_dp_append(device_path, file_path);
if (!dp) {