[PATCH 10/16] efi: devicepath: make fully usable for loader
Ahmad Fatoum
a.fatoum at pengutronix.de
Thu Dec 11 12:30:01 PST 2025
While in a common location, the file still makes use of BS, which is
only available for the EFI payload case. Switch to
efi_get_boot_services() for reusability.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
efi/devicepath.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/efi/devicepath.c b/efi/devicepath.c
index 1d49f450ec8e..e4170d701e47 100644
--- a/efi/devicepath.c
+++ b/efi/devicepath.c
@@ -67,6 +67,7 @@ const struct efi_device_path end_instance_device_path = {
const struct efi_device_path *
device_path_from_handle(efi_handle_t Handle)
{
+ struct efi_boot_services *bs = efi_get_boot_services();
const efi_guid_t *const protocols[] = {
&efi_loaded_image_device_path_guid,
&efi_device_path_protocol_guid,
@@ -78,7 +79,7 @@ device_path_from_handle(efi_handle_t Handle)
for (proto = protocols; *proto; proto++) {
const struct efi_device_path *device_path;
- Status = BS->handle_protocol(Handle, *proto, (void *) &device_path);
+ Status = bs->handle_protocol(Handle, *proto, (void *) &device_path);
if (!EFI_ERROR(Status) && device_path)
return device_path;
}
--
2.47.3
More information about the barebox
mailing list