Skip to content

Commit 48295b3

Browse files
Merge pull request #1598 from seijikun/mr-raw-devpathutil
uefi-raw: Add binding for EFI_DEVICE_PATH_UTILITIES_PROTOCOL
2 parents 8a858a7 + cf1fd26 commit 48295b3

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

uefi-raw/CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
- Added `ExtScsiPassThruProtocol`.
1212
- Added `NvmExpressPassThruProtocol`.
1313
- Added `AtaPassThruProtocol`.
14+
- Added `DevicePathUtilitiesProtocol`.
1415

1516

1617
# uefi-raw - 0.10.0 (2025-02-07)

uefi-raw/src/protocol/device_path.rs

+37
Original file line numberDiff line numberDiff line change
@@ -215,3 +215,40 @@ pub struct DevicePathFromTextProtocol {
215215
impl DevicePathFromTextProtocol {
216216
pub const GUID: Guid = guid!("05c99a21-c70f-4ad2-8a5f-35df3343f51e");
217217
}
218+
219+
#[derive(Debug)]
220+
#[repr(C)]
221+
pub struct DevicePathUtilitiesProtocol {
222+
pub get_device_path_size:
223+
unsafe extern "efiapi" fn(device_path: *const DevicePathProtocol) -> usize,
224+
pub duplicate_device_path: unsafe extern "efiapi" fn(
225+
device_path: *const DevicePathProtocol,
226+
) -> *const DevicePathProtocol,
227+
pub append_device_path: unsafe extern "efiapi" fn(
228+
src1: *const DevicePathProtocol,
229+
src2: *const DevicePathProtocol,
230+
) -> *const DevicePathProtocol,
231+
pub append_device_node: unsafe extern "efiapi" fn(
232+
device_path: *const DevicePathProtocol,
233+
device_node: *const DevicePathProtocol,
234+
) -> *const DevicePathProtocol,
235+
pub append_device_path_instance: unsafe extern "efiapi" fn(
236+
device_path: *const DevicePathProtocol,
237+
device_path_instance: *const DevicePathProtocol,
238+
) -> *const DevicePathProtocol,
239+
pub get_next_device_path_instance: unsafe extern "efiapi" fn(
240+
device_path_instance: *mut *const DevicePathProtocol,
241+
device_path_instance_size: *mut usize,
242+
) -> *const DevicePathProtocol,
243+
pub is_device_path_multi_instance:
244+
unsafe extern "efiapi" fn(device_path: *const DevicePathProtocol) -> bool,
245+
pub create_device_node: unsafe extern "efiapi" fn(
246+
node_type: DeviceType,
247+
node_sub_type: DeviceSubType,
248+
node_length: u16,
249+
) -> *const DevicePathProtocol,
250+
}
251+
252+
impl DevicePathUtilitiesProtocol {
253+
pub const GUID: Guid = guid!("0379be4e-d706-437d-b037-edb82fb772a4");
254+
}

0 commit comments

Comments
 (0)