[RFC PATCH 1/3] efi_loader: Introduce helper functions for EFI

Ilias Apalodimas ilias.apalodimas at linaro.org
Thu Jan 14 11:54:19 CET 2021


[...]
> >> + * @size:	size of the discovered device path
> >> + * @idx:	index of the device path
> >> + *
> >> + * Return:	device path or NULL. Caller must free the returned value
> >> + */
> >> +
> >> +struct
> >> +efi_device_path *efi_dp_instance_by_idx(struct efi_device_path *dp,
> >> +					efi_uintn_t *size, int idx)
> >
> >The type of "idx" should be 'enum load_option_dp_type'.
> 
> There is nothing boot manager specific in this function. You can use it to access any multiple device path.
> 
> An enum or #define can be used on the caller side.
> 
> Should this function be moved to efi_devicepath.c?

Sure it's generic enough to be used for device paths with multiple instances.

Regards
/Ilias

> Best regards
> 
> Heinrich
> 
 
 [...]


More information about the U-Boot mailing list