efi_loader: efi_setup_loaded_image() handle missing file name
authorAKASHI Takahiro <takahiro.akashi@linaro.org>
Tue, 16 Apr 2019 15:39:26 +0000 (17:39 +0200)
committerHeinrich Schuchardt <xypron.glpk@gmx.de>
Mon, 22 Apr 2019 22:37:27 +0000 (00:37 +0200)
commitf86076d885b29b71064ef3a1f5b1ada1bd92866c
tree225e0791fb47a7bb2be4d429bae037f8f7833957
parent6c5f8dd540d7a8eff244d4c27a09451ca12c8d20
efi_loader: efi_setup_loaded_image() handle missing file name

This is a preparatory patch.

efi_dp_split_file_path() is used to create device_path and file_path
from file_path for efi_setup_loaded_image().
In a special case, however, of HARDWARE_DEVICE/MEMORY, it doesn't
work expectedly since this path doesn't contain any FILE_PATH sub-type.

This patch makes a workaround.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Adjust the logic such that for all paths that do no end on a media file
path we return NULL as file_path.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
lib/efi_loader/efi_device_path.c