Skip to content

Commit

Permalink
efi: Use DevicePath::generate() for executing the main EFI binary
Browse files Browse the repository at this point in the history
Signed-off-by: Rob Bradford <[email protected]>
  • Loading branch information
rbradford committed Dec 18, 2023
1 parent 774e32c commit 21d339d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/efi/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 21d339d

Please sign in to comment.