Page MenuHomeFreeBSD

libefi: add efi_devpath_next_instance()
ClosedPublic

Authored by tsoome on May 12 2023, 4:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 7, 7:49 AM
Unknown Object (File)
Wed, Apr 24, 7:41 PM
Unknown Object (File)
Apr 6 2024, 1:02 PM
Unknown Object (File)
Mar 14 2024, 10:13 PM
Unknown Object (File)
Mar 11 2024, 8:26 AM
Unknown Object (File)
Mar 11 2024, 8:25 AM
Unknown Object (File)
Mar 11 2024, 7:20 AM
Unknown Object (File)
Mar 7 2024, 12:04 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 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.