Skip to content

Commit e8f2f02

Browse files
committed
uefi-raw: Mark DevicePathProtocol as packed
It does not matter for the header as it only contain u8s. However more complex device paths that need to embed the header are also packed structs. Signed-off-by: Mate Kukri <[email protected]>
1 parent dc95b52 commit e8f2f02

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

uefi-raw/src/protocol/device_path.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::{guid, Char16, Guid};
88
/// Note that the fields in this struct define the header at the start of each
99
/// node; a device path is typically larger than these four bytes.
1010
#[derive(Debug)]
11-
#[repr(C)]
11+
#[repr(C,packed)]
1212
pub struct DevicePathProtocol {
1313
pub major_type: u8,
1414
pub sub_type: u8,

0 commit comments

Comments
 (0)