mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
efi_loader: correcty determine total device path length
Device paths may consist of multiple instances. Up to now we have only considered the size of the first instance. For the services of the EFI_DEVICE_PATH_UTILITIES_PROTOCOL in most cases the total length of the device path is relevant. So let's rename efi_dp_size() to efi_dp_instance_size() and create a new function efi_dp_size() that calculates the total device path length. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
adb575124d
commit
f6dd3f359c
3 changed files with 31 additions and 12 deletions
|
@ -324,7 +324,10 @@ int efi_dp_match(const struct efi_device_path *a,
|
|||
const struct efi_device_path *b);
|
||||
struct efi_object *efi_dp_find_obj(struct efi_device_path *dp,
|
||||
struct efi_device_path **rem);
|
||||
unsigned efi_dp_size(const struct efi_device_path *dp);
|
||||
/* get size of the first device path instance excluding end node */
|
||||
efi_uintn_t efi_dp_instance_size(const struct efi_device_path *dp);
|
||||
/* size of multi-instance device path excluding end node */
|
||||
efi_uintn_t efi_dp_size(const struct efi_device_path *dp);
|
||||
struct efi_device_path *efi_dp_dup(const struct efi_device_path *dp);
|
||||
struct efi_device_path *efi_dp_append(const struct efi_device_path *dp1,
|
||||
const struct efi_device_path *dp2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue