summaryrefslogtreecommitdiff
path: root/include/efi_loader.h
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2018-04-16 07:59:08 +0200
committerAlexander Graf <agraf@suse.de>2018-04-23 21:34:28 +0200
commitf6dd3f359c346da64f7db331b82086270388da0c (patch)
tree0b2e800a88894cc78a5d9233ed7d0314c86af671 /include/efi_loader.h
parentadb575124d717b57bb2abb9e63875cb23601c44b (diff)
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>
Diffstat (limited to 'include/efi_loader.h')
-rw-r--r--include/efi_loader.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h
index 0358bcb1d7..1298b5e160 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -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);