Skip to content

Commit

Permalink
use repr(C) layout for GuidExtension
Browse files Browse the repository at this point in the history
It is important to use `repr(C)` layout for structures that are
used for decoding/encoding from/into bytes.

Signed-off-by: Jiaqi Gao <[email protected]>
  • Loading branch information
gaojiaqi7 committed Aug 31, 2023
1 parent ad2b8d5 commit 07962eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions td-uefi-pi/src/pi/hob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,7 @@ impl Cpu {
/// whose types are not included in this specification. Specifically, writers of executable content
/// in the HOB producer phase can generate a GUID and name their own HOB entries using this
/// module specific value.
#[repr(C)]
#[derive(Copy, Clone, Debug, Pread, Pwrite)]
pub struct GuidExtension {
pub header: Header,
Expand Down

0 comments on commit 07962eb

Please sign in to comment.