mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-16 09:48:16 +00:00
905cb9e172
When calling efi_dp_find_obj(), we usually want to find the *exact* match of an object for a given device path. However, I ran into a nasty corner case where I had the following objects with paths available: Handle 0x9feffa70 /HardwareVendor(e61d73b9-a384-4acc-aeab-82e828f3628b)[0: ]/USB(6,0)/EndEntire Handle 0x9feffb58 /HardwareVendor(e61d73b9-a384-4acc-aeab-82e828f3628b)[0: ]/USB(6,0)/HD(1,800,32000,2de808cb00000000,1,1)/EndEntire and was searching for /HardwareVendor(e61d73b9-a384-4acc-aeab-82e828f3628b)[0: ]/USB(6,0)/HD(1,800,32000,2de808cb00000000,1,1)/EndEntire But because our device path search looked for any substring match, it would return /HardwareVendor(e61d73b9-a384-4acc-aeab-82e828f3628b)[0: ]/USB(6,0)/EndEntire because that path is a full substring of the path we were searching for. So this patch adapts the device path search logic to always look for exact matches first. The way we distinguish between those cases is by looking at whether our caller actually deals with remainders. As a side effect, the code as is from all I can tell now never does a substring match anymore, because it always gets called with rem=NULL, so we always only do exact matches now. Reported-by: Jonathan Gray <jsg@jsg.id.au> Signed-off-by: Alexander Graf <agraf@suse.de> |
||
---|---|---|
.. | ||
.gitignore | ||
efi_bootmgr.c | ||
efi_boottime.c | ||
efi_console.c | ||
efi_device_path.c | ||
efi_device_path_to_text.c | ||
efi_disk.c | ||
efi_file.c | ||
efi_gop.c | ||
efi_image_loader.c | ||
efi_memory.c | ||
efi_net.c | ||
efi_runtime.c | ||
efi_smbios.c | ||
efi_variable.c | ||
efi_watchdog.c | ||
helloworld.c | ||
Kconfig | ||
Makefile |