From f4bbd7b9faa4c20e5b838d7ea609ebadc7305ba0 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 24 May 2025 11:28:21 -0600 Subject: efi_loader: Separate device path into its own header These functions are useful for the EFI app. As a first step towards making these available outside lib/efi_loader, create a separate header file and include it where needed. Add proper comments to the functions, since many are missing at present. Signed-off-by: Simon Glass Reviewed-by: Heinrich Schuchardt --- lib/efi_loader/efi_helper.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/efi_loader/efi_helper.c') diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c index 19fb5d03fec..2acae7856f9 100644 --- a/lib/efi_loader/efi_helper.c +++ b/lib/efi_loader/efi_helper.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include -- cgit v1.2.3 From 162a6b3df349295bf766c1d128d71b4547e8d56e Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 24 May 2025 11:28:23 -0600 Subject: efi: Rename END to EFI_DP_END This exported symbol has a very generic name. Rename it to indicate that it relates to EFI and device-paths. Fix checkpatch warnings related to use of multiple assignments. Signed-off-by: Simon Glass Suggested-by: Heinrich Schuchardt Signed-off-by: Heinrich Schuchardt --- lib/efi_loader/efi_helper.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/efi_loader/efi_helper.c') diff --git a/lib/efi_loader/efi_helper.c b/lib/efi_loader/efi_helper.c index 2acae7856f9..44b806aadc4 100644 --- a/lib/efi_loader/efi_helper.c +++ b/lib/efi_loader/efi_helper.c @@ -200,7 +200,7 @@ efi_status_t efi_load_option_dp_join(struct efi_device_path **dp, efi_free_pool(tmp_dp); if (!*dp) return EFI_OUT_OF_RESOURCES; - *dp_size += efi_dp_size(initrd_dp) + sizeof(END); + *dp_size += efi_dp_size(initrd_dp) + sizeof(EFI_DP_END); } if (fdt_dp) { @@ -210,10 +210,10 @@ efi_status_t efi_load_option_dp_join(struct efi_device_path **dp, efi_free_pool(tmp_dp); if (!*dp) return EFI_OUT_OF_RESOURCES; - *dp_size += efi_dp_size(fdt_dp) + sizeof(END); + *dp_size += efi_dp_size(fdt_dp) + sizeof(EFI_DP_END); } - *dp_size += sizeof(END); + *dp_size += sizeof(EFI_DP_END); return EFI_SUCCESS; } -- cgit v1.2.3