Page MenuHomeFreeBSD

libefi: add efi_devpath_next_instance()
ClosedPublic

Authored by tsoome on May 12 2023, 4:45 PM.
Tags
None
Referenced Files
F107762513: D40081.diff
Sat, Jan 18, 12:55 AM
Unknown Object (File)
Sat, Jan 11, 2:47 AM
Unknown Object (File)
Thu, Jan 9, 8:31 PM
Unknown Object (File)
Dec 13 2024, 12:11 PM
Unknown Object (File)
Oct 29 2024, 2:13 PM
Unknown Object (File)
Oct 29 2024, 2:13 PM
Unknown Object (File)
Oct 29 2024, 2:13 PM
Unknown Object (File)
Oct 29 2024, 12:32 PM
Subscribers

Details

Summary

UEFI device path may be path to one device, or concatenated list of instances
to different devices (textually represented as comma separated list).

Provide generic function to get next instance from device path.
Returns next instance or end node.

The use case is like:

EFI_DEVICE_PATH *node = (EFI_DEVICE_PATH *)buf;
while (!IsDevicePathEnd(node)) {
process(node);
node = efi_devpath_next_instance(node);
}

Where buf is pointing to either single device path or
concatenated list of device paths (such as from ConIn or ConOut).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 51474
Build 48365: arc lint + arc unit

Event Timeline

Seems good to me... I normally like to see how it's used in real code, but this can be quite useful.

This revision is now accepted and ready to land.May 12 2023, 4:51 PM
This revision was automatically updated to reflect the committed changes.