From 21d339dacd2a10b8b92acb554d71009391f3affa Mon Sep 17 00:00:00 2001 From: Rob Bradford Date: Mon, 18 Dec 2023 17:37:07 +0000 Subject: [PATCH] efi: Use DevicePath::generate() for executing the main EFI binary Signed-off-by: Rob Bradford --- src/efi/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/efi/mod.rs b/src/efi/mod.rs index 769bff88..7d09f571 100644 --- a/src/efi/mod.rs +++ b/src/efi/mod.rs @@ -1206,8 +1206,11 @@ pub fn efi_exec( let wrapped_fs = file::FileSystemWrapper::new(fs, efi_part_id); + let mut path = [0u8; 256]; + path.copy_from_slice(crate::efi::EFI_BOOT_PATH.as_bytes()); + let device_path = DevicePath::File(path); let image = new_image_handle( - file_device_path(crate::efi::EFI_BOOT_PATH), + device_path.generate(), 0 as Handle, &wrapped_fs as *const _ as Handle, loaded_address,