summaryrefslogtreecommitdiff
path: root/include/efi_loader.h
diff options
context:
space:
mode:
authorHeinrich Schuchardt <[email protected]>2018-01-19 20:24:49 +0100
committerAlexander Graf <[email protected]>2018-01-22 23:09:14 +0100
commit65436f91c5ba76f176a1f1d20801837c9746bb82 (patch)
treed5b114d2154ae83ac332409a2362fc9cd2b62d53 /include/efi_loader.h
parent4f94865b30e07a8c140751b0c0b238960fa27b8c (diff)
efi_loader: provide function to get last node of a device path
On a block device and its partitions the same protocols can be installed. To tell the apart we can use the type of the last node of the device path which is not the end node. The patch provides a utility function to find this last node. Signed-off-by: Heinrich Schuchardt <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
Diffstat (limited to 'include/efi_loader.h')
-rw-r--r--include/efi_loader.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/efi_loader.h b/include/efi_loader.h
index ff59005ff4c..2db4e9c09b0 100644
--- a/include/efi_loader.h
+++ b/include/efi_loader.h
@@ -312,6 +312,9 @@ struct efi_device_path *efi_dp_from_eth(void);
struct efi_device_path *efi_dp_from_mem(uint32_t mem_type,
uint64_t start_address,
uint64_t end_address);
+/* Determine the last device path node that is not the end node. */
+const struct efi_device_path *efi_dp_last_node(
+ const struct efi_device_path *dp);
efi_status_t efi_dp_split_file_path(struct efi_device_path *full_path,
struct efi_device_path **device_path,
struct efi_device_path **file_path);