Page MenuHomeFreeBSD

libefi: add efi_devpath_next_instance()
ClosedPublic

Authored by tsoome on May 12 2023, 4:45 PM.
Tags
None
Referenced Files
F84749668: D40081.id.diff
Tue, May 28, 12:27 AM
F84749664: D40081.id121926.diff
Tue, May 28, 12:27 AM
F84749663: D40081.id121915.diff
Tue, May 28, 12:27 AM
F84749100: D40081.diff
Tue, May 28, 12:14 AM
Unknown Object (File)
Tue, May 7, 7:49 AM
Unknown Object (File)
Apr 24 2024, 7:41 PM
Unknown Object (File)
Apr 6 2024, 1:02 PM
Unknown Object (File)
Mar 14 2024, 10:13 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.