Page MenuHomeFreeBSD

efivar: Add some explicit casts to uuid_t
ClosedPublic

Authored by imp on Apr 25 2025, 7:33 PM.
Tags
None
Referenced Files
F172083502: D50032.id154634.diff
Wed, Sep 16, 1:03 AM
Unknown Object (File)
Thu, Sep 10, 1:00 AM
Unknown Object (File)
Tue, Sep 8, 8:11 AM
Unknown Object (File)
Fri, Sep 4, 10:00 AM
Unknown Object (File)
Sun, Aug 30, 2:58 PM
Unknown Object (File)
Sat, Aug 29, 5:15 PM
Unknown Object (File)
Fri, Aug 28, 12:01 AM
Unknown Object (File)
Tue, Aug 25, 3:46 PM
Subscribers
None

Details

Summary

Since we know we're type-punning the EFI_GUID to a uuid_t, add some
explicit casts even though, at the moment, we typedef one to the other.

Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Apr 25 2025, 7:33 PM
imp created this revision.

I would add some type-checking for the conversion. E.g you could define inlines uuid_t * efi_guid_to_uuid(efi_guid_t *) and const uuid_t *const_efi_guid_to_uuid(const efi_guid_t *) and use them instead of manually writing the cast.

This revision was not accepted when it landed; it landed in state Needs Review.May 1 2025, 6:06 PM
This revision was automatically updated to reflect the committed changes.