uefi_raw/protocol/
media.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2
3use crate::protocol::device_path::DevicePathProtocol;
4use crate::{guid, Guid, Status};
5use core::ffi::c_void;
6
7#[derive(Debug)]
8#[repr(C)]
9pub struct LoadFileProtocol {
10    pub load_file: unsafe extern "efiapi" fn(
11        this: *mut LoadFileProtocol,
12        file_path: *const DevicePathProtocol,
13        boot_policy: bool,
14        buffer_size: *mut usize,
15        buffer: *mut c_void,
16    ) -> Status,
17}
18
19impl LoadFileProtocol {
20    pub const GUID: Guid = guid!("56ec3091-954c-11d2-8e3f-00a0c969723b");
21}
22
23#[derive(Debug)]
24#[repr(C)]
25pub struct LoadFile2Protocol {
26    pub load_file: unsafe extern "efiapi" fn(
27        this: *mut LoadFile2Protocol,
28        file_path: *const DevicePathProtocol,
29        boot_policy: bool,
30        buffer_size: *mut usize,
31        buffer: *mut c_void,
32    ) -> Status,
33}
34
35impl LoadFile2Protocol {
36    pub const GUID: Guid = guid!("4006c0c1-fcb3-403e-996d-4a6c8724e06d");
37}