Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ad7d619

Browse files
committed
device_path: add .data() accessor
1 parent a3e551c commit ad7d619

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

‎CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
### Added
66

77
- Added `BootServices::install_configuration_table`.
8+
- Added `DevicePath::data()`.
89

910
### Changed
1011

‎uefi/src/proto/device_path/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,12 @@ impl DevicePathNode {
176176
self.full_type() == (DeviceType::END, DeviceSubType::END_ENTIRE)
177177
}
178178

179+
/// Returns the underlying data. The data depends on the node type.
180+
#[must_use]
181+
pub fn data(&self) -> &[u8] {
182+
&self.data
183+
}
184+
179185
/// Convert from a generic [`DevicePathNode`] reference to an enum
180186
/// of more specific node types.
181187
pub fn as_enum(&self) -> Result<DevicePathNodeEnum, NodeConversionError> {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /