]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[efi] Add ability to extract device path from an EFI load option
authorMichael Brown <mcb30@ipxe.org>
Thu, 28 Aug 2025 14:34:32 +0000 (15:34 +0100)
committerMichael Brown <mcb30@ipxe.org>
Fri, 29 Aug 2025 11:34:17 +0000 (12:34 +0100)
commitc10da8b53c9fc9cda21c28de3226f63cf6c79d8e
tree63ad9b80dc9e1ce620951a9f59e605c7c28f3fb4
parent5bec2604a3565f6db31419a4630e0317384ebe61
[efi] Add ability to extract device path from an EFI load option

An EFI boot option (stored in a BootXXXX variable) comprises an
EFI_LOAD_OPTION structure, which includes some undefined number of EFI
device paths.  (The structure is extremely messy and awkward to parse
in C, but that's par for the course with EFI.)

Add a function to extract the first device path from an EFI load
option, along with wrapper functions to read and extract the first
device path from an EFI boot variable.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/include/ipxe/efi/efi_path.h
src/interface/efi/efi_path.c