File tree Expand file tree Collapse file tree 3 files changed +21
-1
lines changed
uefi/src/proto/device_path Expand file tree Collapse file tree 3 files changed +21
-1
lines changed Original file line number Diff line number Diff line change
1
+ use crate :: { guid, Guid } ;
2
+
3
+ /// Device path protocol.
4
+ ///
5
+ /// A device path contains one or more device path instances made of up
6
+ /// variable-length nodes.
7
+ ///
8
+ /// Note that the fields in this struct define the header at the start of each
9
+ /// node; a device path is typically larger than these four bytes.
10
+ #[ repr( C ) ]
11
+ pub struct DevicePathProtocol {
12
+ pub major_type : u8 ,
13
+ pub sub_type : u8 ,
14
+ pub length : [ u8 ; 2 ] ,
15
+ }
16
+
17
+ impl DevicePathProtocol {
18
+ pub const GUID : Guid = guid ! ( "09576e91-6d3f-11d2-8e39-00a0c969723b" ) ;
19
+ }
Original file line number Diff line number Diff line change 4
4
//! ID. They can be implemented by a UEFI driver or occasionally by a
5
5
//! UEFI application.
6
6
7
+ pub mod device_path;
7
8
pub mod rng;
Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ impl ToOwned for DevicePathInstance {
288
288
/// [module-level documentation]: crate::proto::device_path
289
289
/// [`END_ENTIRE`]: DeviceSubType::END_ENTIRE
290
290
#[ repr( C , packed) ]
291
- #[ unsafe_protocol( "09576e91-6d3f-11d2-8e39-00a0c969723b" ) ]
291
+ #[ unsafe_protocol( uefi_raw :: protocol :: device_path :: DevicePathProtocol :: GUID ) ]
292
292
#[ derive( Eq , Pointee ) ]
293
293
pub struct DevicePath {
294
294
data : [ u8 ] ,
You can’t perform that action at this time.
0 commit comments