1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
use crate::protocol::device_path::DevicePathProtocol;
use crate::{guid, Guid, Status};
use core::ffi::c_void;

#[derive(Debug)]
#[repr(C)]
pub struct LoadFileProtocol {
    pub load_file: unsafe extern "efiapi" fn(
        this: *mut LoadFileProtocol,
        file_path: *const DevicePathProtocol,
        boot_policy: bool,
        buffer_size: *mut usize,
        buffer: *mut c_void,
    ) -> Status,
}

impl LoadFileProtocol {
    pub const GUID: Guid = guid!("56ec3091-954c-11d2-8e3f-00a0c969723b");
}

#[derive(Debug)]
#[repr(C)]
pub struct LoadFile2Protocol {
    pub load_file: unsafe extern "efiapi" fn(
        this: *mut LoadFile2Protocol,
        file_path: *const DevicePathProtocol,
        boot_policy: bool,
        buffer_size: *mut usize,
        buffer: *mut c_void,
    ) -> Status,
}

impl LoadFile2Protocol {
    pub const GUID: Guid = guid!("4006c0c1-fcb3-403e-996d-4a6c8724e06d");
}