Page MenuHomeFreeBSD

libefi: add efi_devpath_next_instance()
ClosedPublic

Authored by tsoome on May 12 2023, 4:45 PM.
Tags
None
Referenced Files
F115023587: D40081.id121915.diff
Sat, Apr 19, 5:50 PM
F115008795: D40081.id121915.diff
Sat, Apr 19, 1:40 PM
Unknown Object (File)
Sat, Apr 19, 7:43 AM
Unknown Object (File)
Sat, Apr 19, 5:24 AM
Unknown Object (File)
Tue, Mar 25, 2:56 PM
Unknown Object (File)
Mar 16 2025, 9:32 AM
Unknown Object (File)
Feb 26 2025, 12:58 PM
Unknown Object (File)
Jan 18 2025, 12:55 AM
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 Not Applicable
Unit
Tests Not Applicable

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.